mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[6896] Fixed fall damage after teleports
This commit is contained in:
parent
54207e753c
commit
bc816b70fc
4 changed files with 9 additions and 5 deletions
|
|
@ -363,10 +363,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
|||
GetPlayer()->SetPosition(movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
|
||||
GetPlayer()->m_movementInfo = movementInfo;
|
||||
if (GetPlayer()->m_lastFallTime >= movementInfo.fallTime || GetPlayer()->m_lastFallZ <=movementInfo.z)
|
||||
{
|
||||
GetPlayer()->m_lastFallTime = movementInfo.fallTime;
|
||||
GetPlayer()->m_lastFallZ= movementInfo.z;
|
||||
}
|
||||
GetPlayer()->SetFallInformation(movementInfo.fallTime, movementInfo.z);
|
||||
|
||||
if(GetPlayer()->isMovingOrTurning())
|
||||
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
||||
|
|
|
|||
|
|
@ -1556,6 +1556,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
|||
else
|
||||
// this will be used instead of the current location in SaveToDB
|
||||
m_teleport_dest = WorldLocation(mapid, x, y, z, orientation);
|
||||
SetFallInformation(0, z);
|
||||
|
||||
//BuildHeartBeatMsg(&data);
|
||||
//SendMessageToSet(&data, true);
|
||||
|
|
@ -1703,6 +1704,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
|||
}
|
||||
|
||||
m_teleport_dest = WorldLocation(mapid, final_x, final_y, final_z, final_o);
|
||||
SetFallInformation(0, final_z);
|
||||
// if the player is saved before worldportack (at logout for example)
|
||||
// this will be used instead of the current location in SaveToDB
|
||||
|
||||
|
|
|
|||
|
|
@ -1912,6 +1912,11 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
MovementInfo m_movementInfo;
|
||||
uint32 m_lastFallTime;
|
||||
float m_lastFallZ;
|
||||
void SetFallInformation(uint32 time, float z)
|
||||
{
|
||||
m_lastFallTime = time;
|
||||
m_lastFallZ = z;
|
||||
}
|
||||
bool isMoving() const { return HasUnitMovementFlag(movementFlagsMask); }
|
||||
bool isMovingOrTurning() const { return HasUnitMovementFlag(movementOrTurningFlagsMask); }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "6895"
|
||||
#define REVISION_NR "6896"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue