Core/PacketIO: Properly destroy objects clientside when removing from world
Port From (https://github.com/TrinityCore/TrinityCore/commit/38cc011af04ebc7edff74f1ed4edfde9d1d77e0b)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user