From f42eb05a4b832e2f02ce35f4e3562dab6a964d00 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Wed, 24 Dec 2008 06:51:53 +0300 Subject: [PATCH] [6938] Better check for skipping triggred spells at .learn all_myspell command use. This not solve all cases unexpected spell learning for class but result a lot better including avoid known examples problematic spells learned early. --- src/game/Level3.cpp | 6 ++++-- src/shared/revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 09af98247..cfd793f6a 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -1715,6 +1715,10 @@ bool ChatHandler::HandleLearnAllMySpellsCommand(const char* /*args*/) if(!spellInfo) continue; + // skip server-side/triggered spells + if(spellInfo->spellLevel==0) + continue; + // skip wrong class/race skills if(!m_session->GetPlayer()->IsSpellFitByClassAndRace(spellInfo->Id)) continue; @@ -1723,8 +1727,6 @@ bool ChatHandler::HandleLearnAllMySpellsCommand(const char* /*args*/) if( spellInfo->SpellFamilyName != family) continue; - //TODO: skip triggered spells - // skip spells with first rank learned as talent (and all talents then also) uint32 first_rank = spellmgr.GetFirstSpellInChain(spellInfo->Id); if(GetTalentSpellCost(first_rank) > 0 ) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index cf1a97803..946507dcf 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 "6937" + #define REVISION_NR "6938" #endif // __REVISION_NR_H__