662 {
664
665
666
668
670
671 std::set<std::pair<uint32, bool>> spellsToRemove;
672 std::set<uint32> categoriesToRemove;
673
674 for (auto const& [spellId, cooldown] : cooldowns)
675 {
677 if (spellInfo
682 {
684 spellsToRemove.insert(std::make_pair(spellInfo->
Id, cooldown.needSendToClient));
685
687 categoriesToRemove.insert(spellInfo->
GetCategory());
688 }
689 }
690
691
692 for (auto const& [spellId, sendToClient] : spellsToRemove)
694 for (auto const& category : categoriesToRemove)
696 }
std::map< uint32, SpellCooldown > SpellCooldowns
Definition: Player.h:208
#define sSpellMgr
Definition: SpellMgr.h:825
@ SPELL_HUNTER_CHIMERA_SHOT_SCORPID
Definition: spell_hunter.cpp:53
@ SPELL_HUNTER_READINESS
Definition: spell_hunter.cpp:64
@ SPELL_DRAENEI_GIFT_OF_THE_NAARU
Definition: spell_hunter.cpp:69
@ SPELL_HUNTER_BESTIAL_WRATH
Definition: spell_hunter.cpp:50
@ SPELLFAMILY_HUNTER
Definition: SharedDefines.h:3537
Player * ToPlayer()
Definition: Object.h:198
Definition: Player.h:1064
void RemoveCategoryCooldown(uint32 cat)
Definition: Player.cpp:3511
SpellCooldowns const & GetSpellCooldownMap() const
Definition: Player.h:1759
void RemoveSpellCooldown(uint32 spell_id, bool update=false)
Definition: Player.cpp:3503
Definition: SpellInfo.h:316
uint32 GetCategory() const
Definition: SpellInfo.cpp:870
uint32 RecoveryTime
Definition: SpellInfo.h:348
uint32 Id
Definition: SpellInfo.h:320
uint32 CategoryRecoveryTime
Definition: SpellInfo.h:349
uint32 SpellFamilyName
Definition: SpellInfo.h:387
Unit * GetCaster()
Definition: SpellScript.cpp:401