Core/ScriptSystem: Extend SpellScript API by spell focus targets accessors.

--HG--
branch : trunk
This commit is contained in:
QAston
2010-10-04 20:32:10 +02:00
parent 69057dcaeb
commit abe769a310
3 changed files with 30 additions and 4 deletions

View File

@@ -210,13 +210,28 @@ SpellEntry const * SpellScript::GetSpellInfo()
return m_spell->GetSpellInfo();
}
WorldLocation * SpellScript::GetDest()
WorldLocation * SpellScript::GetTargetDest()
{
if (m_spell->m_targets.HasDst())
return &m_spell->m_targets.m_dstPos;
return NULL;
}
Unit * SpellScript::GetTargetUnit()
{
return m_spell->m_targets.getUnitTarget();
}
GameObject * SpellScript::GetTargetGObj()
{
return m_spell->m_targets.getGOTarget();
}
Item * SpellScript::GetTargetItem()
{
return m_spell->m_targets.getItemTarget();
}
Unit * SpellScript::GetHitUnit()
{
if (!IsInHitPhase())