look there is still some code that need to be upgraded for the 9th spell gem ... if i do this command, it does nothing ... if i try with gem 8 spell is loading fine!
s0rCieR
Moderator: MacroQuest Developers
Code: Select all
// ***************************************************************************
// Function: MemSpell
// Description: Our '/MemSpell' command
// Usage: /MemSpell gem# "spell name"
// ***************************************************************************
SPELLFAVORITE MemSpellFavorite;
VOID MemSpell(PSPAWNINFO pChar, PCHAR szLine)
{
if (!ppSpellBookWnd) return;
DWORD Favorite = (DWORD)&MemSpellFavorite;
CHAR szGem[MAX_STRING] = {0};
DWORD sp;
WORD Gem = -1;
CHAR SpellName[MAX_STRING] = {0};
PCHARINFO pCharInfo = NULL;
if (!pSpellBookWnd) return;
if (NULL == (pCharInfo = GetCharInfo())) return;
GetArg(szGem,szLine,1);
GetArg(SpellName,szLine,2);
Gem = atoi(szGem);
if (Gem<1 || Gem>9) return;
Gem--;
pCharInfo->SpellBook;
PSPELL pSpell=0;
for (DWORD N = 0 ; N < NUM_BOOK_SLOTS ; N++)
if (PSPELL pTempSpell=GetSpellByID(pCharInfo->SpellBook[N]))
{
if (!stricmp(SpellName,pTempSpell->Name))
{
pSpell=pTempSpell;
break;
}
}
if (!pSpell) return;
if (pSpell->Level[pChar->Class-1]>pChar->Level) return;
ZeroMemory(&MemSpellFavorite,sizeof(MemSpellFavorite));
strcpy(MemSpellFavorite.Name,"Mem a Spell");
MemSpellFavorite.Byte_3e=1;
for (sp=0;sp<9;sp++) MemSpellFavorite.SpellId[sp]=0xFFFFFFFF;
MemSpellFavorite.SpellId[Gem] = pSpell->ID;
pSpellBookWnd->MemorizeSet((int*)Favorite,9);
}Code: Select all
pSpellBookWnd->MemorizeSet((int*)&pSpellSets[DoIndex],8);Code: Select all
pSpellBookWnd->MemorizeSet((int*)&pSpellSets[DoIndex],9);