diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 1df230f2d..6ed7809e3 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -1832,9 +1832,13 @@ bool ChatHandler::HandleLearnAllMySpellsCommand(const char* /*args*/) return true; uint32 family = clsEntry->spellfamily; - for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i) + for (uint32 i = 0; i < sSkillLineAbilityStore.GetNumRows(); ++i) { - SpellEntry const *spellInfo = sSpellStore.LookupEntry(i); + SkillLineAbilityEntry const *entry = sSkillLineAbilityStore.LookupEntry(i); + if (!entry) + continue; + + SpellEntry const *spellInfo = sSpellStore.LookupEntry(entry->spellId); if(!spellInfo) continue; @@ -1859,7 +1863,7 @@ bool ChatHandler::HandleLearnAllMySpellsCommand(const char* /*args*/) if(!SpellMgr::IsSpellValid(spellInfo,m_session->GetPlayer(),false)) continue; - m_session->GetPlayer()->learnSpell(i, false); + m_session->GetPlayer()->learnSpell(spellInfo->Id, false); } SendSysMessage(LANG_COMMAND_LEARN_CLASS_SPELLS); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 044bb38ad..74b5e1649 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10022" + #define REVISION_NR "10023" #endif // __REVISION_NR_H__