aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-01-30 18:27:38 +0100
committerOvahlord <dreadkiller@gmx.de>2025-02-01 05:36:35 +0100
commit9f084cd749c5f677392d9b5d0678285080eb5ac2 (patch)
treeae61141d56ebc52d79b33736e57cefaf3c727dc5 /src/server/game/Spells/SpellEffects.cpp
parent1547fd0d8a5bb0498f344aa5e0877081aace4bd7 (diff)
Core/Spells: Refactor SpellHistory ModifyCoooldowns and ResetCooldowns callbacks to use CooldownEntry argument instead of internal iterator
(cherry picked from commit ace6342aea9e8e3f69af88ca3963fc961ba56f1b) # Conflicts: # src/server/scripts/Spells/spell_dh.cpp
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 17638a92c08..a71e40bcb50 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -5864,9 +5864,9 @@ void Spell::EffectModifyCooldowns()
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- unitTarget->GetSpellHistory()->ModifyCoooldowns([this](SpellHistory::CooldownStorageType::iterator itr)
+ unitTarget->GetSpellHistory()->ModifyCoooldowns([this](SpellHistory::CooldownEntry const& cooldown)
{
- SpellInfo const* spellOnCooldown = sSpellMgr->AssertSpellInfo(itr->first, DIFFICULTY_NONE);
+ SpellInfo const* spellOnCooldown = sSpellMgr->AssertSpellInfo(cooldown.SpellId, DIFFICULTY_NONE);
if (spellOnCooldown->SpellFamilyName != uint32(effectInfo->MiscValue))
return false;
@@ -5885,9 +5885,9 @@ void Spell::EffectModifyCooldownsByCategory()
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
return;
- unitTarget->GetSpellHistory()->ModifyCoooldowns([this](SpellHistory::CooldownStorageType::iterator itr)
+ unitTarget->GetSpellHistory()->ModifyCoooldowns([this](SpellHistory::CooldownEntry const& cooldown)
{
- return sSpellMgr->AssertSpellInfo(itr->first, DIFFICULTY_NONE)->CategoryId == uint32(effectInfo->MiscValue);
+ return sSpellMgr->AssertSpellInfo(cooldown.SpellId, DIFFICULTY_NONE)->CategoryId == uint32(effectInfo->MiscValue);
}, Milliseconds(damage));
}