*A temp fix for the bug that summoned guardians cause crash.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-30 21:06:26 -06:00
parent 12d4ce413e
commit 67ea3f3d0a

View File

@@ -257,7 +257,7 @@ template<>
void Map::AddToGrid(Creature* obj, NGridType *grid, Cell const& cell)
{
// add to world object registry in grid
if(obj->isPet() || obj->isPossessedByPlayer())
if(obj->isPet() && IS_PLAYER_GUID(obj->GetOwnerGUID()) || obj->isPossessedByPlayer())
{
(*grid)(cell.CellX(), cell.CellY()).AddWorldObject<Creature>(obj, obj->GetGUID());
obj->SetCurrentCell(cell);