mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Objects: Support creating client position entity fragment for non-WorldObject entities
This commit is contained in:
@@ -198,7 +198,7 @@ void BaseEntity::BuildMovementUpdate(ByteBuffer* data, CreateObjectBits flags, P
|
||||
if (IsGameObject())
|
||||
PauseTimes = static_cast<GameObject const*>(this)->GetPauseTimes();
|
||||
|
||||
data->WriteBit(IsWorldObject()); // HasPositionFragment
|
||||
data->WriteBit(flags.HasEntityPosition);
|
||||
data->WriteBit(flags.NoBirthAnim);
|
||||
data->WriteBit(flags.EnablePortals);
|
||||
data->WriteBit(flags.PlayHoverAnim);
|
||||
|
||||
@@ -33,9 +33,11 @@ typedef std::unordered_map<Player*, UpdateData> UpdateDataMapType;
|
||||
|
||||
struct CreateObjectBits
|
||||
{
|
||||
bool HasEntityPosition : 1;
|
||||
bool NoBirthAnim : 1;
|
||||
bool EnablePortals : 1;
|
||||
bool PlayHoverAnim : 1;
|
||||
bool ThisIsYou : 1;
|
||||
bool MovementUpdate : 1;
|
||||
bool MovementTransport : 1;
|
||||
bool Stationary : 1;
|
||||
@@ -46,7 +48,6 @@ struct CreateObjectBits
|
||||
bool Rotation : 1;
|
||||
bool GameObject : 1;
|
||||
bool SmoothPhasing : 1;
|
||||
bool ThisIsYou : 1;
|
||||
bool SceneObject : 1;
|
||||
bool ActivePlayer : 1;
|
||||
bool Conversation : 1;
|
||||
|
||||
@@ -188,6 +188,8 @@ m_movementInfo(), m_name(), m_isActive(false), m_isFarVisible(false), m_isStored
|
||||
m_transport(nullptr), m_zoneId(0), m_areaId(0), m_staticFloorZ(VMAP_INVALID_HEIGHT), m_outdoors(false), m_liquidStatus(LIQUID_MAP_NO_WATER),
|
||||
m_currMap(nullptr), m_InstanceId(0), _dbPhase(0), m_notifyflags(0), _heartbeatTimer(HEARTBEAT_INTERVAL)
|
||||
{
|
||||
m_updateFlag.HasEntityPosition = true;
|
||||
|
||||
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_ALIVE | GHOST_VISIBILITY_GHOST);
|
||||
m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_ALIVE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user