From a39d0db9ec64f6bf38716abaade5b7835f2db338 Mon Sep 17 00:00:00 2001 From: Shauren Date: Wed, 1 May 2024 22:26:53 +0200 Subject: Core/Spells: Implemented evoker empower spell mechanic --- src/server/game/Spells/SpellInfo.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/server/game/Spells/SpellInfo.cpp') diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 472ecf7fb95..acd095dd005 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1290,6 +1290,9 @@ SpellInfo::SpellInfo(SpellNameEntry const* spellName, ::Difficulty difficulty, S CooldownAuraSpellId = _cooldowns->AuraSpellID; } + // SpellEmpowerStageEntry + std::ranges::transform(data.EmpowerStages, std::back_inserter(EmpowerStageThresholds), [](SpellEmpowerStageEntry const* stage) { return Milliseconds(stage->DurationMs); }); + // SpellEquippedItemsEntry if (SpellEquippedItemsEntry const* _equipped = data.EquippedItems) { @@ -1743,6 +1746,11 @@ bool SpellInfo::IsAutoRepeatRangedSpell() const return HasAttribute(SPELL_ATTR2_AUTO_REPEAT); } +bool SpellInfo::IsEmpowerSpell() const +{ + return !EmpowerStageThresholds.empty(); +} + bool SpellInfo::HasInitialAggro() const { return !(HasAttribute(SPELL_ATTR1_NO_THREAT) || HasAttribute(SPELL_ATTR2_NO_INITIAL_THREAT) || HasAttribute(SPELL_ATTR4_NO_HARMFUL_THREAT)); -- cgit v1.2.3