aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2015-09-10 19:39:30 +0200
committerShauren <shauren.trinity@gmail.com>2015-09-10 19:39:30 +0200
commit1efb3f08e278530f59d681f676b031a7fc6db3ac (patch)
treedbf88a94966ccc2f6f5f91896fb2962bc5bcf715 /src/server/game/Entities
parentb194595c07762e0be0475b7e9f86be9de6f76a06 (diff)
Core/Spells: Improved spell category cooldown handling
* Category cooldown is stored with the spell that started the cooldown (and only resetting cooldown on that spell will clear cooldowns on entire category - this fully mirrors client behavior) * This significantly reduces the amount of data saved to database for cooldowns * Spell casts from items that have a different category specified than on spell will now check for cooldown during the cast Closes #15349
Diffstat (limited to 'src/server/game/Entities')
-rw-r--r--src/server/game/Entities/Player/Player.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 901bd81ecba..b00b18f2f4f 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -22779,7 +22779,7 @@ void Player::ApplyEquipCooldown(Item* pItem)
continue;
// Don't replace longer cooldowns by equip cooldown if we have any.
- if (GetSpellHistory()->GetRemainingCooldown(effectData->SpellID) > 30 * IN_MILLISECONDS)
+ if (GetSpellHistory()->GetRemainingCooldown(sSpellMgr->AssertSpellInfo(effectData->SpellID)) > 30 * IN_MILLISECONDS)
continue;
GetSpellHistory()->AddCooldown(effectData->SpellID, pItem->GetEntry(), std::chrono::seconds(30));