mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[10647] Show die animation at totem destroy.
Or any creature type die with linked unsummon. Original patch provided by Eggxp.
This commit is contained in:
parent
edbb840103
commit
fd7e86c79b
4 changed files with 14 additions and 8 deletions
|
|
@ -19359,12 +19359,18 @@ void Player::UpdateVisibilityOf(WorldObject const* viewPoint, WorldObject* targe
|
|||
{
|
||||
if(!target->isVisibleForInState(this, viewPoint, true))
|
||||
{
|
||||
if (target->GetTypeId()==TYPEID_UNIT)
|
||||
BeforeVisibilityDestroy<Creature>((Creature*)target,this);
|
||||
|
||||
ObjectGuid t_guid = target->GetGUID();
|
||||
|
||||
target->DestroyForPlayer(this);
|
||||
if (target->GetTypeId()==TYPEID_UNIT)
|
||||
{
|
||||
BeforeVisibilityDestroy<Creature>((Creature*)target,this);
|
||||
|
||||
// at remove from map (destroy) show kill animation (in different out of range/stealth case)
|
||||
target->DestroyForPlayer(this, !target->IsInWorld() && ((Creature*)target)->isDead());
|
||||
}
|
||||
else
|
||||
target->DestroyForPlayer(this);
|
||||
|
||||
m_clientGUIDs.erase(t_guid);
|
||||
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_VISIBILITY_CHANGES, "%s out of range for player %u. Distance = %f",t_guid.GetString().c_str(),GetGUIDLow(),GetDistance(target));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue