diff options
author | tartalo <none@none> | 2009-11-07 18:47:11 +0100 |
---|---|---|
committer | tartalo <none@none> | 2009-11-07 18:47:11 +0100 |
commit | 5b7ef6fd2fd95e944807f07dcf181b9f1e4ea573 (patch) | |
tree | fa91e4f72eed68a5b7198dbbf031ceb7d288c444 /src/game/Spell.cpp | |
parent | c922e2a3052b5353d4a64dbe140e3d5bb291c805 (diff) |
Set proper orientation after being teleported by spell, by Spp. Closes #100
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index c9d84d2cb41..9ec20a11c40 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -159,9 +159,9 @@ void SpellCastTargets::setSrc(Position *pos) } } -void SpellCastTargets::setDst(float x, float y, float z, uint32 mapId) +void SpellCastTargets::setDst(float x, float y, float z, float orientation, uint32 mapId) { - m_dstPos.Relocate(x, y, z); + m_dstPos.Relocate(x, y, z, orientation); m_targetMask |= TARGET_FLAG_DEST_LOCATION; if(mapId != MAPID_INVALID) m_dstPos.m_mapId = mapId; @@ -1831,7 +1831,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) float dis = rand_norm() * (max_dis - min_dis) + min_dis; float x, y, z; m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE, dis); - m_targets.setDst(x, y, z); + m_targets.setDst(x, y, z, m_caster->GetOrientation()); break; } case TARGET_UNIT_MASTER: @@ -2095,9 +2095,9 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) if(m_spellInfo->Effect[0] == SPELL_EFFECT_TELEPORT_UNITS || m_spellInfo->Effect[1] == SPELL_EFFECT_TELEPORT_UNITS || m_spellInfo->Effect[2] == SPELL_EFFECT_TELEPORT_UNITS) - m_targets.setDst(st->target_X, st->target_Y, st->target_Z, (int32)st->target_mapId); + m_targets.setDst(st->target_X, st->target_Y, st->target_Z, st->target_Orientation, (int32)st->target_mapId); else if(st->target_mapId == m_caster->GetMapId()) - m_targets.setDst(st->target_X, st->target_Y, st->target_Z); + m_targets.setDst(st->target_X, st->target_Y, st->target_Z, st->target_Orientation); } else { @@ -2110,7 +2110,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) break; case TARGET_DST_HOME: if(m_caster->GetTypeId() == TYPEID_PLAYER) - m_targets.setDst(((Player*)m_caster)->m_homebindX,((Player*)m_caster)->m_homebindY,((Player*)m_caster)->m_homebindZ, ((Player*)m_caster)->m_homebindMapId); + m_targets.setDst(((Player*)m_caster)->m_homebindX,((Player*)m_caster)->m_homebindY,((Player*)m_caster)->m_homebindZ, ((Player*)m_caster)->GetOrientation(), ((Player*)m_caster)->m_homebindMapId); break; case TARGET_DST_NEARBY_ENTRY: { @@ -6717,7 +6717,7 @@ void Spell::SelectTrajTargets() } } - m_targets.setDst(x, y, z); + m_targets.setDst(x, y, z, m_caster->GetOrientation()); } } |