mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2026-01-30 19:42:51 +03:00
fix(glue): kill gotos in CGlueMgr::NetDisconnectHandler
This commit is contained in:
parent
f4bf67fe6b
commit
6bed0f5f83
@ -266,25 +266,23 @@ int32_t CGlueMgr::NetDisconnectHandler(const void* eventData, void*) {
|
|||||||
|
|
||||||
if (v11) {
|
if (v11) {
|
||||||
ConsolePrintf("CGlueMgr::NetDisconnectHandler: Displaying script");
|
ConsolePrintf("CGlueMgr::NetDisconnectHandler: Displaying script");
|
||||||
LABEL_14:
|
|
||||||
FrameScript_SignalEvent(2u, "%d", CGlueMgr::m_clientKickReason);
|
FrameScript_SignalEvent(2u, "%d", CGlueMgr::m_clientKickReason);
|
||||||
goto LABEL_15;
|
} else {
|
||||||
|
ConsolePrintf("CGlueMgr::NetDisconnectHandler: NOT displaying script");
|
||||||
|
WOWCS_OPS op;
|
||||||
|
const char* msg;
|
||||||
|
int32_t result;
|
||||||
|
int32_t errorCode;
|
||||||
|
int32_t complete = ClientServices::Connection()->PollStatus(op, &msg, result, errorCode);
|
||||||
|
|
||||||
|
if (!complete || result) {
|
||||||
|
ClientServices::SelectRealm("");
|
||||||
|
FrameScript_SignalEvent(2u, "%d", CGlueMgr::m_clientKickReason);
|
||||||
|
} else {
|
||||||
|
FrameScript_SignalEvent(3u, "%s%s", "OKAY", msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ConsolePrintf("CGlueMgr::NetDisconnectHandler: NOT displaying script");
|
|
||||||
|
|
||||||
WOWCS_OPS op;
|
|
||||||
const char* msg;
|
|
||||||
int32_t result;
|
|
||||||
int32_t errorCode;
|
|
||||||
int32_t complete = ClientServices::Connection()->PollStatus(op, &msg, result, errorCode);
|
|
||||||
|
|
||||||
if (!complete || result) {
|
|
||||||
ClientServices::SelectRealm("");
|
|
||||||
goto LABEL_14;
|
|
||||||
}
|
|
||||||
FrameScript_SignalEvent(3u, "%s%s", "OKAY", msg);
|
|
||||||
|
|
||||||
LABEL_15:
|
|
||||||
ClientServices::LoginConnection()->Logoff();
|
ClientServices::LoginConnection()->Logoff();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user