So far I've encountered ${Me.Buff[XXXX].ID} is now returning 1 or NULL only.- Fixed buff slot counts
Moderator: MacroQuest Developers
So far I've encountered ${Me.Buff[XXXX].ID} is now returning 1 or NULL only.- Fixed buff slot counts

Code: Select all
Sub Main
#include test.inc
/returnCode: Select all
/echo First Line of test.inc
/echo Middle Line of test.inc
/echo Last Line of test.incCode: Select all
[MQ2] First Line of test.inc
[MQ2] Middle Line of test.inc
[MQ2] Last Line of test.inc
[MQ2] Last Line of test.inc

Code: Select all
bool GetShortBuffID(PSPELLBUFF pBuff, DWORD &nID)
{
PCHARINFO pChar=GetCharInfo();
- unsigned long N=(pBuff-&pChar->ShortBuff[0])/sizeof(SPELLBUFF);
+ unsigned long N=(pBuff-&pChar->ShortBuff[0]);
if (N<12)
{
nID=N+1;
return true;
}
return false;
}
bool GetBuffID(PSPELLBUFF pBuff, DWORD &nID)
{
PCHARINFO pChar=GetCharInfo();
- unsigned long N=(pBuff-&pChar->Buff[0])/sizeof(SPELLBUFF);
+ unsigned long N=(pBuff-&pChar->Buff[0]);
if (N<0x19)
{
nID=N+1;
return true;
}
return false;
}