mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[12127] Add wrapper to access spell locations
* Add SpellCastTargets::getSource to get the source position (for TARGET_FLAG_SOURCE_LOCATION) * Add SpellCastTargets::getDestination to get the destination position (for TARGET_FLAG_DEST_LOCATION)
This commit is contained in:
parent
147a1b04fe
commit
1707edbcfd
4 changed files with 26 additions and 60 deletions
|
|
@ -2324,20 +2324,12 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
if (targetMode == TARGET_AREAEFFECT_GO_AROUND_SOURCE)
|
||||
{
|
||||
if (m_targets.m_targetMask & TARGET_FLAG_SOURCE_LOCATION)
|
||||
{
|
||||
x = m_targets.m_srcX;
|
||||
y = m_targets.m_srcY;
|
||||
z = m_targets.m_srcZ;
|
||||
}
|
||||
m_targets.getSource(x, y, z);
|
||||
else
|
||||
m_caster->GetPosition(x, y, z);
|
||||
}
|
||||
else
|
||||
{
|
||||
x = m_targets.m_destX;
|
||||
y = m_targets.m_destY;
|
||||
z = m_targets.m_destZ;
|
||||
}
|
||||
m_targets.getDestination(x, y, z);
|
||||
|
||||
// It may be possible to fill targets for some spell effects
|
||||
// automatically (SPELL_EFFECT_WMO_REPAIR(88) for example) but
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue