diff options
Diffstat (limited to 'src/server/game/Handlers/SpellHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/SpellHandler.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index 824b747b9f8..25a93b73483 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -634,28 +634,5 @@ void WorldSession::HandleUpdateProjectilePosition(WorldPacket& recvPacket) void WorldSession::HandleRequestCategoryCooldowns(WorldPackets::Spells::RequestCategoryCooldowns& /*requestCategoryCooldowns*/) { - SendSpellCategoryCooldowns(); -} - -void WorldSession::SendSpellCategoryCooldowns() -{ - WorldPackets::Spells::CategoryCooldown cooldowns; - - Unit::AuraEffectList const& categoryCooldownAuras = _player->GetAuraEffectsByType(SPELL_AURA_MOD_SPELL_CATEGORY_COOLDOWN); - for (AuraEffect* aurEff : categoryCooldownAuras) - { - uint32 categoryId = aurEff->GetMiscValue(); - auto cItr = std::find_if(cooldowns.CategoryCooldowns.begin(), cooldowns.CategoryCooldowns.end(), - [categoryId](WorldPackets::Spells::CategoryCooldown::CategoryCooldownInfo const& cooldown) - { - return cooldown.Category == categoryId; - }); - - if (cItr == cooldowns.CategoryCooldowns.end()) - cooldowns.CategoryCooldowns.emplace_back(aurEff->GetMiscValue(), -aurEff->GetAmount()); - else - cItr->ModCooldown -= aurEff->GetAmount(); - } - - SendPacket(cooldowns.Write()); + _player->SendSpellCategoryCooldowns(); } |