Code: Select all
--- MQ2-20080906_Orig/MQ2Main/ISXEQ/ISXEQCommands.cpp 2007-11-28 23:18:28.000000000 -0600
+++ MQ2-20080906/MQ2Main/ISXEQ/ISXEQCommands.cpp 2008-09-07 00:10:18.654000000 -0500
@@ -529,7 +529,7 @@
// CHAR szArg2[MAX_STRING] = {0};
if (!stricmp(argv[1],"list")) {
WriteChatColor("Spells:",USERCOLOR_DEFAULT);
- for (Index=0;Index<9;Index++) {
+ for (Index=0;Index<NUM_SPELL_GEMS;Index++) {
if (GetCharInfo2()->MemorizedSpells[Index]==0xFFFFFFFF) {
WriteChatf("%d. <Empty>",Index+1);
} else {
@@ -566,7 +566,7 @@
return 0;
}
}
- for (Index=0;Index<9;Index++) {
+ for (Index=0;Index<NUM_SPELL_GEMS;Index++) {
if (GetCharInfo2()->MemorizedSpells[Index]!=0xFFFFFFFF) {
PCHAR SpellName = GetSpellNameByID(GetCharInfo2()->MemorizedSpells[Index]);
if (!stricmp(argv[1],SpellName)) {
@@ -607,7 +607,7 @@
if (NULL == (pCharInfo = GetCharInfo())) return -1;
Gem = atoi(argv[1]);
- if (Gem<1 || Gem>9) return -1;
+ if (Gem<1 || Gem>NUM_SPELL_GEMS) return -1;
Gem--;
GetCharInfo2()->SpellBook;
@@ -628,9 +628,9 @@
ZeroMemory(&MemSpellFavorite,sizeof(MemSpellFavorite));
strcpy(MemSpellFavorite.Name,"Mem a Spell");
MemSpellFavorite.inuse=1;
- for (sp=0;sp<9;sp++) MemSpellFavorite.SpellId[sp]=0xFFFFFFFF;
+ for (sp=0;sp<NUM_SPELL_GEMS;sp++) MemSpellFavorite.SpellId[sp]=0xFFFFFFFF;
MemSpellFavorite.SpellId[Gem] = pSpell->ID;
- pSpellBookWnd->MemorizeSet((int*)Favorite,9);
+ pSpellBookWnd->MemorizeSet((int*)Favorite,NUM_SPELL_GEMS);
return 0;
}