678 {
680
681
682
684
686
687 std::set<std::pair<uint32, bool>> spellsToRemove;
688 std::set<uint32> categoriesToRemove;
689
690 for (auto const& [spellId, cooldown] : cooldowns)
691 {
693 if (spellInfo
698 {
700 spellsToRemove.insert(std::make_pair(spellInfo->
Id, cooldown.needSendToClient));
701
703 categoriesToRemove.insert(spellInfo->
GetCategory());
704 }
705 }
706
707
708 for (auto const& [spellId, sendToClient] : spellsToRemove)
709 caster->RemoveSpellCooldown(spellId, sendToClient);
710 for (auto const& category : categoriesToRemove)
711 caster->RemoveCategoryCooldown(category);
712 }
std::map< uint32, SpellCooldown > SpellCooldowns
Definition Player.h:209
@ SPELLFAMILY_HUNTER
Definition SharedDefines.h:3795
#define sSpellMgr
Definition SpellMgr.h:836
Player * ToPlayer()
Definition Object.h:202
SpellCooldowns const & GetSpellCooldownMap() const
Definition Player.h:1790
void RemoveSpellCooldown(uint32 spell_id, bool update=false)
Definition Player.cpp:3513
Definition SpellInfo.h:340
uint32 GetCategory() const
Definition SpellInfo.cpp:880
uint32 RecoveryTime
Definition SpellInfo.h:372
uint32 Id
Definition SpellInfo.h:344
uint32 CategoryRecoveryTime
Definition SpellInfo.h:373
uint32 SpellFamilyName
Definition SpellInfo.h:411
Unit * GetCaster()
Definition SpellScript.cpp:401
@ SPELL_HUNTER_CHIMERA_SHOT_SCORPID
Definition spell_hunter.cpp:49
@ SPELL_HUNTER_READINESS
Definition spell_hunter.cpp:61
@ SPELL_DRAENEI_GIFT_OF_THE_NAARU
Definition spell_hunter.cpp:66
@ SPELL_HUNTER_BESTIAL_WRATH
Definition spell_hunter.cpp:46