diff options
author | Brian <runningnak3d@gmail.com> | 2010-04-12 07:26:22 -0600 |
---|---|---|
committer | Brian <runningnak3d@gmail.com> | 2010-04-12 07:26:22 -0600 |
commit | 1427f76a8c95373c419a1e3b10d85c45604c5bb6 (patch) | |
tree | de036ffe99a83a349e58a142acdc91451b808381 /src/game/ObjectMgr.cpp | |
parent | 87b4eeffd4c353690fe9ebbe46f2bef015d6bb17 (diff) |
* Set Trinity referenced trainer start entry to 200000
* Removed unneeded bar loading code for trainers
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r-- | src/game/ObjectMgr.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index d35e31e9b29..6b0b758007b 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -8133,8 +8133,9 @@ void ObjectMgr::LoadMailLevelRewards() bool ObjectMgr::AddSpellToTrainer(int32 entry, int32 spell, Field *fields, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds) { CreatureInfo const* cInfo = GetCreatureTemplate(entry); - - if (!cInfo && entry > 0) +if (entry < TRINITY_TRAINER_START_REF) +{ + if (!cInfo) { sLog.outErrorDb("Table `npc_trainer` have entry for not existed creature template (Entry: %u), ignore", entry); return false; @@ -8217,24 +8218,16 @@ bool ObjectMgr::AddSpellToTrainer(int32 entry, int32 spell, Field *fields, std:: return true; } - +} int ObjectMgr::LoadReferenceTrainer(int32 trainer, int32 spell, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds) { QueryResult_AutoPtr result = WorldDatabase.PQuery("SELECT entry, spell,spellcost,reqskill,reqskillvalue,reqlevel FROM npc_trainer WHERE entry='%d'", spell); if (!result) - { - barGoLink bar(1); - - bar.step(); return 0; - } - - barGoLink bar(result->GetRowCount()); uint32 count = 0; do { - bar.step(); Field* fields = result->Fetch(); |