mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 08:42:45 +03:00
feat(glue): implement CGlueMgr::OnKickReasonMsg
This commit is contained in:
parent
8ff5e548ed
commit
c50582fc6f
@ -25,6 +25,7 @@
|
|||||||
#include "util/Filesystem.hpp"
|
#include "util/Filesystem.hpp"
|
||||||
#include "util/Locale.hpp"
|
#include "util/Locale.hpp"
|
||||||
#include "util/Log.hpp"
|
#include "util/Log.hpp"
|
||||||
|
#include <common/DataStore.hpp>
|
||||||
#include <common/MD5.hpp>
|
#include <common/MD5.hpp>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
@ -55,6 +56,7 @@ char CGlueMgr::m_accountName[1280];
|
|||||||
float CGlueMgr::m_aspect;
|
float CGlueMgr::m_aspect;
|
||||||
bool CGlueMgr::m_authenticated;
|
bool CGlueMgr::m_authenticated;
|
||||||
const CharacterSelectionDisplay* CGlueMgr::m_characterInfo;
|
const CharacterSelectionDisplay* CGlueMgr::m_characterInfo;
|
||||||
|
int32_t CGlueMgr::m_clientKickReason;
|
||||||
char CGlueMgr::m_currentScreen[64];
|
char CGlueMgr::m_currentScreen[64];
|
||||||
int32_t CGlueMgr::m_disconnectPending;
|
int32_t CGlueMgr::m_disconnectPending;
|
||||||
int32_t CGlueMgr::m_displayingQueueDialog;
|
int32_t CGlueMgr::m_displayingQueueDialog;
|
||||||
@ -528,7 +530,7 @@ int32_t CGlueMgr::NetDisconnectHandler(const void* a1, void* a2) {
|
|||||||
if (notAccountLogin) {
|
if (notAccountLogin) {
|
||||||
// TODO ConsolePrintf("CGlueMgr::NetDisconnectHandler: Displaying script");
|
// TODO ConsolePrintf("CGlueMgr::NetDisconnectHandler: Displaying script");
|
||||||
|
|
||||||
// TODO FrameScript_SignalEvent(DISCONNECTED_FROM_SERVER, "%d", CGlueMgr::m_clientKickReason);
|
FrameScript_SignalEvent(DISCONNECTED_FROM_SERVER, "%d", CGlueMgr::m_clientKickReason);
|
||||||
|
|
||||||
ClientServices::LoginConnection()->Logoff();
|
ClientServices::LoginConnection()->Logoff();
|
||||||
|
|
||||||
@ -557,9 +559,40 @@ int32_t CGlueMgr::NetDisconnectHandler(const void* a1, void* a2) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t CGlueMgr::OnKickReasonMsg(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
int32_t CGlueMgr::OnKickReasonMsg(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||||
// TODO
|
// Nothing to read
|
||||||
|
if (msg->IsRead()) {
|
||||||
|
CGlueMgr::m_clientKickReason = 0;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
uint8_t reason = 0;
|
||||||
|
msg->Get(reason);
|
||||||
|
|
||||||
|
// Message only contained reason code
|
||||||
|
if (msg->IsRead()) {
|
||||||
|
CGlueMgr::m_clientKickReason = reason;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// UI isn't currently running
|
||||||
|
if (!CGlueMgr::m_initialized || CGlueMgr::m_suspended) {
|
||||||
|
CGlueMgr::m_clientKickReason = reason;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
//
|
||||||
|
// char v6[16];
|
||||||
|
// msg->GetArray(v6, sizeof(v6));
|
||||||
|
//
|
||||||
|
// if (!msg->IsValid()) {
|
||||||
|
// CGlueMgr::m_clientKickReason = reason;
|
||||||
|
// return 1;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Sub4042C0(v6);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGlueMgr::PollAccountLogin(int32_t errorCode, const char* msg, int32_t complete, int32_t result, WOWCS_OPS op) {
|
void CGlueMgr::PollAccountLogin(int32_t errorCode, const char* msg, int32_t complete, int32_t result, WOWCS_OPS op) {
|
||||||
|
|||||||
@ -38,6 +38,7 @@ class CGlueMgr {
|
|||||||
static float m_aspect;
|
static float m_aspect;
|
||||||
static bool m_authenticated;
|
static bool m_authenticated;
|
||||||
static const CharacterSelectionDisplay* m_characterInfo;
|
static const CharacterSelectionDisplay* m_characterInfo;
|
||||||
|
static int32_t m_clientKickReason;
|
||||||
static char m_currentScreen[];
|
static char m_currentScreen[];
|
||||||
static int32_t m_disconnectPending;
|
static int32_t m_disconnectPending;
|
||||||
static int32_t m_displayingQueueDialog;
|
static int32_t m_displayingQueueDialog;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user