Core/Spells: removed unnecessary spell attribute hack from Earth Shield and cleaned up its spell script a bit

This commit is contained in:
Ovahlord committed 2023-08-07 19:29:31 +02:00
1 parent be53999f09
commit e1492bc0e9
2 files changed
+3 -11

No files matched your search

-6
View File
@@ -5433,12 +5433,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_1].ApplyAuraName = SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS; spellInfo->Effects[EFFECT_1].ApplyAuraName = SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS;
}); });
// Earth Shield
ApplySpellFix({ 379 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx3 |= SPELL_ATTR3_IGNORE_CASTER_MODIFIERS;
});
// Light of Dawn // Light of Dawn
ApplySpellFix({ 85222 }, [](SpellInfo* spellInfo) ApplySpellFix({ 85222 }, [](SpellInfo* spellInfo)
{ {
+3 -5
View File
@@ -278,17 +278,15 @@ class spell_sha_earth_shield : public AuraScript
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{ {
PreventDefaultAction(); PreventDefaultAction();
Unit* caster = GetCaster(); Unit* caster = GetCaster();
if (!caster) if (!caster)
return; return;
Unit* target = GetTarget(); int32 bp = caster->SpellHealingBonusDone(GetTarget(), GetSpellInfo(), aurEff->GetAmount(), HEAL, aurEff->GetEffIndex());
int32 basePoints = caster->SpellHealingBonusDone(target, GetSpellInfo(), aurEff->GetAmount(), HEAL, EFFECT_0);
if (AuraEffect const* glyphEff = caster->GetDummyAuraEffect(SPELLFAMILY_SHAMAN, SHAMAN_ICON_ID_GLYPH_OF_EARTH_SHIELD, EFFECT_0)) if (AuraEffect const* glyphEff = caster->GetDummyAuraEffect(SPELLFAMILY_SHAMAN, SHAMAN_ICON_ID_GLYPH_OF_EARTH_SHIELD, EFFECT_0))
AddPct(basePoints, glyphEff->GetAmount()); AddPct(bp, glyphEff->GetAmount());
target->CastSpell(target, SPELL_SHAMAN_EARTH_SHIELD_HEAL, CastSpellExtraArgs(aurEff).SetOriginalCaster(GetCasterGUID()).AddSpellBP0(basePoints)); GetTarget()->CastSpell(GetTarget(), SPELL_SHAMAN_EARTH_SHIELD_HEAL, CastSpellExtraArgs(aurEff).SetOriginalCaster(GetCasterGUID()).AddSpellBP0(bp));
} }
void Register() override void Register() override