From 909941e1b44250b0fa646d363af817f40ca48355 Mon Sep 17 00:00:00 2001 From: Giacomo Pozzoni Date: Sun, 24 Nov 2019 21:00:42 +0100 Subject: Core/GameObjects: Skip LoS checks for traps (#23936) * Core/GameObjects: Skip LoS checks for traps * Core/GameObjects: Fix spells cast by traps missing always * Scripts/Spells: Fix WSG heal buff not healing The WSG green heal buff is now cast by a GameObject so the spell target should be used to calculate the healing, not the GameObject. --- src/server/scripts/Spells/spell_generic.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/server/scripts/Spells') diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index d376669ee7f..3b45a48c64d 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -2872,19 +2872,19 @@ class spell_gen_restoration : public AuraScript { PreventDefaultAction(); - Unit* caster = GetCaster(); - if (!caster) + Unit* target = GetTarget(); + if (!target) return; - int32 heal = caster->CountPctFromMaxHealth(10); - HealInfo healInfo(caster, GetTarget(), heal, GetSpellInfo(), GetSpellInfo()->GetSchoolMask()); - caster->HealBySpell(healInfo); + int32 heal = target->CountPctFromMaxHealth(10); + HealInfo healInfo(target, target, heal, GetSpellInfo(), GetSpellInfo()->GetSchoolMask()); + target->HealBySpell(healInfo); /// @todo: should proc other auras? - if (int32 mana = caster->GetMaxPower(POWER_MANA)) + if (int32 mana = target->GetMaxPower(POWER_MANA)) { mana /= 10; - caster->EnergizeBySpell(caster, GetId(), mana, POWER_MANA); + target->EnergizeBySpell(target, GetId(), mana, POWER_MANA); } } -- cgit v1.2.3