mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 21:50:50 -04:00
Merge pull request #10445 from Discover-/Cooldown-Exploit
Core/Items: Fix an exploit where players would be able to reset the cool...
This commit is contained in:
@@ -22684,6 +22684,11 @@ void Player::ApplyEquipCooldown(Item* pItem)
|
||||
if (spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_USE)
|
||||
continue;
|
||||
|
||||
//! Don't replace longer cooldowns by equip cooldown if we have any.
|
||||
SpellCooldowns::iterator itr = m_spellCooldowns.find(spellData.SpellId);
|
||||
if (itr != m_spellCooldowns.end() && itr->second.itemid == pItem->GetEntry() && itr->second.end > time(NULL) + 30)
|
||||
break;
|
||||
|
||||
AddSpellCooldown(spellData.SpellId, pItem->GetEntry(), time(NULL) + 30);
|
||||
|
||||
WorldPacket data(SMSG_ITEM_COOLDOWN, 12);
|
||||
|
||||
Reference in New Issue
Block a user