Core/Spells: Implemented evoker empower spell mechanic

This commit is contained in:
Shauren
2024-05-01 22:26:53 +02:00
parent cdc6719b83
commit a39d0db9ec
27 changed files with 733 additions and 94 deletions

View File

@@ -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));