mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16: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
00fc1d7593
commit
21a6a26386
24 changed files with 215 additions and 201 deletions
|
|
@ -1511,43 +1511,6 @@ void WorldObject::BuildMonsterChat(WorldPacket *data, uint8 msgtype, char const*
|
|||
*data << (uint8)0; // ChatTag
|
||||
}
|
||||
|
||||
void WorldObject::BuildHeartBeatMsg(WorldPacket *data) const
|
||||
{
|
||||
//Heartbeat message cannot be used for non-units
|
||||
if (!isType(TYPEMASK_UNIT))
|
||||
return;
|
||||
|
||||
data->Initialize(MSG_MOVE_HEARTBEAT, 32);
|
||||
data->append(GetPackGUID());
|
||||
*data << uint32(((Unit*)this)->GetUnitMovementFlags()); // movement flags
|
||||
*data << uint16(0); // 2.3.0
|
||||
*data << uint32(getMSTime()); // time
|
||||
*data << m_positionX;
|
||||
*data << m_positionY;
|
||||
*data << m_positionZ;
|
||||
*data << m_orientation;
|
||||
*data << uint32(0);
|
||||
}
|
||||
|
||||
void WorldObject::BuildTeleportAckMsg(WorldPacket *data, float x, float y, float z, float ang) const
|
||||
{
|
||||
//TeleportAck message cannot be used for non-units
|
||||
if (!isType(TYPEMASK_UNIT))
|
||||
return;
|
||||
|
||||
data->Initialize(MSG_MOVE_TELEPORT_ACK, 41);
|
||||
data->append(GetPackGUID());
|
||||
*data << uint32(0); // this value increments every time
|
||||
*data << uint32(((Unit*)this)->GetUnitMovementFlags()); // movement flags
|
||||
*data << uint16(0); // 2.3.0
|
||||
*data << uint32(getMSTime()); // time
|
||||
*data << x;
|
||||
*data << y;
|
||||
*data << z;
|
||||
*data << ang;
|
||||
*data << uint32(0);
|
||||
}
|
||||
|
||||
void WorldObject::SendMessageToSet(WorldPacket *data, bool /*bToSelf*/)
|
||||
{
|
||||
//if object is in world, map for it already created!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue