From 2d7a579dab8141577cd4205450affbc45737a870 Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 18 Jun 2009 17:03:16 -0500 Subject: [PATCH] [8039] Prevent including talents to trainer data, report at server loading. Author: VladimirMangos --HG-- branch : trunk --- src/game/ObjectMgr.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index a45722449c..009962e320 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -7849,6 +7849,8 @@ void ObjectMgr::LoadTrainerSpell() barGoLink bar( result->GetRowCount() ); + std::set talentIds; + uint32 count = 0; do { @@ -7890,6 +7892,16 @@ void ObjectMgr::LoadTrainerSpell() continue; } + if(GetTalentSpellCost(spell)) + { + if(talentIds.count(spell)==0) + { + sLog.outErrorDb("Table `npc_trainer` has talent as learning spell %u, ignore", spell); + talentIds.insert(spell); + } + continue; + } + TrainerSpellData& data = m_mCacheTrainerSpellMap[entry]; TrainerSpell& trainerSpell = data.spellList[spell];