From a8fc3ac257c703e4fa7c0f9ef76465a4d1fe30da Mon Sep 17 00:00:00 2001 From: killerwife Date: Fri, 12 Jan 2024 11:47:54 +0100 Subject: [PATCH] Spell: Implement GetDamageForEffect for scripting purposes --- src/game/Spells/Spell.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/Spells/Spell.h b/src/game/Spells/Spell.h index 8cf7158e90f..f99050e2859 100644 --- a/src/game/Spells/Spell.h +++ b/src/game/Spells/Spell.h @@ -861,9 +861,10 @@ class Spell // OnInit use only void SetEffectSkipMask(uint32 mask) { m_effectSkipMask = mask; } // OnHit use only - uint32 GetTotalTargetDamage() { return m_damage; } - uint32 GetTotalTargetAbsorb() { return m_absorb; } + uint32 GetTotalTargetDamage() const { return m_damage; } + uint32 GetTotalTargetAbsorb() const { return m_absorb; } void SetTotalTargetValueModifier(float modifier); + int32 GetDamageForEffect(SpellEffectIndex effIdx) const { return m_damagePerEffect[effIdx]; } // script initialization hook only setters - use only if dynamic - else use appropriate helper void SetMaxAffectedTargets(uint32 newValue) { m_affectedTargetCount = newValue; } void SetChainTargetsCount(SpellEffectIndex effIdx, uint32 newValue) { m_chainTargetCount[effIdx] = newValue; }