Core/Items: Fix an exploit where players would be able to reset the cooldown of items to the equip cooldown (30 seconds) when unequipping, equipping and then relogging.
This commit is contained in:
@@ -22678,6 +22678,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