Core/Spells: Blink wont be able to trespass solid objects anymore (walls/doors)

Refactored some code

Signed-off-by: Subv <[email protected]>
This commit is contained in:
Subv
2012-02-11 19:23:18 -05:00
parent 1fc3470233
commit ff9830c18d
6 changed files with 90 additions and 11 deletions
+4 -1
View File
@@ -6076,7 +6076,10 @@ void Spell::EffectLeap(SpellEffIndex /*effIndex*/)
if (!m_targets.HasDst())
return;
unitTarget->NearTeleportTo(m_targets.GetDst()->GetPositionX(), m_targets.GetDst()->GetPositionY(), m_targets.GetDst()->GetPositionZ(), m_targets.GetDst()->GetOrientation(), unitTarget == m_caster);
Position pos;
m_targets.GetDst()->GetPosition(&pos);
unitTarget->GetFirstCollisionPosition(pos, unitTarget->GetDistance(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ() + 2.0f), 0.0f);
unitTarget->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), unitTarget == m_caster);
}
void Spell::EffectReputation(SpellEffIndex effIndex)