mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
*Extend API of SpellScript by Dest and Damage/Heal setters and getters.
*Make some SpellScript function names shorter. --HG-- branch : trunk
This commit is contained in:
@@ -178,12 +178,19 @@ SpellEntry const * SpellScript::GetSpellInfo()
|
||||
return m_spell->GetSpellInfo();
|
||||
}
|
||||
|
||||
Unit * SpellScript::GetEffectUnitTarget()
|
||||
WorldLocation * SpellScript::GetDest()
|
||||
{
|
||||
if (m_spell->m_targets.HasDst())
|
||||
return &m_spell->m_targets.m_dstPos;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Unit * SpellScript::GetHitUnit()
|
||||
{
|
||||
return m_spell->unitTarget;
|
||||
}
|
||||
|
||||
Creature * SpellScript::GetEffectCreatureTarget()
|
||||
Creature * SpellScript::GetHitCreature()
|
||||
{
|
||||
if (m_spell->unitTarget)
|
||||
return m_spell->unitTarget->ToCreature();
|
||||
@@ -191,7 +198,7 @@ Creature * SpellScript::GetEffectCreatureTarget()
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Player * SpellScript::GetEffectPlayerTarget()
|
||||
Player * SpellScript::GetHitPlayer()
|
||||
{
|
||||
if (m_spell->unitTarget)
|
||||
return m_spell->unitTarget->ToPlayer();
|
||||
@@ -199,16 +206,36 @@ Player * SpellScript::GetEffectPlayerTarget()
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Item * SpellScript::GetEffectItemTarget()
|
||||
Item * SpellScript::GetHitItem()
|
||||
{
|
||||
return m_spell->itemTarget;
|
||||
}
|
||||
|
||||
GameObject * SpellScript::GetEffectGOTarget()
|
||||
GameObject * SpellScript::GetHitGObj()
|
||||
{
|
||||
return m_spell->gameObjTarget;
|
||||
}
|
||||
|
||||
int32 SpellScript::GetHitDamage()
|
||||
{
|
||||
return m_spell->m_damage;
|
||||
}
|
||||
|
||||
void SpellScript::SetHitDamage(int32 damage)
|
||||
{
|
||||
m_spell->m_damage = damage;
|
||||
}
|
||||
|
||||
int32 SpellScript::GetHitHeal()
|
||||
{
|
||||
return m_spell->m_healing;
|
||||
}
|
||||
|
||||
void SpellScript::SetHitHeal(int32 heal)
|
||||
{
|
||||
m_spell->m_healing = heal;
|
||||
}
|
||||
|
||||
int32 SpellScript::GetEffectValue()
|
||||
{
|
||||
return m_spell->damage;
|
||||
|
||||
Reference in New Issue
Block a user