diff options
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_debug.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_learn.cpp | 20 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index 185cf05864d..10f7f2ad4e4 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -976,11 +976,11 @@ public: { // reset all states for (int i = 1; i <= 32; ++i) - unit->ModifyAuraState(AuraState(i), false); + unit->ModifyAuraState(AuraStateType(i), false); return true; } - unit->ModifyAuraState(AuraState(abs(state)), state > 0); + unit->ModifyAuraState(AuraStateType(abs(state)), state > 0); return true; } diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index b93c995351b..eee9ebfc809 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -80,13 +80,13 @@ public: // number or [name] Shift-click form |color|Hspell:spell_id|h[name]|h|r or Htalent form uint32 spell = handler->extractSpellIdFromLink((char*)args); - if (!spell || !sSpellStore.LookupEntry(spell)) + if (!spell || !sSpellMgr->GetSpellInfo(spell)) return false; char const* allStr = strtok(NULL, " "); bool allRanks = allStr ? (strncmp(allStr, "all", strlen(allStr)) == 0) : false; - SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell); if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer())) { handler->PSendSysMessage(LANG_COMMAND_SPELL_BROKEN, spell); @@ -118,13 +118,13 @@ public: static bool HandleLearnAllGMCommand(ChatHandler* handler, const char* /*args*/) { - for (uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i) + for (uint32 i = 0; i < sSpellMgr->GetSpellInfoStoreSize(); ++i) { - SpellEntry const* spellInfo = sSpellStore.LookupEntry(i); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(i); if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer(), false)) continue; - if (!sSpellMgr->IsSkillTypeSpell(i, SKILL_INTERNAL)) + if (!spellInfo->IsAbilityOfSkillType(SKILL_INTERNAL)) continue; handler->GetSession()->GetPlayer()->learnSpell(i, false); @@ -154,12 +154,12 @@ public: if (!entry) continue; - SpellEntry const *spellInfo = sSpellStore.LookupEntry(entry->spellId); + SpellInfo const *spellInfo = sSpellMgr->GetSpellInfo(entry->spellId); if (!spellInfo) continue; // skip server-side/triggered spells - if (spellInfo->spellLevel == 0) + if (spellInfo->SpellLevel == 0) continue; // skip wrong class/race skills @@ -218,7 +218,7 @@ public: if (!spellId) // ??? none spells in talent continue; - SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer(), false)) continue; @@ -297,7 +297,7 @@ public: if (!spellid) // ??? none spells in talent continue; - SpellEntry const* spellInfo = sSpellStore.LookupEntry(spellid); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellid); if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, handler->GetSession()->GetPlayer(), false)) continue; @@ -456,7 +456,7 @@ public: if (skillLine->classmask && (skillLine->classmask & classmask) == 0) continue; - SpellEntry const* spellInfo = sSpellStore.LookupEntry(skillLine->spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(skillLine->spellId); if (!spellInfo || !SpellMgr::IsSpellValid(spellInfo, player, false)) continue; |
