From a242662ae6fd424928c3972de1232b43e7164457 Mon Sep 17 00:00:00 2001 From: Discover- Date: Fri, 31 Jan 2014 10:37:55 +0100 Subject: Core/Spells: Fix DK Ghoul's damage after ad8eb434c02e451effd0949aaa7d2b7999d91597. I misread 'SpellScript::m_damage' for 'SpellScript::damage'. By @joschiwald --- src/server/game/Spells/SpellScript.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/server/game/Spells/SpellScript.cpp') diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 579fb0f9418..c0bcd477e5b 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -583,9 +583,21 @@ int32 SpellScript::GetEffectValue() const TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetEffectValue was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); return 0; } + return m_spell->damage; } +void SpellScript::SetEffectValue(int32 value) +{ + if (!IsInEffectHook()) + { + TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::SetEffectValue was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + return; + } + + m_spell->damage = value; +} + Item* SpellScript::GetCastItem() { return m_spell->m_CastItem; -- cgit v1.2.3