diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 4ae9dfc398..dd197d8d8e 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -7672,7 +7672,7 @@ void Player::DuelComplete(DuelCompleteType type) //---------------------------------------------------------// -void Player::_ApplyItemMods(Item* item, uint8 slot, bool apply) +void Player::_ApplyItemMods(Item* item, uint8 slot, bool apply, bool updateItemAuras /*= true*/) { if (slot >= INVENTORY_SLOT_BAG_END || !item) return; @@ -7693,7 +7693,9 @@ void Player::_ApplyItemMods(Item* item, uint8 slot, bool apply) _ApplyItemBonuses(proto, slot, apply); ApplyItemEquipSpell(item, apply); - ApplyItemDependentAuras(item, apply); + if (updateItemAuras) + ApplyItemDependentAuras(item, apply); + ApplyEnchantment(item, apply); TC_LOG_DEBUG("entities.player.items", "Player::_ApplyItemMods: completed"); @@ -12012,7 +12014,7 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update) if (pProto && pProto->ItemSet) RemoveItemsSetItem(this, pProto); - _ApplyItemMods(pItem, slot, false); + _ApplyItemMods(pItem, slot, false, update); // remove item dependent auras and casts (only weapon and armor slots) if (slot < EQUIPMENT_SLOT_END) @@ -12877,6 +12879,9 @@ void Player::SwapItem(uint16 src, uint16 dst) RemoveItem(dstbag, dstslot, false); RemoveItem(srcbag, srcslot, false); + if (srcbag == INVENTORY_SLOT_BAG_0 && srcslot < INVENTORY_SLOT_BAG_END) + ApplyItemDependentAuras(pSrcItem, false); + // add to dest if (IsInventoryPos(dst)) StoreItem(sDest, pSrcItem, true); @@ -12885,6 +12890,9 @@ void Player::SwapItem(uint16 src, uint16 dst) else if (IsEquipmentPos(dst)) EquipItem(eDest, pSrcItem, true); + if (dstbag == INVENTORY_SLOT_BAG_0 && dstslot < INVENTORY_SLOT_BAG_END) + ApplyItemDependentAuras(pDstItem, false); + // add to src if (IsInventoryPos(src)) StoreItem(sDest2, pDstItem, true); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 9e1e966e58..b26ec441d5 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2174,7 +2174,7 @@ class TC_GAME_API Player : public Unit, public GridObject void ApplyItemDependentAuras(Item* item, bool apply); - void _ApplyItemMods(Item* item, uint8 slot, bool apply); + void _ApplyItemMods(Item* item, uint8 slot, bool apply, bool updateItemAuras = true); void _RemoveAllItemMods(); void _ApplyAllItemMods(); void _ApplyAllLevelScaleItemMods(bool apply);