• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Silly mq2eqbc change

vladus2000

Active member
Joined
Dec 1, 2006
RedCents
131¢
I realize there are other ways to accomplish some of this, but what I wanted was an event for all EQBC chat, and a way to prevent it from showing for a plugin I'm developing. I thought I would share this. And yes, ideas were borrowed. Here is the change to the WriteOut function:

Rich (BB code):
void WriteOut(char *szText)
{
	typedef BOOL (__cdecl *fMQWriteBC)( char *szText );

	BOOL bWrite = true;
	PMQPLUGIN pPlugin = pPlugins;
	while( pPlugin )
	{
		 fMQWriteBC WriteBC = (fMQWriteBC)GetProcAddress( pPlugin->hModule, "OnWriteBC" );
		 if ( WriteBC )
		 {
			 if ( ! WriteBC( szText ) ) bWrite = false;
		 }
		 pPlugin = pPlugin->pNext;
	}

	if ( ! bWrite ) return;

    // DebugSpew("WriteOut [%s]", szText);
    if(chatWnd && bUseWindow)
    {
        DebugTry(((CXWnd*)chatWnd)->Show(1,1));
        char szProcessed[MAX_STRING];
        StripMQChat(szText, szProcessed);
        CheckChatForEvent(szProcessed);
        MQToSTML(szText, szProcessed,MAX_STRING);
        strcat(szProcessed,"<br>");
        CXStr NewText(szProcessed);
        CXSize Whatever;
        (chatWnd->StmlOut)->AppendSTML(&Whatever,NewText);
        (chatWnd->OutWnd)->SetVScrollPos(chatWnd->OutStruct->VScrollMax);
    }
    else
    {
        WriteChatColor(szText);
    }

    return;
}
 
Silly mq2eqbc change

Users who are viewing this thread

Back
Top
Cart