mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/Objects: fixed single destroy object
This commit is contained in:
@@ -301,12 +301,11 @@ void Object::DestroyForPlayer(Player* target, bool onDeath) const
|
||||
}
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_DESTROY_OBJECT, 8 + 1);
|
||||
data << GetGUID();
|
||||
//! If the following bool is true, the client will call "void CGUnit_C::OnDeath()" for this object.
|
||||
//! OnDeath() does for eg trigger death animation and interrupts certain spells/missiles/auras/sounds...
|
||||
data << uint8(onDeath ? 1 : 0);
|
||||
target->GetSession()->SendPacket(&data);
|
||||
UpdateData updateData(target->GetMapId());
|
||||
BuildOutOfRangeUpdateBlock(&updateData);
|
||||
WorldPacket packet;
|
||||
updateData.BuildPacket(&packet);
|
||||
target->SendDirectMessage(&packet);
|
||||
}
|
||||
|
||||
int32 Object::GetInt32Value(uint16 index) const
|
||||
|
||||
Reference in New Issue
Block a user