From 8b209a441dba87ac0a80b6cf51a8643fca5c9738 Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 26 Dec 2008 17:08:59 -0600 Subject: *Update to Mangos 6949. --HG-- branch : trunk --- src/game/SpellMgr.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/game/SpellMgr.cpp') diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 641a08f9e60..3a0f776352a 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1789,7 +1789,13 @@ void SpellMgr::LoadSpellLearnSpells() { SpellLearnSpellNode dbc_node; dbc_node.spell = entry->EffectTriggerSpell[i]; - dbc_node.autoLearned = true; + + // ignore learning not existed spells (broken/outdated/or generic learnig spell 483 + if(!sSpellStore.LookupEntry(dbc_node.spell)) + continue; + + // talent or passive spells or skill-step spells auto-casted, other required explicit dependent learning + dbc_node.autoLearned = GetTalentSpellCost(spell) > 0 || IsPassiveSpell(spell) || IsSpellHaveEffect(entry,SPELL_EFFECT_SKILL_STEP); SpellLearnSpellMap::const_iterator db_node_begin = GetBeginSpellLearnSpell(spell); SpellLearnSpellMap::const_iterator db_node_end = GetEndSpellLearnSpell(spell); -- cgit v1.2.3