mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
*A temp fix for the bug that summoned guardians cause crash.
--HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user