Core: Add validation-test for adding creatures to the world - fix by Paradox

Closes issue 4807

--HG--
branch : trunk
This commit is contained in:
click
2010-11-16 14:00:47 +01:00
parent 8fae0c176d
commit 6ebaad1847
@@ -744,6 +744,13 @@ bool Creature::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry,
SetMap(map); SetMap(map);
SetPhaseMask(phaseMask,false); SetPhaseMask(phaseMask,false);
CreatureInfo const *cinfo = sObjectMgr.GetCreatureTemplate(Entry);
if (!cinfo)
{
sLog.outErrorDb("Creature entry %u does not exist.", Entry);
return false;
}
Relocate(x, y, z, ang); Relocate(x, y, z, ang);
if (!IsPositionValid()) if (!IsPositionValid())