SpellReady
Posted: Fri Dec 03, 2004 6:43 pm
While not a huge bug, I think the SpellReady code should be changed a bit so SpellReady[] returns true when Gems are fading back in from the disabled state. Its pretty simple to do, just change the state check from spellstate==0 to spellstate!=1.
MQ2Main/MQ2DataTypes.cpp: Line 1988
MQ2Main/MQ2DataTypes.cpp: Line 1988
Code: Select all
case SpellReady:
if (pCastSpellWnd && Index[0])
{
if (IsNumber(Index))
{
// numeric
unsigned long nGem=atoi(Index)-1;
if (nGem<9)
{
if (!((PEQCASTSPELLWINDOW)pCastSpellWnd)->SpellSlots[nGem])
Dest.DWord=0;
else
Dest.DWord = (((PEQCASTSPELLWINDOW)pCastSpellWnd)->SpellSlots[nGem]->spellstate!=1);
Dest.Type=pBoolType;
return true;
}
}
else
{
for (unsigned long nGem=0 ; nGem < 9 ; nGem++)
{
if (PSPELL pSpell=GetSpellByID(pChar->MemorizedSpells[nGem]))
{
if (!stricmp(Index,pSpell->Name))
{
if (!((PEQCASTSPELLWINDOW)pCastSpellWnd)->SpellSlots[nGem])
Dest.DWord=0;
else
Dest.DWord = (((PEQCASTSPELLWINDOW)pCastSpellWnd)->SpellSlots[nGem]->spellstate!=1);
Dest.Type=pBoolType;
return true;
}
}
}
}
}
return false;