Esempio n. 1
0
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()); 
        } 
    } 
} 
Esempio n. 2
0
PLUGIN_API VOID InitializePlugin() 
{ 
    DebugSpewAlways("Initializing MQ2ChatWnd"); 
    // Add commands, macro parameters, hooks, etc. 
    AddCommand("/style",Style,0,1,0); 
    AddCommand("/mqfont",MQChatFont); 
    AddCommand("/mqmin",MQChatMin); 
    AddCommand("/mqclear",MQChatClear); 
    AddMQ2KeyBind("MQ2CHAT",DoMQ2ChatBind); 
    bmStripFirstStmlLines=AddMQ2Benchmark("StripFirstStmlLines"); 
    LoadChatSettings(); 
} 
Esempio n. 3
0
// Initialize is called by Inner Space when the extension should initialize.
bool ISXEQChatWnd::Initialize(ISInterface *p_ISInterface)
{   
    pISInterface = p_ISInterface;
    pISInterface->OpenSettings(XMLFileName);

    hPulseService = pISInterface->ConnectService(this, "Pulse", PulseService);
    hMemoryService = pISInterface->ConnectService(this, "Memory", MemoryService);
    hServicesService = pISInterface->ConnectService(this, "Services", ServicesService);
    hConsoleService = pISInterface->ConnectService(this, "Console", ConsoleService);

    pISInterface->AddCommand("MQFont",CMD_MQFont,true,false);
    AddMQ2KeyBind("MQ2CHAT",DoMQ2ChatBind);

    return true;
}
Esempio n. 4
0
PCUSTOMBIND AddCustomBind(PCHAR Name, PCHAR CommandDown, PCHAR CommandUp)
{
    if (AddMQ2KeyBind(Name,ExecuteCustomBind))
    {
        PCUSTOMBIND pBind = new CUSTOMBIND;
        ZeroMemory(pBind,sizeof(CUSTOMBIND));
        strcpy_s(pBind->Name,Name);
        if (CommandDown)
            strcpy_s(pBind->CommandDown,CommandDown);
        if (CommandUp)
            strcpy_s(pBind->CommandUp,CommandUp);
        CustomBinds+=pBind;
        return pBind;
    }
    return 0;
}
Esempio n. 5
0
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());
            }
        }
    }
}