aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/Entities/Player/Player.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 7b45462ea82..c520e2924dd 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -22727,6 +22727,12 @@ void Player::ApplyEquipCooldown(Item* pItem)
if (effectData->Trigger != ITEM_SPELLTRIGGER_ON_USE)
continue;
+ // Don't replace longer cooldowns by equip cooldown if we have any.
+ if (GetSpellHistory()->GetRemainingCooldown(effectData->SpellID) > 30 * IN_MILLISECONDS)
+ continue;
+
+ GetSpellHistory()->AddCooldown(effectData->SpellID, pItem->GetEntry(), std::chrono::seconds(30));
+
WorldPackets::Item::ItemCooldown data;
data.ItemGuid = pItem->GetGUID();
data.SpellID = effectData->SpellID;