Core/Spells: added two hooks to be able to set heal and damage values for withing effect handlers. Thx to BigPwn
This commit is contained in:
1 parent
77e4973f63
commit
2106b0d95b
2 files changed
+22
No files matched your search
@@ -555,6 +555,16 @@ void SpellScript::SetHitDamage(int32 damage)
|
||||
m_spell->m_damage = damage;
|
||||
}
|
||||
|
||||
void SpellScript::SetEffectDamage(int32 damage)
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return;
|
||||
}
|
||||
m_spell->damage = damage;
|
||||
}
|
||||
|
||||
int32 SpellScript::GetHitHeal() const
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
@@ -575,6 +585,16 @@ void SpellScript::SetHitHeal(int32 heal)
|
||||
m_spell->m_healing = heal;
|
||||
}
|
||||
|
||||
void SpellScript::SetEffectHeal(int32 heal)
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::SetEffectHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return;
|
||||
}
|
||||
m_spell->m_healing = heal;
|
||||
}
|
||||
|
||||
Aura* SpellScript::GetHitAura() const
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
|
||||
Reference in new issue
Block a user