Core/Spells: removed unneeded spell script for Devastate and updated existing bonus handling in weapon damage effect handler

This commit is contained in:
Ovahlord
2019-07-26 11:11:22 +02:00
parent 9784be7fce
commit 3de0a47105
3 changed files with 7 additions and 38 deletions

View File

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