aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectMgr.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-18 17:03:16 -0500
committermegamage <none@none>2009-06-18 17:03:16 -0500
commit2d7a579dab8141577cd4205450affbc45737a870 (patch)
tree97a61b82cd85fb404099615d3c05b5a28329cd10 /src/game/ObjectMgr.cpp
parente765469b13776817e5ac787542ed68a450c12a8a (diff)
[8039] Prevent including talents to trainer data, report at server loading. Author: VladimirMangos
--HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r--src/game/ObjectMgr.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index a45722449ca..009962e3205 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -7849,6 +7849,8 @@ void ObjectMgr::LoadTrainerSpell()
barGoLink bar( result->GetRowCount() );
+ std::set<uint32> 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];