* Properly fix bogus pet trainers error message
--HG-- branch : trunk
This commit is contained in:
@@ -810,12 +810,12 @@ bool Creature::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry,
|
|||||||
|
|
||||||
bool Creature::isCanTrainingOf(Player* pPlayer, bool msg) const
|
bool Creature::isCanTrainingOf(Player* pPlayer, bool msg) const
|
||||||
{
|
{
|
||||||
if(!isTrainer() || GetCreatureInfo()->trainer_type == TRAINER_TYPE_PETS)
|
if(!isTrainer())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
TrainerSpellData const* trainer_spells = GetTrainerSpells();
|
TrainerSpellData const* trainer_spells = GetTrainerSpells();
|
||||||
|
|
||||||
if(!trainer_spells || trainer_spells->spellList.empty())
|
if((!trainer_spells || trainer_spells->spellList.empty()) && GetCreatureInfo()->trainer_type != TRAINER_TYPE_PETS)
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Creature %u (Entry: %u) have UNIT_NPC_FLAG_TRAINER but have empty trainer spell list.",
|
sLog.outErrorDb("Creature %u (Entry: %u) have UNIT_NPC_FLAG_TRAINER but have empty trainer spell list.",
|
||||||
GetGUIDLow(),GetEntry());
|
GetGUIDLow(),GetEntry());
|
||||||
|
|||||||
Reference in New Issue
Block a user