mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 21:57:01 +01:00
Core/Spells: removed unneeded spell script for Devastate and updated existing bonus handling in weapon damage effect handler
This commit is contained in:
@@ -1163,31 +1163,6 @@ class spell_warr_shield_specialization : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_warr_devastate : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_warr_devastate);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_WARRIOR_SUNDER_ARMOR });
|
||||
}
|
||||
|
||||
void HandleBonusDamage(SpellEffIndex effIndex)
|
||||
{
|
||||
if (Aura* aura = GetHitUnit()->GetAura(SPELL_WARRIOR_SUNDER_ARMOR))
|
||||
{
|
||||
uint8 stacks = std::max(0, aura->GetStackAmount() - 1);
|
||||
int32 damage = GetSpellInfo()->Effects[effIndex].CalcValue(GetCaster(), nullptr, GetHitUnit());
|
||||
SetHitDamage(GetHitDamage() + (stacks * damage));
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_warr_devastate::HandleBonusDamage, EFFECT_1, SPELL_EFFECT_NORMALIZED_WEAPON_DMG);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_warr_blood_craze : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warr_blood_craze);
|
||||
@@ -1228,7 +1203,6 @@ void AddSC_warrior_spell_scripts()
|
||||
new spell_warr_bloodthirst_heal();
|
||||
new spell_warr_charge();
|
||||
RegisterSpellScript(spell_warr_concussion_blow);
|
||||
RegisterSpellScript(spell_warr_devastate);
|
||||
new spell_warr_deep_wounds();
|
||||
new spell_warr_execute();
|
||||
new spell_warr_glyph_of_sunder_armor();
|
||||
|
||||
Reference in New Issue
Block a user