mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8077] Resolve mixed store and use 2 different flags values types in single field.
* Create new monster move field in Creature class and use it in all cases when expected use MONSTER_MOVE_* flags. * Store and use MOVEMENTFLAG_* values in field in MovementInfo structure of Player class. * Cleanups and fix related code. NOTE: DB in creature_addon store values similar MONSTER_MOVE_* flags, scritps also expected set only this flags.
This commit is contained in:
parent
9bc57c8512
commit
48caaaffcf
24 changed files with 215 additions and 201 deletions
|
|
@ -450,9 +450,6 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
|
|||
m_summon_y = 0.0f;
|
||||
m_summon_z = 0.0f;
|
||||
|
||||
//Default movement to run mode
|
||||
m_unit_movement_flags = 0;
|
||||
|
||||
m_mover = this;
|
||||
|
||||
m_miniPet = 0;
|
||||
|
|
@ -1625,7 +1622,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
|||
}
|
||||
|
||||
// reset movement flags at teleport, because player will continue move with these flags after teleport
|
||||
m_movementInfo.flags = 0;
|
||||
m_movementInfo.SetMovementFlags(MOVEMENTFLAG_NONE);
|
||||
|
||||
if ((GetMapId() == mapid) && (!m_transport))
|
||||
{
|
||||
|
|
@ -17982,7 +17979,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
|||
|
||||
// set fly flag if in fly form or taxi flight to prevent visually drop at ground in showup moment
|
||||
if(HasAuraType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED) || isInFlight())
|
||||
m_movementInfo.flags |= MOVEMENTFLAG_FLYING2;
|
||||
m_movementInfo.AddMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||
|
||||
m_mover = this;
|
||||
}
|
||||
|
|
@ -20334,6 +20331,21 @@ void Player::SendClearCooldown( uint32 spell_id, Unit* target )
|
|||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
void Player::BuildTeleportAckMsg( WorldPacket *data, float x, float y, float z, float ang ) const
|
||||
{
|
||||
data->Initialize(MSG_MOVE_TELEPORT_ACK, 41);
|
||||
data->append(GetPackGUID());
|
||||
*data << uint32(0); // this value increments every time
|
||||
*data << uint32(m_movementInfo.GetMovementFlags()); // movement flags
|
||||
*data << uint16(0); // 2.3.0
|
||||
*data << uint32(getMSTime()); // time
|
||||
*data << x;
|
||||
*data << y;
|
||||
*data << z;
|
||||
*data << ang;
|
||||
*data << uint32(0);
|
||||
}
|
||||
|
||||
void Player::SendDuelCountdown(uint32 counter)
|
||||
{
|
||||
WorldPacket data(SMSG_DUEL_COUNTDOWN, 4);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue