[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

@ -531,7 +531,7 @@ Parameter 1: CreatureID - The Creature Template ID to be Summoned. The value her
Parameter 2: Target - The Target Type defining who the Summoned creature will attack once spawned. The value in this field needs to be a valid Target Type as specified in the reference tables below.
Parameter 3: Duration - The duration until the summoned creature should be unsummoned AFTER Combat ends. The value in this field is in milliseconds or 0.
The NPC will Summon another ccast flag 0 will work for you treature at the same spot as itself that will attack the specified target.
The NPC will Summon another cast flag 0 will work for you treature at the same spot as itself that will attack the specified target.
NOTE: Almost all Creature Summons have proper Summon Spells that should be used when possible. This Action is a powerful last resort option only to be used if nothing else works.
NOTE: Using Target Type 0 will cause the Summoned creature to not attack anyone.
NOTE: If Duration is set at 0, then the summoned creature will not despawn until it has died.

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;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12123"
#define REVISION_NR "12124"
#endif // __REVISION_NR_H__