aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellScript.cpp
diff options
context:
space:
mode:
authorVincent_Michael <Vincent_Michael@gmx.de>2014-01-31 23:51:07 +0100
committerVincent_Michael <Vincent_Michael@gmx.de>2014-01-31 23:51:07 +0100
commit224da4795283d1314bd255611730a2b46f84f68c (patch)
tree9f118a2f9bafcce24ee3fd62057689bbd085d0d6 /src/server/game/Spells/SpellScript.cpp
parent9316b947863dcac7675fc9e4cf43a44c4e678ab9 (diff)
parent19172ee4c26a12b844a7e1f435daed9bb44bf625 (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Player/Player.h src/server/scripts/Spells/spell_dk.cpp
Diffstat (limited to 'src/server/game/Spells/SpellScript.cpp')
-rw-r--r--src/server/game/Spells/SpellScript.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp
index c7eebb495c0..c0bcd477e5b 100644
--- a/src/server/game/Spells/SpellScript.cpp
+++ b/src/server/game/Spells/SpellScript.cpp
@@ -576,16 +576,28 @@ 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;