Fix compile warning in ObjectMgr::AddSpellToTrainer
--HG-- branch : trunk
This commit is contained in:
@@ -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)
|
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);
|
CreatureInfo const* cInfo = GetCreatureTemplate(entry);
|
||||||
if (entry < TRINITY_TRAINER_START_REF)
|
|
||||||
{
|
|
||||||
if (!cInfo)
|
if (!cInfo)
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Table `npc_trainer` have entry for not existed creature template (Entry: %u), ignore", entry);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
int ObjectMgr::LoadReferenceTrainer(int32 trainer, int32 spell, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds)
|
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);
|
QueryResult_AutoPtr result = WorldDatabase.PQuery("SELECT entry, spell,spellcost,reqskill,reqskillvalue,reqlevel FROM npc_trainer WHERE entry='%d'", spell);
|
||||||
|
|||||||
Reference in New Issue
Block a user