PLUGIN_API VOID SetGameState(DWORD GameState) { DebugSpew("MQ2ChatWnd::SetGameState()"); if (GameState==GAMESTATE_CHARSELECT) { if (bNoCharSelect) { // destroy chatwnd at charselect if NoCharSelect=on DestroyChatWnd(); } else { AddMQ2KeyBind("MQ2CSCHAT",DoMQ2ChatBind); KeyCombo Combo; ParseKeyCombo("/",Combo); SetMQ2KeyBind("MQ2CSCHAT",FALSE,Combo); } } else { if (GameState!=GAMESTATE_CHARCREATE) RemoveMQ2KeyBind("MQ2CSCHAT"); if (GameState==GAMESTATE_INGAME && !MQChatWnd) { // we entered the game, set up shop DebugTry(CreateChatWindow()); } } }
void EQGamestateService(bool Broadcast, unsigned int MSG, void *lpData) { if (MSG == GAMESTATESERVICE_CHANGED) { DWORD GameState = (DWORD)lpData; if (GameState == GAMESTATE_CHARSELECT) { AddMQ2KeyBind("MQ2CSCHAT", DoMQ2ChatBind); KeyCombo Combo; ParseKeyCombo("/", Combo); SetMQ2KeyBind("MQ2CSCHAT", 0, Combo); } else { RemoveMQ2KeyBind("MQ2CSCHAT"); if (GameState == GAMESTATE_INGAME && !MQChatWnd) { // we entered the game, set up shop DebugTry(CreateChatWindow()); } } } }