Set proper orientation after being teleported by spell, by Spp. Closes #100
--HG-- branch : trunk
This commit is contained in:
1 parent
c922e2a305
commit
5b7ef6fd2f
4 files changed
+16
-15
No files matched your search
+7
-7
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user