diff options
author | joschiwald <joschiwald.trinity@gmail.com> | 2014-01-30 02:40:12 +0100 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2014-01-30 02:40:12 +0100 |
commit | acd46085d1f496657e27e0d5f823f53d466702dc (patch) | |
tree | 2b489957b50a475d8c410cc4a8ab71097c879714 /src/server/game/Spells/SpellScript.cpp | |
parent | 747184a7c0dc200b9c2c8607a3e1dd990161278e (diff) |
Core/Spells: drop last leftovers of hardcoded spell target selection and move it into spellscripts
Closes #1719
Closes #3186
Diffstat (limited to 'src/server/game/Spells/SpellScript.cpp')
-rw-r--r-- | src/server/game/Spells/SpellScript.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index c7eebb495c0..d984dbc8901 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -576,16 +576,26 @@ void SpellScript::PreventHitDefaultEffect(SpellEffIndex effIndex) m_hitPreventDefaultEffectMask |= 1 << effIndex; } -int32 SpellScript::GetEffectValue() +int32 SpellScript::GetEffectValue() const { if (!IsInEffectHook()) { - TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + 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; |