[12124] Improve error output for Pets without proper faction

Also fix typo in EventAi doc, thanks to stfx for pointing
This commit is contained in:
Schmoozerd 2012-08-27 01:48:58 +02:00 committed by Antz
parent cca6ba401f
commit 02ce53b7dd
3 changed files with 7 additions and 3 deletions

View file

@ -5696,8 +5696,12 @@ FactionTemplateEntry const* Unit::getFactionTemplateEntry() const
if (GetObjectGuid() != guid)
{
sLog.outError("%s have invalid faction (faction template id) #%u", GetGuidStr().c_str(), getFaction());
guid = GetObjectGuid();
if (guid.GetHigh() == HIGHGUID_PET)
sLog.outError("%s (base creature entry %u) have invalid faction template id %u, owner %s", GetGuidStr().c_str(), GetEntry(), getFaction(), ((Pet*)this)->GetOwnerGuid().GetString().c_str());
else
sLog.outError("%s have invalid faction template id %u", GetGuidStr().c_str(), getFaction());
}
}
return entry;