fix(Core/Cooldowns): Fixed replacing longer cooldowns by equip cooldown. (#7163)

Fixed #6366
Fixed #6054.

Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
UltraNix
2021-08-05 20:42:37 +02:00
committed by GitHub
parent 279b6de88c
commit f755a277d8

View File

@@ -10970,7 +10970,7 @@ void Player::ApplyEquipCooldown(Item* pItem)
// 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(nullptr) + 30)
if (itr != m_spellCooldowns.end() && itr->second.itemid == pItem->GetEntry() && itr->second.end > World::GetGameTimeMS() + 30 * IN_MILLISECONDS)
continue;
// xinef: dont apply eqiup cooldown for spells with this attribute