aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSpp <none@none>2010-04-13 11:49:09 +0200
committerSpp <none@none>2010-04-13 11:49:09 +0200
commit7cd1f436be8cb3d6af474f2f09c03c556c50f1fb (patch)
tree32906939764fe07425c8f553b2b2e952a2470820 /src
parent2202c4fa9771428a225ba4f11bf3824511cbbc18 (diff)
Fix compile warning in ObjectMgr::AddSpellToTrainer
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/ObjectMgr.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 6b0b758007b..c4efb463732 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -8132,9 +8132,10 @@ void ObjectMgr::LoadMailLevelRewards()
bool ObjectMgr::AddSpellToTrainer(int32 entry, int32 spell, Field *fields, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds)
{
+ if (entry >= TRINITY_TRAINER_START_REF)
+ return false;
+
CreatureInfo const* cInfo = GetCreatureTemplate(entry);
-if (entry < TRINITY_TRAINER_START_REF)
-{
if (!cInfo)
{
sLog.outErrorDb("Table `npc_trainer` have entry for not existed creature template (Entry: %u), ignore", entry);
@@ -8215,10 +8216,8 @@ if (entry < TRINITY_TRAINER_START_REF)
break;
}
}
-
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);