Added some missing SetFallInformation calls
Port From (https://github.com/TrinityCore/TrinityCore/commit/cfefd27cb8171b7fe28781eb8f1d903272830f22)
This commit is contained in:
@@ -1790,7 +1790,7 @@ namespace Game.Entities
|
|||||||
// this will be used instead of the current location in SaveToDB
|
// this will be used instead of the current location in SaveToDB
|
||||||
teleportDest = new WorldLocation(mapid, x, y, z, orientation);
|
teleportDest = new WorldLocation(mapid, x, y, z, orientation);
|
||||||
m_teleport_options = options;
|
m_teleport_options = options;
|
||||||
SetFallInformation(0, z);
|
SetFallInformation(0, GetPositionZ());
|
||||||
|
|
||||||
// code for finish transfer called in WorldSession.HandleMovementOpcodes()
|
// code for finish transfer called in WorldSession.HandleMovementOpcodes()
|
||||||
// at client packet CMSG_MOVE_TELEPORT_ACK
|
// at client packet CMSG_MOVE_TELEPORT_ACK
|
||||||
@@ -1902,7 +1902,7 @@ namespace Game.Entities
|
|||||||
|
|
||||||
teleportDest = new WorldLocation(mapid, x, y, z, orientation);
|
teleportDest = new WorldLocation(mapid, x, y, z, orientation);
|
||||||
m_teleport_options = options;
|
m_teleport_options = options;
|
||||||
SetFallInformation(0, z);
|
SetFallInformation(0, GetPositionZ());
|
||||||
// if the player is saved before worldportack (at logout for example)
|
// if the player is saved before worldportack (at logout for example)
|
||||||
// this will be used instead of the current location in SaveToDB
|
// this will be used instead of the current location in SaveToDB
|
||||||
|
|
||||||
|
|||||||
@@ -305,8 +305,12 @@ namespace Game.Entities
|
|||||||
passenger.m_movementInfo.transport.Reset();
|
passenger.m_movementInfo.transport.Reset();
|
||||||
Log.outDebug(LogFilter.Transport, "Object {0} removed from transport {1}.", passenger.GetName(), GetName());
|
Log.outDebug(LogFilter.Transport, "Object {0} removed from transport {1}.", passenger.GetName(), GetName());
|
||||||
|
|
||||||
if (passenger.IsTypeId(TypeId.Player))
|
Player plr = passenger.ToPlayer();
|
||||||
Global.ScriptMgr.OnRemovePassenger(this, passenger.ToPlayer());
|
if (plr != null)
|
||||||
|
{
|
||||||
|
Global.ScriptMgr.OnRemovePassenger(this, plr);
|
||||||
|
plr.SetFallInformation(0, plr.GetPositionZ());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -727,8 +731,11 @@ namespace Game.Entities
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TypeId.Player:
|
case TypeId.Player:
|
||||||
if (passenger.IsInWorld)
|
if (passenger.IsInWorld && !passenger.ToPlayer().IsBeingTeleported())
|
||||||
|
{
|
||||||
GetMap().PlayerRelocation(passenger.ToPlayer(), x, y, z, o);
|
GetMap().PlayerRelocation(passenger.ToPlayer(), x, y, z, o);
|
||||||
|
passenger.ToPlayer().SetFallInformation(0, passenger.GetPositionZ());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case TypeId.GameObject:
|
case TypeId.GameObject:
|
||||||
GetMap().GameObjectRelocation(passenger.ToGameObject(), x, y, z, o, false);
|
GetMap().GameObjectRelocation(passenger.ToGameObject(), x, y, z, o, false);
|
||||||
|
|||||||
@@ -92,7 +92,11 @@ namespace Game
|
|||||||
//handle special cases
|
//handle special cases
|
||||||
if (!movementInfo.transport.guid.IsEmpty())
|
if (!movementInfo.transport.guid.IsEmpty())
|
||||||
{
|
{
|
||||||
if (movementInfo.transport.pos.GetPositionX() > 50 || movementInfo.transport.pos.GetPositionY() > 50 || movementInfo.transport.pos.GetPositionZ() > 50)
|
// We were teleported, skip packets that were broadcast before teleport
|
||||||
|
if (movementInfo.Pos.GetExactDist2d(mover) > MapConst.SizeofGrids)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (Math.Abs(movementInfo.transport.pos.GetPositionX()) > 75f || Math.Abs(movementInfo.transport.pos.GetPositionY()) > 75f || Math.Abs(movementInfo.transport.pos.GetPositionZ()) > 75f)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!GridDefines.IsValidMapCoord(movementInfo.Pos.posX + movementInfo.transport.pos.posX, movementInfo.Pos.posY + movementInfo.transport.pos.posY,
|
if (!GridDefines.IsValidMapCoord(movementInfo.Pos.posX + movementInfo.transport.pos.posX, movementInfo.Pos.posY + movementInfo.transport.pos.posY,
|
||||||
@@ -267,6 +271,7 @@ namespace Game
|
|||||||
z += GetPlayer().m_unitData.HoverHeight;
|
z += GetPlayer().m_unitData.HoverHeight;
|
||||||
|
|
||||||
GetPlayer().Relocate(loc.GetPositionX(), loc.GetPositionY(), z, loc.GetOrientation());
|
GetPlayer().Relocate(loc.GetPositionX(), loc.GetPositionY(), z, loc.GetOrientation());
|
||||||
|
GetPlayer().SetFallInformation(0, GetPlayer().GetPositionZ());
|
||||||
|
|
||||||
GetPlayer().ResetMap();
|
GetPlayer().ResetMap();
|
||||||
GetPlayer().SetMap(newMap);
|
GetPlayer().SetMap(newMap);
|
||||||
@@ -446,6 +451,7 @@ namespace Game
|
|||||||
WorldLocation dest = plMover.GetTeleportDest();
|
WorldLocation dest = plMover.GetTeleportDest();
|
||||||
|
|
||||||
plMover.UpdatePosition(dest, true);
|
plMover.UpdatePosition(dest, true);
|
||||||
|
plMover.SetFallInformation(0, GetPlayer().GetPositionZ());
|
||||||
|
|
||||||
uint newzone, newarea;
|
uint newzone, newarea;
|
||||||
plMover.GetZoneAndAreaId(out newzone, out newarea);
|
plMover.GetZoneAndAreaId(out newzone, out newarea);
|
||||||
|
|||||||
@@ -442,6 +442,7 @@ namespace Game.Movement
|
|||||||
// this prevent cheating with landing point at lags
|
// this prevent cheating with landing point at lags
|
||||||
// when client side flight end early in comparison server side
|
// when client side flight end early in comparison server side
|
||||||
owner.StopMoving();
|
owner.StopMoving();
|
||||||
|
owner.SetFallInformation(0, owner.GetPositionZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
owner.RemovePlayerFlag(PlayerFlags.TaxiBenchmark);
|
owner.RemovePlayerFlag(PlayerFlags.TaxiBenchmark);
|
||||||
|
|||||||
@@ -525,7 +525,10 @@ namespace Game.Movement
|
|||||||
|
|
||||||
// don't run spline movement for players
|
// don't run spline movement for players
|
||||||
if (_owner.IsTypeId(TypeId.Player))
|
if (_owner.IsTypeId(TypeId.Player))
|
||||||
|
{
|
||||||
|
_owner.ToPlayer().SetFallInformation(0, _owner.GetPositionZ());
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MoveSplineInit init = new MoveSplineInit(_owner);
|
MoveSplineInit init = new MoveSplineInit(_owner);
|
||||||
init.MoveTo(_owner.GetPositionX(), _owner.GetPositionY(), tz, false);
|
init.MoveTo(_owner.GetPositionX(), _owner.GetPositionY(), tz, false);
|
||||||
|
|||||||
@@ -4095,6 +4095,10 @@ namespace Game.Spells
|
|||||||
|
|
||||||
if (effectHandleMode == SpellEffectHandleMode.LaunchTarget)
|
if (effectHandleMode == SpellEffectHandleMode.LaunchTarget)
|
||||||
{
|
{
|
||||||
|
// charge changes fall time
|
||||||
|
if (m_caster.GetTypeId() == TypeId.Player)
|
||||||
|
m_caster.ToPlayer().SetFallInformation(0, m_caster.GetPositionZ());
|
||||||
|
|
||||||
float speed = MathFunctions.fuzzyGt(m_spellInfo.Speed, 0.0f) ? m_spellInfo.Speed : MotionMaster.SPEED_CHARGE;
|
float speed = MathFunctions.fuzzyGt(m_spellInfo.Speed, 0.0f) ? m_spellInfo.Speed : MotionMaster.SPEED_CHARGE;
|
||||||
SpellEffectExtraData spellEffectExtraData = null;
|
SpellEffectExtraData spellEffectExtraData = null;
|
||||||
if (effectInfo.MiscValueB != 0)
|
if (effectInfo.MiscValueB != 0)
|
||||||
@@ -4204,6 +4208,10 @@ namespace Game.Spells
|
|||||||
float speedz = damage / 10.0f;
|
float speedz = damage / 10.0f;
|
||||||
// Disengage
|
// Disengage
|
||||||
unitTarget.JumpTo(speedxy, speedz, m_spellInfo.IconFileDataId != 132572);
|
unitTarget.JumpTo(speedxy, speedz, m_spellInfo.IconFileDataId != 132572);
|
||||||
|
|
||||||
|
// changes fall time
|
||||||
|
if (m_caster.GetTypeId() == TypeId.Player)
|
||||||
|
m_caster.ToPlayer().SetFallInformation(0, m_caster.GetPositionZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
[SpellEffectHandler(SpellEffectName.ClearQuest)]
|
[SpellEffectHandler(SpellEffectName.ClearQuest)]
|
||||||
|
|||||||
Reference in New Issue
Block a user