Code: Select all
--- \temp\mqsrc.pristine\mq2main\isxeq\isxeq.cpp 2005-04-25 17:03:41.6293
14400 -0700
+++ isxeq.cpp 2005-04-24 23:56:25.667037700 -0700
@@ -140,11 +140,15 @@
// pISInterface->AddLSType(*pMyType);
#define DATATYPE(_class_,_variable_) _variable_ = new _class_; pISInterface->Ad
dLSType(*_variable_);
#include "ISXEQDataTypes.h"
#undef DATATYPE
-
+// NOTE: SetInheritance does NOT make it inherit, just notifies the syntax checker...
+ pGroupMemberType->SetInheritance(pSpawnType);
+ pCharacterType->SetInheritance(pSpawnType);
+ pBuffType->SetInheritance(pSpellType);
+ pRaidMemberType->SetInheritance(pSpawnType);
}
void CISXEQ::RegisterTopLevelObjects()
{
// add any Top-Level Objects
Code: Select all
--- \temp\mqsrc.pristine\mq2main\isxeq\isxeqPulse.cpp 2005-04-25 17:03:43.4892
48700 -0700
+++ isxeqPulse.cpp 2005-04-24 09:35:21.167507500 -0700
@@ -198,12 +198,44 @@
}
DWORD GameState=*(DWORD*)(0xB54+pEverQuest);
return GameState;
}
+VOID DropTimers(VOID)
+{
+ PMQTIMER pTimer=gTimer;
+ CHAR szOrig[MAX_STRING] = {0};
+ while(pTimer)
+ {
+ if (pTimer->Current)
+ pTimer->Current--;
+ pTimer=pTimer->pNext;
+ }
+}
+
+
void Heartbeat()
{
+ static DWORD LastGetTick = 0;
+ static bool bFirstHeartBeat = true;
+ static DWORD TickDiff=0;
+ DWORD Tick = GetTickCount();
+ if (bFirstHeartBeat)
+ {
+ LastGetTick=Tick;
+ bFirstHeartBeat=false;
+ }
+ // This accounts for rollover
+ TickDiff += (Tick-LastGetTick);
+ LastGetTick=Tick;
+
+ while (TickDiff>=100) {
+ TickDiff-=100;
+ if (gDelay>0) gDelay--;
+ DropTimers();
+ }
+
if (!gStringTableFixed && pStringTable)
{
FixStringTable();
gStringTableFixed=TRUE;
}
Code: Select all
--- \temp\mqsrc.pristine\mq2chatwnd\isxeqchatwnd.cpp 2005-04-25 17:03:24.4366
44400 -0700
+++ isxeqchatwnd.cpp 2005-04-22 14:55:48.727546700 -0700
@@ -107,10 +107,11 @@
ISInterface *pISInterface=0;
HISXSERVICE hPulseService=0;
HISXSERVICE hMemoryService=0;
HISXSERVICE hServicesService=0;
+HISXSERVICE hConsoleService=0;
HISXSERVICE hEQChatService=0;
HISXSERVICE hEQUIService=0;
HISXSERVICE hEQGamestateService=0;
HISXSERVICE hEQSpawnService=0;
@@ -118,10 +119,11 @@
// Forward declarations of callbacks
void __cdecl PulseService(bool Broadcast, unsigned long MSG, void *lpData);
void __cdecl MemoryService(bool Broadcast, unsigned long MSG, void *lpData);
void __cdecl ServicesService(bool Broadcast, unsigned long MSG, void *lpData);
+void __cdecl ConsoleService(bool Broadcast, unsigned long MSG, void *lpData);
// Initialize is called by Inner Space when the extension should initialize.
bool ISXEQChatWnd::Initialize(ISInterface *p_ISInterface)
{ pISInterface=p_ISInterface;
@@ -195,10 +197,11 @@
// message every frame (after the frame is displayed) and "Memory" which
// wraps "detours" and memory modifications
hPulseService=pISInterface->ConnectService(this,"Pulse",PulseService);
hMemoryService=pISInterface->ConnectService(this,"Memory",MemoryService)
;
hServicesService=pISInterface->ConnectService(this,"Services",ServicesSe
rvice);
+ hConsoleService=pISInterface->ConnectService(this,"Console",ConsoleServi
ce);
}
void ISXEQChatWnd::RegisterCommands()
@@ -239,10 +242,13 @@
}
void ISXEQChatWnd::DisconnectServices()
{
// gracefully disconnect from services
+ if (hConsoleService)
+ pISInterface->DisconnectService(this,hConsoleService);
+
if (hPulseService)
pISInterface->DisconnectService(this,hPulseService);
if (hMemoryService)
{
pISInterface->DisconnectService(this,hMemoryService);
@@ -470,10 +476,62 @@
break;
}
#undef pChat
}
+void __cdecl ConsoleService(bool Broadcast, unsigned long MSG, void *lpData)
+{
+#define pConsOutput ((char *)lpData)
+ switch(MSG)
+ {
+ case CONSOLE_OUTPUT:
+ {
+ // same as OnWriteChatColor
+ if (!MQChatWnd)
+ {
+ EQGamestateService(false,GAMESTATESERVICE_CHANGE
D,(void*)gGameState);
+ if (!MQChatWnd)
+ return;
+ }
+ MQChatWnd->Show=1;
+
+ PFILTER pFilter = gpFilters;
+
+ while (pFilter) {
+ if (!pFilter->pEnabled || (*pFilter->pEnabled))
{
+ if (!strnicmp(pConsOutput,pFilter->Filte
rText,pFilter->Length))
+ {
+ return;
+ }
+ }
+ pFilter = pFilter->pNext;
+ }
+ DWORD Color=pChatManager->GetRGBAFromIndex(USERCOLOR_DEF
AULT);
+
+ CHAR szProcessed[MAX_STRING];
+ MQToSTML(pConsOutput,szProcessed,MAX_STRING,Color);
+ strcat(szProcessed,"<br>");
+ CXStr NewText(szProcessed);
+ DebugTry(ConvertItemTags(NewText,0));
+
+ ChatBuffer *pNewBuffer = new ChatBuffer;
+ GetCXStr(NewText.Ptr,pNewBuffer->Text,MAX_STRING);
+ pNewBuffer->pPrev=pPendingChatTail;
+ pNewBuffer->pNext=0;
+ if (pPendingChatTail)
+ pPendingChatTail->pNext=pNewBuffer;
+ else
+ pPendingChat=pNewBuffer;
+ pPendingChatTail=pNewBuffer;
+ PendingChatLines++;
+ }
+ break;
+ }
+#undef pConsOutput
+}
+
+
// This uses the Services service to connect to ISXEQ services
void __cdecl ServicesService(bool Broadcast, unsigned long MSG, void *lpData)
{
#define Name ((char*)lpData)
switch(MSG)