diff options
| author | Giacomo Pozzoni <giacomopoz@gmail.com> | 2019-11-24 21:00:42 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-12-19 01:05:54 +0100 |
| commit | 9bede687ce3d291c8af8f4deb3f1dcebba1a315d (patch) | |
| tree | fd97eafbcdbf4dbcaaa172db45c1de5e9b928f57 /src/server/scripts/Spells | |
| parent | 1e84214f63bdf30705f22f2d324c3938351df9c2 (diff) | |
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.
(cherry picked from commit 909941e1b44250b0fa646d363af817f40ca48355)
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 190f32b044f..f000c3294d1 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -2690,19 +2690,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, GetSpellInfo(), mana, POWER_MANA); + target->EnergizeBySpell(target, GetSpellInfo(), mana, POWER_MANA); } } |
