Core/PacketIO: Properly destroy objects clientside when removing from world

Port From (https://github.com/TrinityCore/TrinityCore/commit/38cc011af04ebc7edff74f1ed4edfde9d1d77e0b)
This commit is contained in:
hondacrx
2020-02-09 17:10:01 -05:00
parent a4096ebd0c
commit 96fd9b7a57
3 changed files with 30 additions and 14 deletions
+8 -8
View File
@@ -786,16 +786,16 @@ namespace Game.Entities
{
base.DestroyForPlayer(target);
for (byte i = 0; i < EquipmentSlot.End; ++i)
{
if (m_items[i] == null)
continue;
m_items[i].DestroyForPlayer(target);
}
if (target == this)
{
for (byte i = 0; i < EquipmentSlot.End; ++i)
{
if (m_items[i] == null)
continue;
m_items[i].DestroyForPlayer(target);
}
for (byte i = InventorySlots.BagStart; i < InventorySlots.BagEnd; ++i)
{
if (m_items[i] == null)