mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[10627] Use ObjectGuid for player's selection and unit's target
This commit is contained in:
parent
e74d56f9d2
commit
c955941b55
21 changed files with 66 additions and 73 deletions
|
|
@ -2886,7 +2886,7 @@ void Spell::EffectJump(SpellEffectIndex eff_idx)
|
|||
else if(unitTarget->getVictim())
|
||||
pTarget = m_caster->getVictim();
|
||||
else if(m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
pTarget = m_caster->GetMap()->GetUnit(((Player*)m_caster)->GetSelection());
|
||||
pTarget = m_caster->GetMap()->GetUnit(((Player*)m_caster)->GetSelectionGuid());
|
||||
|
||||
o = pTarget ? pTarget->GetOrientation() : m_caster->GetOrientation();
|
||||
}
|
||||
|
|
@ -2955,7 +2955,7 @@ void Spell::EffectTeleportUnits(SpellEffectIndex eff_idx)
|
|||
else if(unitTarget->getVictim())
|
||||
pTarget = unitTarget->getVictim();
|
||||
else if(unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
pTarget = unitTarget->GetMap()->GetUnit(((Player*)unitTarget)->GetSelection());
|
||||
pTarget = unitTarget->GetMap()->GetUnit(((Player*)unitTarget)->GetSelectionGuid());
|
||||
|
||||
// Init dest coordinates
|
||||
float x = m_targets.m_destX;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue