mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/Spells: drop last leftovers of hardcoded spell target selection and move it into spellscripts
Closes #1719 Closes #3186
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user