Core/Entities: Show destroy animation for creatures and totems.

Now all pets and totems will have their proper die/destroy animation when killed.

Ported from MaNGOS.
This commit is contained in:
elecyb committed 2016-01-12 17:34:34 -03:00
1 parent 48940e292f
commit 38782deed0
2 files changed
+12 -1

No files matched your search

+8 -1
View File
@@ -2426,7 +2426,14 @@ void WorldObject::DestroyForNearbyPlayers()
if (isType(TYPEMASK_UNIT) && ToUnit()->GetCharmerGUID() == player->GetGUID()) /// @todo this is for puppet
continue;
DestroyForPlayer(player);
if (GetTypeId() == TYPEID_UNIT)
{
// at remove from world (destroy) show kill animation
DestroyForPlayer(player, ToUnit()->IsDuringRemoveFromWorld() && ToCreature()->isDead());
}
else
DestroyForPlayer(player);
player->m_clientGUIDs.erase(GetGUID());
}
}