aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
authorGiacomo Pozzoni <giacomopoz@gmail.com>2019-11-24 21:00:42 +0100
committerGitHub <noreply@github.com>2019-11-24 21:00:42 +0100
commit909941e1b44250b0fa646d363af817f40ca48355 (patch)
tree779eab478fa1063e044baa7c8f4983a907e2b7b6 /src/server/scripts/Spells
parent94f186ee8342824da57eb0fb24378dacc67cbd64 (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.
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp14
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 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);
}
}