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
|
||||
teleportDest = new WorldLocation(mapid, x, y, z, orientation);
|
||||
m_teleport_options = options;
|
||||
SetFallInformation(0, z);
|
||||
SetFallInformation(0, GetPositionZ());
|
||||
|
||||
// code for finish transfer called in WorldSession.HandleMovementOpcodes()
|
||||
// at client packet CMSG_MOVE_TELEPORT_ACK
|
||||
@@ -1902,7 +1902,7 @@ namespace Game.Entities
|
||||
|
||||
teleportDest = new WorldLocation(mapid, x, y, z, orientation);
|
||||
m_teleport_options = options;
|
||||
SetFallInformation(0, z);
|
||||
SetFallInformation(0, GetPositionZ());
|
||||
// if the player is saved before worldportack (at logout for example)
|
||||
// this will be used instead of the current location in SaveToDB
|
||||
|
||||
|
||||
@@ -305,8 +305,12 @@ namespace Game.Entities
|
||||
passenger.m_movementInfo.transport.Reset();
|
||||
Log.outDebug(LogFilter.Transport, "Object {0} removed from transport {1}.", passenger.GetName(), GetName());
|
||||
|
||||
if (passenger.IsTypeId(TypeId.Player))
|
||||
Global.ScriptMgr.OnRemovePassenger(this, passenger.ToPlayer());
|
||||
Player plr = passenger.ToPlayer();
|
||||
if (plr != null)
|
||||
{
|
||||
Global.ScriptMgr.OnRemovePassenger(this, plr);
|
||||
plr.SetFallInformation(0, plr.GetPositionZ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -727,8 +731,11 @@ namespace Game.Entities
|
||||
break;
|
||||
}
|
||||
case TypeId.Player:
|
||||
if (passenger.IsInWorld)
|
||||
if (passenger.IsInWorld && !passenger.ToPlayer().IsBeingTeleported())
|
||||
{
|
||||
GetMap().PlayerRelocation(passenger.ToPlayer(), x, y, z, o);
|
||||
passenger.ToPlayer().SetFallInformation(0, passenger.GetPositionZ());
|
||||
}
|
||||
break;
|
||||
case TypeId.GameObject:
|
||||
GetMap().GameObjectRelocation(passenger.ToGameObject(), x, y, z, o, false);
|
||||
|
||||
Reference in New Issue
Block a user