diff options
| author | Shauren <shauren.trinity@gmail.com> | 2015-10-29 17:55:57 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2015-10-29 17:56:18 +0100 |
| commit | 7dcddd90be6e49281ca04239de5839e757ef3f7a (patch) | |
| tree | c9bc94e1c6e970c708393622e640f51f703d35b9 /src/server/game/Entities/Player | |
| parent | 3f32307d377d53f31ed92f068fdc4db8069a3b6c (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
(cherry picked from commit 1efb3f08e278530f59d681f676b031a7fc6db3ac)
Closes #15766
Closes #15137
Closes #14837
Diffstat (limited to 'src/server/game/Entities/Player')
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 5df5fa90578..26f2e912725 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -15912,7 +15912,7 @@ bool Player::GetQuestRewardStatus(uint32 quest_id) const uint16 eventId = sGameEventMgr->GetEventIdForQuest(qInfo); if (m_seasonalquests.find(eventId) != m_seasonalquests.end()) return m_seasonalquests.find(eventId)->second.find(quest_id) != m_seasonalquests.find(eventId)->second.end(); - + return false; } @@ -22723,7 +22723,7 @@ void Player::ApplyEquipCooldown(Item* pItem) continue; // Don't replace longer cooldowns by equip cooldown if we have any. - if (GetSpellHistory()->GetRemainingCooldown(spellData.SpellId) > 30 * IN_MILLISECONDS) + if (GetSpellHistory()->GetRemainingCooldown(sSpellMgr->EnsureSpellInfo(spellData.SpellId)) > 30 * IN_MILLISECONDS) continue; GetSpellHistory()->AddCooldown(spellData.SpellId, pItem->GetEntry(), std::chrono::seconds(30)); |
