TrinityCore
Object Class Referenceabstract

#include <Object.h>

Public Member Functions

virtual ~Object ()
 
bool IsInWorld () const
 
virtual void AddToWorld ()
 
virtual void RemoveFromWorld ()
 
ObjectGuid const & GetGUID () const
 
uint32 GetEntry () const
 
void SetEntry (uint32 entry)
 
float GetObjectScale () const
 
virtual void SetObjectScale (float scale)
 
uint32 GetDynamicFlags () const
 
bool HasDynamicFlag (uint32 flag) const
 
void AddDynamicFlag (uint32 flag)
 
void RemoveDynamicFlag (uint32 flag)
 
void SetDynamicFlags (uint32 flag)
 
TypeID GetTypeId () const
 
bool isType (uint16 mask) const
 
virtual void BuildCreateUpdateBlockForPlayer (UpdateData *data, Player *target) const
 
void SendUpdateToPlayer (Player *player)
 
void BuildValuesUpdateBlockForPlayer (UpdateData *data, Player const *target) const
 
void BuildValuesUpdateBlockForPlayerWithFlag (UpdateData *data, UF::UpdateFieldFlag flags, Player const *target) const
 
void BuildDestroyUpdateBlock (UpdateData *data) const
 
void BuildOutOfRangeUpdateBlock (UpdateData *data) const
 
ByteBuffer PrepareValuesUpdateBuffer () const
 
virtual void DestroyForPlayer (Player *target) const
 
virtual void ClearUpdateMask (bool remove)
 
virtual std::string GetNameForLocaleIdx (LocaleConstant locale) const =0
 
virtual bool hasQuest (uint32) const
 
virtual bool hasInvolvedQuest (uint32) const
 
void SetIsNewObject (bool enable)
 
virtual void BuildUpdate (UpdateDataMapType &)
 
void BuildFieldsUpdate (Player *, UpdateDataMapType &) const
 
bool IsPlayer () const
 
PlayerToPlayer ()
 
Player const * ToPlayer () const
 
bool IsCreature () const
 
CreatureToCreature ()
 
Creature const * ToCreature () const
 
bool IsUnit () const
 
UnitToUnit ()
 
Unit const * ToUnit () const
 
bool IsGameObject () const
 
GameObjectToGameObject ()
 
GameObject const * ToGameObject () const
 
bool IsCorpse () const
 
CorpseToCorpse ()
 
Corpse const * ToCorpse () const
 
bool IsDynObject () const
 
DynamicObjectToDynObject ()
 
DynamicObject const * ToDynObject () const
 
bool IsAreaTrigger () const
 
AreaTriggerToAreaTrigger ()
 
AreaTrigger const * ToAreaTrigger () const
 
bool IsConversation () const
 
ConversationToConversation ()
 
Conversation const * ToConversation () const
 
template<typename T >
void ForceUpdateFieldChange (UF::UpdateFieldSetter< T > const &)
 
virtual void BuildValuesUpdateWithFlag (ByteBuffer *data, UF::UpdateFieldFlag flags, Player const *target) const
 

Public Attributes

UF::UpdateFieldHolder m_values
 
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECTm_objectData
 

Protected Member Functions

 Object ()
 
void _Create (ObjectGuid const &guid)
 
template<typename T >
void SetUpdateFieldValue (UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
 
template<typename T >
void SetUpdateFieldFlagValue (UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type flag)
 
template<typename T >
void RemoveUpdateFieldFlagValue (UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type flag)
 
template<typename T >
UF::DynamicUpdateFieldSetter< T >::insert_result AddDynamicUpdateFieldValue (UF::DynamicUpdateFieldSetter< T > setter)
 
template<typename T >
UF::DynamicUpdateFieldSetter< T >::insert_result InsertDynamicUpdateFieldValue (UF::DynamicUpdateFieldSetter< T > setter, uint32 index)
 
template<typename T >
void RemoveDynamicUpdateFieldValue (UF::DynamicUpdateFieldSetter< T > setter, uint32 index)
 
template<typename T >
void ClearDynamicUpdateFieldValues (UF::DynamicUpdateFieldSetter< T > setter)
 
template<typename T >
void RemoveOptionalUpdateFieldValue (UF::OptionalUpdateFieldSetter< T > setter)
 
template<typename T >
void SetUpdateFieldStatValue (UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
 
template<typename T >
void ApplyModUpdateFieldValue (UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type mod, bool apply)
 
template<typename T >
void ApplyPercentModUpdateFieldValue (UF::UpdateFieldSetter< T > setter, float percent, bool apply)
 
template<typename Action >
void DoWithSuppressingObjectUpdates (Action &&action)
 
void BuildMovementUpdate (ByteBuffer *data, CreateObjectBits flags) const
 
virtual UF::UpdateFieldFlag GetUpdateFieldFlagsFor (Player const *target) const
 
virtual void BuildValuesCreate (ByteBuffer *data, Player const *target) const =0
 
virtual void BuildValuesUpdate (ByteBuffer *data, Player const *target) const =0
 
virtual void AddToObjectUpdate ()=0
 
virtual void RemoveFromObjectUpdate ()=0
 
void AddToObjectUpdateIfNeeded ()
 

Protected Attributes

uint16 m_objectType
 
TypeID m_objectTypeId
 
CreateObjectBits m_updateFlag
 
bool m_objectUpdated
 

Private Member Functions

 Object (Object const &right)=delete
 
Objectoperator= (Object const &right)=delete
 

Private Attributes

ObjectGuid m_guid
 
bool m_inWorld
 
bool m_isNewObject
 

Constructor & Destructor Documentation

◆ ~Object()

Object::~Object ( )
virtual
92 {
93  if (IsInWorld())
94  {
95  TC_LOG_FATAL("misc", "Object::~Object %s deleted but still in world!!", GetGUID().ToString().c_str());
96  if (isType(TYPEMASK_ITEM))
97  TC_LOG_FATAL("misc", "Item slot %u", ((Item*)this)->GetSlot());
98  ABORT();
99  }
100 
101  if (m_objectUpdated)
102  {
103  TC_LOG_FATAL("misc", "Object::~Object %s deleted but still in update list!!", GetGUID().ToString().c_str());
104  ABORT();
105  }
106 }
bool m_objectUpdated
Definition: Object.h:361
Definition: ObjectGuid.h:55
bool IsInWorld() const
Definition: Object.h:149
ObjectGuid const & GetGUID() const
Definition: Object.h:154
#define TC_LOG_FATAL(filterType__,...)
Definition: Log.h:189
string ToString(int i)
Definition: strutil.h:491
Definition: Item.h:169
bool isType(uint16 mask) const
Definition: Object.h:168
#define ABORT
Definition: Errors.h:60
+ Here is the call graph for this function:

◆ Object() [1/2]

Object::Object ( )
protected
65  : m_values(this)
66 {
70 
71  m_inWorld = false;
72  m_isNewObject = false;
73  m_objectUpdated = false;
74 }
bool m_objectUpdated
Definition: Object.h:361
bool m_inWorld
Definition: Object.h:365
CreateObjectBits m_updateFlag
Definition: Object.h:355
Definition: ObjectGuid.h:54
uint16 m_objectType
Definition: Object.h:352
TypeID m_objectTypeId
Definition: Object.h:354
Definition: ObjectGuid.h:34
void Clear()
Definition: Object.h:97
bool m_isNewObject
Definition: Object.h:366
UF::UpdateFieldHolder m_values
Definition: Object.h:223
+ Here is the call graph for this function:

◆ Object() [2/2]

Object::Object ( Object const &  right)
privatedelete

Member Function Documentation

◆ _Create()

void Object::_Create ( ObjectGuid const &  guid)
protected
109 {
110  m_objectUpdated = false;
111  m_guid = guid;
112 }
bool m_objectUpdated
Definition: Object.h:361
ObjectGuid m_guid
Definition: Object.h:364
+ Here is the caller graph for this function:

◆ AddDynamicFlag()

void Object::AddDynamicFlag ( uint32  flag)
inline
void SetUpdateFieldFlagValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type flag)
Definition: Object.h:245
MutableFieldReference< T, false > ModifyValue(UpdateField< T, BlockBit, Bit >(Derived::*field))
Definition: UpdateField.h:657
UpdateField< uint32, 0, 2 > DynamicFlags
Definition: UpdateFields.h:50
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECT > m_objectData
Definition: Object.h:224
UF::UpdateFieldHolder m_values
Definition: Object.h:223
+ Here is the caller graph for this function:

◆ AddDynamicUpdateFieldValue()

template<typename T >
UF::DynamicUpdateFieldSetter<T>::insert_result Object::AddDynamicUpdateFieldValue ( UF::DynamicUpdateFieldSetter< T >  setter)
inlineprotected
260  {
262  return UF::AddDynamicUpdateFieldValue(setter);
263  }
void AddToObjectUpdateIfNeeded()
Definition: Object.cpp:784
DynamicUpdateFieldSetter< T >::insert_result AddDynamicUpdateFieldValue(DynamicUpdateFieldSetter< T > &setter)
Definition: Object.h:112
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddToObjectUpdate()

virtual void Object::AddToObjectUpdate ( )
protectedpure virtual

Implemented in WorldObject, and Item.

+ Here is the caller graph for this function:

◆ AddToObjectUpdateIfNeeded()

void Object::AddToObjectUpdateIfNeeded ( )
protected
785 {
786  if (m_inWorld && !m_objectUpdated)
787  {
789  m_objectUpdated = true;
790  }
791 }
bool m_objectUpdated
Definition: Object.h:361
bool m_inWorld
Definition: Object.h:365
virtual void AddToObjectUpdate()=0
+ Here is the call graph for this function:

◆ AddToWorld()

void Object::AddToWorld ( )
virtual

Reimplemented in Player, Unit, WorldObject, GameObject, Creature, Corpse, AreaTrigger, Pet, DynamicObject, Conversation, and Bag.

115 {
116  if (m_inWorld)
117  return;
118 
119  m_inWorld = true;
120 
121  // synchronize values mirror with values array (changes will send in updatecreate opcode any way
123  ClearUpdateMask(false);
124 }
bool m_objectUpdated
Definition: Object.h:361
virtual void ClearUpdateMask(bool remove)
Definition: Object.cpp:793
bool m_inWorld
Definition: Object.h:365
#define ASSERT
Definition: Errors.h:57
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ApplyModUpdateFieldValue()

template<typename T >
void Object::ApplyModUpdateFieldValue ( UF::UpdateFieldSetter< T >  setter,
typename UF::UpdateFieldSetter< T >::value_type  mod,
bool  apply 
)
inlineprotected
303  {
304  static_assert(std::is_arithmetic<T>::value, "SetUpdateFieldStatValue must be used with arithmetic types");
305 
306  T value = setter.GetValue();
307  if (apply)
308  value += mod;
309  else
310  value -= mod;
311 
312  SetUpdateFieldValue(setter, value);
313  }
T GetValue() const
Definition: UpdateField.h:99
R apply(R(*func)(Ts...), apply_tuple_type< Ts... > &&args)
Definition: advstd.h:37
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:238
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ApplyPercentModUpdateFieldValue()

template<typename T >
void Object::ApplyPercentModUpdateFieldValue ( UF::UpdateFieldSetter< T >  setter,
float  percent,
bool  apply 
)
inlineprotected
317  {
318  static_assert(std::is_arithmetic<T>::value, "SetUpdateFieldStatValue must be used with arithmetic types");
319 
320  T value = setter.GetValue();
321 
322  // don't want to include Util.h here
323  //ApplyPercentModFloatVar(value, percent, apply);
324  if (percent == -100.0f)
325  percent = -99.99f;
326  value *= (apply ? (100.0f + percent) / 100.0f : 100.0f / (100.0f + percent));
327 
328  SetUpdateFieldValue(setter, value);
329  }
T GetValue() const
Definition: UpdateField.h:99
R apply(R(*func)(Ts...), apply_tuple_type< Ts... > &&args)
Definition: advstd.h:37
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:238
+ Here is the call graph for this function:

◆ BuildCreateUpdateBlockForPlayer()

void Object::BuildCreateUpdateBlockForPlayer ( UpdateData data,
Player target 
) const
virtual

lower flag1

Reimplemented in Player, and Bag.

138 {
139  if (!target)
140  return;
141 
142  uint8 updateType = UPDATETYPE_CREATE_OBJECT;
143  uint8 objectType = m_objectTypeId;
144  uint16 objectTypeMask = m_objectType;
146 
148  if (target == this) // building packet for yourself
149  {
150  flags.ThisIsYou = true;
151  flags.ActivePlayer = true;
152  objectType = TYPEID_ACTIVE_PLAYER;
153  objectTypeMask |= TYPEMASK_ACTIVE_PLAYER;
154  }
155 
156  switch (GetGUID().GetHigh())
157  {
158  case HighGuid::Player:
159  case HighGuid::Pet:
160  case HighGuid::Corpse:
164  updateType = UPDATETYPE_CREATE_OBJECT2;
165  break;
166  case HighGuid::Creature:
167  case HighGuid::Vehicle:
168  {
169  if (TempSummon const* summon = ToUnit()->ToTempSummon())
170  if (summon->GetSummonerGUID().IsPlayer())
171  updateType = UPDATETYPE_CREATE_OBJECT2;
172 
173  break;
174  }
176  {
178  updateType = UPDATETYPE_CREATE_OBJECT2;
179  break;
180  }
181  default:
182  break;
183  }
184 
185  if (WorldObject const* worldObject = dynamic_cast<WorldObject const*>(this))
186  {
187  if (!flags.MovementUpdate && !worldObject->m_movementInfo.transport.guid.IsEmpty())
188  flags.MovementTransport = true;
189 
190  if (worldObject->GetAIAnimKitId() || worldObject->GetMovementAnimKitId() || worldObject->GetMeleeAnimKitId())
191  flags.AnimKit = true;
192  }
193 
194  if (flags.Stationary)
195  {
196  // UPDATETYPE_CREATE_OBJECT2 for some gameobject types...
198  {
199  switch (ToGameObject()->GetGoType())
200  {
205  updateType = UPDATETYPE_CREATE_OBJECT2;
206  break;
207  default:
208  break;
209  }
210  }
211  }
212 
213  if (Unit const* unit = ToUnit())
214  if (unit->GetVictim())
215  flags.CombatVictim = true;
216 
217  ByteBuffer buf(0x400, ByteBuffer::Reserve{});
218  buf << uint8(updateType);
219  buf << GetGUID();
220  buf << uint8(objectType);
221 
222  BuildMovementUpdate(&buf, flags);
223  BuildValuesCreate(&buf, target);
224  data->AddUpdateBlock(buf);
225 }
Definition: UpdateData.h:32
Definition: ByteBuffer.h:53
Definition: TemporarySummon.h:43
Definition: Object.h:76
void AddUpdateBlock(ByteBuffer const &block)
Definition: UpdateData.cpp:40
virtual void BuildValuesCreate(ByteBuffer *data, Player const *target) const =0
CreateObjectBits m_updateFlag
Definition: Object.h:355
ObjectGuid GetOwnerGUID() const override
Definition: GameObject.h:143
Definition: ObjectGuid.h:41
bool MovementUpdate
Definition: Object.h:81
Definition: UpdateData.h:31
Definition: SharedDefines.h:2642
Definition: Object.h:410
uint16 m_objectType
Definition: Object.h:352
GameObject * ToGameObject()
Definition: Object.h:204
Definition: ByteBuffer.h:66
Definition: SharedDefines.h:2632
bool MovementTransport
Definition: Object.h:82
ObjectGuid const & GetGUID() const
Definition: Object.h:154
Definition: ObjectGuid.h:62
TypeID m_objectTypeId
Definition: Object.h:354
void BuildMovementUpdate(ByteBuffer *data, CreateObjectBits flags) const
Definition: Object.cpp:288
GameobjectTypes GetGoType() const
Definition: GameObject.h:177
bool CombatVictim
Definition: Object.h:84
bool ActivePlayer
Definition: Object.h:94
bool isType(uint16 mask) const
Definition: Object.h:168
Definition: SharedDefines.h:2640
uint16_t uint16
Definition: Define.h:153
bool AnimKit
Definition: Object.h:87
Definition: ObjectGuid.h:61
bool IsPlayer() const
Definition: ObjectGuid.h:306
uint8_t uint8
Definition: Define.h:154
uint8 flags
Definition: DisableMgr.cpp:47
bool Stationary
Definition: Object.h:83
bool ThisIsYou
Definition: Object.h:92
Definition: Unit.h:736
Definition: SharedDefines.h:2622
Unit * ToUnit()
Definition: Object.h:200
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildDestroyUpdateBlock()

void Object::BuildDestroyUpdateBlock ( UpdateData data) const
260 {
261  data->AddDestroyObject(GetGUID());
262 }
void AddDestroyObject(ObjectGuid guid)
Definition: UpdateData.cpp:25
ObjectGuid const & GetGUID() const
Definition: Object.h:154
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildFieldsUpdate()

void Object::BuildFieldsUpdate ( Player player,
UpdateDataMapType data_map 
) const
806 {
807  UpdateDataMapType::iterator iter = data_map.find(player);
808 
809  if (iter == data_map.end())
810  {
811  std::pair<UpdateDataMapType::iterator, bool> p = data_map.emplace(player, UpdateData(player->GetMapId()));
812  ASSERT(p.second);
813  iter = p.first;
814  }
815 
816  BuildValuesUpdateBlockForPlayer(&iter->second, iter->first);
817 }
void BuildValuesUpdateBlockForPlayer(UpdateData *data, Player const *target) const
Definition: Object.cpp:241
Definition: UpdateData.h:36
uint32 GetMapId() const
Definition: Position.h:252
#define ASSERT
Definition: Errors.h:57
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildMovementUpdate()

void Object::BuildMovementUpdate ( ByteBuffer data,
CreateObjectBits  flags 
) const
protected

Use IsTransport() to also handle type 11 (TRANSPORT) Currently grid objects are not updated if there are no nearby players, this causes clients to receive different PathProgress resulting in players seeing the object in a different position

289 {
290  std::vector<uint32> const* PauseTimes = nullptr;
291  uint32 PauseTimesCount = 0;
292  if (GameObject const* go = ToGameObject())
293  {
294  if (go->GetGoType() == GAMEOBJECT_TYPE_TRANSPORT)
295  {
296  PauseTimes = go->GetGOValue()->Transport.StopFrames;
297  PauseTimesCount = PauseTimes->size();
298  }
299  }
300 
301  data->WriteBit(flags.NoBirthAnim);
302  data->WriteBit(flags.EnablePortals);
303  data->WriteBit(flags.PlayHoverAnim);
304  data->WriteBit(flags.MovementUpdate);
305  data->WriteBit(flags.MovementTransport);
306  data->WriteBit(flags.Stationary);
307  data->WriteBit(flags.CombatVictim);
308  data->WriteBit(flags.ServerTime);
309  data->WriteBit(flags.Vehicle);
310  data->WriteBit(flags.AnimKit);
311  data->WriteBit(flags.Rotation);
312  data->WriteBit(flags.AreaTrigger);
313  data->WriteBit(flags.GameObject);
314  data->WriteBit(flags.SmoothPhasing);
315  data->WriteBit(flags.ThisIsYou);
316  data->WriteBit(flags.SceneObject);
317  data->WriteBit(flags.ActivePlayer);
318  data->WriteBit(flags.Conversation);
319  data->FlushBits();
320 
321  if (flags.MovementUpdate)
322  {
323  Unit const* unit = ToUnit();
324  bool HasFallDirection = unit->HasUnitMovementFlag(MOVEMENTFLAG_FALLING);
325  bool HasFall = HasFallDirection || unit->m_movementInfo.jump.fallTime != 0;
326  bool HasSpline = unit->IsSplineEnabled();
327 
328  *data << GetGUID(); // MoverGUID
329 
330  *data << uint32(unit->m_movementInfo.time); // MoveTime
331  *data << float(unit->GetPositionX());
332  *data << float(unit->GetPositionY());
333  *data << float(unit->GetPositionZ());
334  *data << float(unit->GetOrientation());
335 
336  *data << float(unit->m_movementInfo.pitch); // Pitch
337  *data << float(unit->m_movementInfo.splineElevation); // StepUpStartElevation
338 
339  *data << uint32(0); // RemoveForcesIDs.size()
340  *data << uint32(0); // MoveIndex
341 
342  //for (std::size_t i = 0; i < RemoveForcesIDs.size(); ++i)
343  // *data << ObjectGuid(RemoveForcesIDs);
344 
345  data->WriteBits(unit->GetUnitMovementFlags(), 30);
346  data->WriteBits(unit->GetExtraUnitMovementFlags(), 18);
347  data->WriteBit(!unit->m_movementInfo.transport.guid.IsEmpty()); // HasTransport
348  data->WriteBit(HasFall); // HasFall
349  data->WriteBit(HasSpline); // HasSpline - marks that the unit uses spline movement
350  data->WriteBit(false); // HeightChangeFailed
351  data->WriteBit(false); // RemoteTimeValid
352 
353  if (!unit->m_movementInfo.transport.guid.IsEmpty())
354  *data << unit->m_movementInfo.transport;
355 
356  if (HasFall)
357  {
358  *data << uint32(unit->m_movementInfo.jump.fallTime); // Time
359  *data << float(unit->m_movementInfo.jump.zspeed); // JumpVelocity
360 
361  if (data->WriteBit(HasFallDirection))
362  {
363  *data << float(unit->m_movementInfo.jump.sinAngle); // Direction
364  *data << float(unit->m_movementInfo.jump.cosAngle);
365  *data << float(unit->m_movementInfo.jump.xyspeed); // Speed
366  }
367  }
368 
369  *data << float(unit->GetSpeed(MOVE_WALK));
370  *data << float(unit->GetSpeed(MOVE_RUN));
371  *data << float(unit->GetSpeed(MOVE_RUN_BACK));
372  *data << float(unit->GetSpeed(MOVE_SWIM));
373  *data << float(unit->GetSpeed(MOVE_SWIM_BACK));
374  *data << float(unit->GetSpeed(MOVE_FLIGHT));
375  *data << float(unit->GetSpeed(MOVE_FLIGHT_BACK));
376  *data << float(unit->GetSpeed(MOVE_TURN_RATE));
377  *data << float(unit->GetSpeed(MOVE_PITCH_RATE));
378 
379  if (MovementForces const* movementForces = unit->GetMovementForces())
380  {
381  *data << uint32(movementForces->GetForces()->size());
382  *data << float(movementForces->GetModMagnitude()); // MovementForcesModMagnitude
383  }
384  else
385  {
386  *data << uint32(0);
387  *data << float(1.0f); // MovementForcesModMagnitude
388  }
389 
390  data->WriteBit(HasSpline);
391  data->FlushBits();
392 
393  if (MovementForces const* movementForces = unit->GetMovementForces())
394  for (MovementForce const& force : *movementForces->GetForces())
396 
397  if (HasSpline)
399  }
400 
401  *data << uint32(PauseTimesCount);
402 
403  if (flags.Stationary)
404  {
405  WorldObject const* self = static_cast<WorldObject const*>(this);
406  *data << float(self->GetStationaryX());
407  *data << float(self->GetStationaryY());
408  *data << float(self->GetStationaryZ());
409  *data << float(self->GetStationaryO());
410  }
411 
412  if (flags.CombatVictim)
413  *data << ToUnit()->GetVictim()->GetGUID(); // CombatVictim
414 
415  if (flags.ServerTime)
416  {
417  GameObject const* go = ToGameObject();
423  if (go && go->ToTransport()) // ServerTime
424  *data << uint32(go->GetGOValue()->Transport.PathProgress);
425  else
426  *data << uint32(GameTime::GetGameTimeMS());
427  }
428 
429  if (flags.Vehicle)
430  {
431  Unit const* unit = ToUnit();
432  *data << uint32(unit->GetVehicleKit()->GetVehicleInfo()->ID); // RecID
433  *data << float(unit->GetOrientation()); // InitialRawFacing
434  }
435 
436  if (flags.AnimKit)
437  {
438  WorldObject const* self = static_cast<WorldObject const*>(this);
439  *data << uint16(self->GetAIAnimKitId()); // AiID
440  *data << uint16(self->GetMovementAnimKitId()); // MovementID
441  *data << uint16(self->GetMeleeAnimKitId()); // MeleeID
442  }
443 
444  if (flags.Rotation)
445  *data << uint64(ToGameObject()->GetPackedWorldRotation()); // Rotation
446 
447  if (PauseTimesCount)
448  data->append(PauseTimes->data(), PauseTimes->size());
449 
450  if (flags.MovementTransport)
451  {
452  WorldObject const* self = static_cast<WorldObject const*>(this);
453  *data << self->m_movementInfo.transport;
454  }
455 
456  if (flags.AreaTrigger)
457  {
458  AreaTrigger const* areaTrigger = ToAreaTrigger();
459  AreaTriggerCreateProperties const* createProperties = areaTrigger->GetCreateProperties();
460  AreaTriggerTemplate const* areaTriggerTemplate = areaTrigger->GetTemplate();
461  AreaTriggerShapeInfo const& shape = areaTrigger->GetShape();
462 
463  *data << uint32(areaTrigger->GetTimeSinceCreated());
464 
465  *data << areaTrigger->GetRollPitchYaw().PositionXYZStream();
466 
467  bool hasAbsoluteOrientation = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_ABSOLUTE_ORIENTATION);
468  bool hasDynamicShape = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_DYNAMIC_SHAPE);
469  bool hasAttached = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_ATTACHED);
470  bool hasFaceMovementDir = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_FACE_MOVEMENT_DIR);
471  bool hasFollowsTerrain = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_FOLLOWS_TERRAIN);
472  bool hasUnk1 = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_UNK1);
473  bool hasTargetRollPitchYaw = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_TARGET_ROLL_PITCH_YAW);
474  bool hasScaleCurveID = createProperties && createProperties->ScaleCurveId != 0;
475  bool hasMorphCurveID = createProperties && createProperties->MorphCurveId != 0;
476  bool hasFacingCurveID = createProperties && createProperties->FacingCurveId != 0;
477  bool hasMoveCurveID = createProperties && createProperties->MoveCurveId != 0;
478  bool hasAnimation = createProperties && createProperties->AnimId;
479  bool hasUnk3 = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_UNK3);
480  bool hasAnimKitID = createProperties && createProperties->AnimKitId;
481  bool hasAnimProgress = false;
482  bool hasAreaTriggerSphere = shape.IsSphere();
483  bool hasAreaTriggerBox = shape.IsBox();
484  bool hasAreaTriggerPolygon = createProperties && shape.IsPolygon();
485  bool hasAreaTriggerCylinder = shape.IsCylinder();
486  bool hasAreaTriggerSpline = areaTrigger->HasSplines();
487  bool hasOrbit = areaTrigger->HasOrbit();
488  bool hasMovementScript = false;
489 
490  data->WriteBit(hasAbsoluteOrientation);
491  data->WriteBit(hasDynamicShape);
492  data->WriteBit(hasAttached);
493  data->WriteBit(hasFaceMovementDir);
494  data->WriteBit(hasFollowsTerrain);
495  data->WriteBit(hasUnk1);
496  data->WriteBit(hasTargetRollPitchYaw);
497  data->WriteBit(hasScaleCurveID);
498  data->WriteBit(hasMorphCurveID);
499  data->WriteBit(hasFacingCurveID);
500  data->WriteBit(hasMoveCurveID);
501  data->WriteBit(hasAnimation);
502  data->WriteBit(hasAnimKitID);
503  data->WriteBit(hasUnk3);
504  data->WriteBit(hasAnimProgress);
505  data->WriteBit(hasAreaTriggerSphere);
506  data->WriteBit(hasAreaTriggerBox);
507  data->WriteBit(hasAreaTriggerPolygon);
508  data->WriteBit(hasAreaTriggerCylinder);
509  data->WriteBit(hasAreaTriggerSpline);
510  data->WriteBit(hasOrbit);
511  data->WriteBit(hasMovementScript);
512 
513  if (hasUnk3)
514  data->WriteBit(false);
515 
516  data->FlushBits();
517 
518  if (hasAreaTriggerSpline)
519  {
520  *data << uint32(areaTrigger->GetTimeToTarget());
521  *data << uint32(areaTrigger->GetElapsedTimeForMovement());
522 
524  }
525 
526  if (hasTargetRollPitchYaw)
527  *data << areaTrigger->GetTargetRollPitchYaw().PositionXYZStream();
528 
529  if (hasScaleCurveID)
530  *data << uint32(createProperties->ScaleCurveId);
531 
532  if (hasMorphCurveID)
533  *data << uint32(createProperties->MorphCurveId);
534 
535  if (hasFacingCurveID)
536  *data << uint32(createProperties->FacingCurveId);
537 
538  if (hasMoveCurveID)
539  *data << uint32(createProperties->MoveCurveId);
540 
541  if (hasAnimation)
542  *data << int32(createProperties->AnimId);
543 
544  if (hasAnimKitID)
545  *data << int32(createProperties->AnimKitId);
546 
547  if (hasAnimProgress)
548  *data << uint32(0);
549 
550  if (hasAreaTriggerSphere)
551  {
552  *data << float(shape.SphereDatas.Radius);
553  *data << float(shape.SphereDatas.RadiusTarget);
554  }
555 
556  if (hasAreaTriggerBox)
557  {
558  *data << float(shape.BoxDatas.Extents[0]);
559  *data << float(shape.BoxDatas.Extents[1]);
560  *data << float(shape.BoxDatas.Extents[2]);
561  *data << float(shape.BoxDatas.ExtentsTarget[0]);
562  *data << float(shape.BoxDatas.ExtentsTarget[1]);
563  *data << float(shape.BoxDatas.ExtentsTarget[2]);
564  }
565 
566  if (hasAreaTriggerPolygon)
567  {
568  *data << int32(createProperties->PolygonVertices.size());
569  *data << int32(createProperties->PolygonVerticesTarget.size());
570  *data << float(shape.PolygonDatas.Height);
571  *data << float(shape.PolygonDatas.HeightTarget);
572 
573  for (TaggedPosition<Position::XY> const& vertice : createProperties->PolygonVertices)
574  *data << vertice;
575 
576  for (TaggedPosition<Position::XY> const& vertice : createProperties->PolygonVerticesTarget)
577  *data << vertice;
578  }
579 
580  if (hasAreaTriggerCylinder)
581  {
582  *data << float(shape.CylinderDatas.Radius);
583  *data << float(shape.CylinderDatas.RadiusTarget);
584  *data << float(shape.CylinderDatas.Height);
585  *data << float(shape.CylinderDatas.HeightTarget);
586  *data << float(shape.CylinderDatas.LocationZOffset);
587  *data << float(shape.CylinderDatas.LocationZOffsetTarget);
588  }
589 
590  //if (hasMovementScript)
591  // *data << *areaTrigger->GetMovementScript(); // AreaTriggerMovementScriptInfo
592 
593  if (hasOrbit)
594  *data << *areaTrigger->GetCircularMovementInfo();
595  }
596 
597  if (flags.GameObject)
598  {
599  bool bit8 = false;
600  uint32 Int1 = 0;
601 
602  GameObject const* gameObject = ToGameObject();
603 
604  *data << uint32(gameObject->GetWorldEffectID());
605 
606  data->WriteBit(bit8);
607  data->FlushBits();
608  if (bit8)
609  *data << uint32(Int1);
610  }
611 
612  //if (flags.SmoothPhasing)
613  //{
614  // data->WriteBit(ReplaceActive);
615  // data->WriteBit(StopAnimKits);
616  // data->WriteBit(HasReplaceObject);
617  // data->FlushBits();
618  // if (HasReplaceObject)
619  // *data << ObjectGuid(ReplaceObject);
620  //}
621 
622  //if (flags.SceneObject)
623  //{
624  // data->WriteBit(HasLocalScriptData);
625  // data->WriteBit(HasPetBattleFullUpdate);
626  // data->FlushBits();
627 
628  // if (HasLocalScriptData)
629  // {
630  // data->WriteBits(Data.length(), 7);
631  // data->FlushBits();
632  // data->WriteString(Data);
633  // }
634 
635  // if (HasPetBattleFullUpdate)
636  // {
637  // for (std::size_t i = 0; i < 2; ++i)
638  // {
639  // *data << ObjectGuid(Players[i].CharacterID);
640  // *data << int32(Players[i].TrapAbilityID);
641  // *data << int32(Players[i].TrapStatus);
642  // *data << uint16(Players[i].RoundTimeSecs);
643  // *data << int8(Players[i].FrontPet);
644  // *data << uint8(Players[i].InputFlags);
645 
646  // data->WriteBits(Players[i].Pets.size(), 2);
647  // data->FlushBits();
648  // for (std::size_t j = 0; j < Players[i].Pets.size(); ++j)
649  // {
650  // *data << ObjectGuid(Players[i].Pets[j].BattlePetGUID);
651  // *data << int32(Players[i].Pets[j].SpeciesID);
652  // *data << int32(Players[i].Pets[j].DisplayID);
653  // *data << int32(Players[i].Pets[j].CollarID);
654  // *data << int16(Players[i].Pets[j].Level);
655  // *data << int16(Players[i].Pets[j].Xp);
656  // *data << int32(Players[i].Pets[j].CurHealth);
657  // *data << int32(Players[i].Pets[j].MaxHealth);
658  // *data << int32(Players[i].Pets[j].Power);
659  // *data << int32(Players[i].Pets[j].Speed);
660  // *data << int32(Players[i].Pets[j].NpcTeamMemberID);
661  // *data << uint16(Players[i].Pets[j].BreedQuality);
662  // *data << uint16(Players[i].Pets[j].StatusFlags);
663  // *data << int8(Players[i].Pets[j].Slot);
664 
665  // *data << uint32(Players[i].Pets[j].Abilities.size());
666  // *data << uint32(Players[i].Pets[j].Auras.size());
667  // *data << uint32(Players[i].Pets[j].States.size());
668  // for (std::size_t k = 0; k < Players[i].Pets[j].Abilities.size(); ++k)
669  // {
670  // *data << int32(Players[i].Pets[j].Abilities[k].AbilityID);
671  // *data << int16(Players[i].Pets[j].Abilities[k].CooldownRemaining);
672  // *data << int16(Players[i].Pets[j].Abilities[k].LockdownRemaining);
673  // *data << int8(Players[i].Pets[j].Abilities[k].AbilityIndex);
674  // *data << uint8(Players[i].Pets[j].Abilities[k].Pboid);
675  // }
676 
677  // for (std::size_t k = 0; k < Players[i].Pets[j].Auras.size(); ++k)
678  // {
679  // *data << int32(Players[i].Pets[j].Auras[k].AbilityID);
680  // *data << uint32(Players[i].Pets[j].Auras[k].InstanceID);
681  // *data << int32(Players[i].Pets[j].Auras[k].RoundsRemaining);
682  // *data << int32(Players[i].Pets[j].Auras[k].CurrentRound);
683  // *data << uint8(Players[i].Pets[j].Auras[k].CasterPBOID);
684  // }
685 
686  // for (std::size_t k = 0; k < Players[i].Pets[j].States.size(); ++k)
687  // {
688  // *data << uint32(Players[i].Pets[j].States[k].StateID);
689  // *data << int32(Players[i].Pets[j].States[k].StateValue);
690  // }
691 
692  // data->WriteBits(Players[i].Pets[j].CustomName.length(), 7);
693  // data->FlushBits();
694  // data->WriteString(Players[i].Pets[j].CustomName);
695  // }
696  // }
697 
698  // for (std::size_t i = 0; i < 3; ++i)
699  // {
700  // *data << uint32(Enviros[j].Auras.size());
701  // *data << uint32(Enviros[j].States.size());
702  // for (std::size_t j = 0; j < Enviros[j].Auras.size(); ++j)
703  // {
704  // *data << int32(Enviros[j].Auras[j].AbilityID);
705  // *data << uint32(Enviros[j].Auras[j].InstanceID);
706  // *data << int32(Enviros[j].Auras[j].RoundsRemaining);
707  // *data << int32(Enviros[j].Auras[j].CurrentRound);
708  // *data << uint8(Enviros[j].Auras[j].CasterPBOID);
709  // }
710 
711  // for (std::size_t j = 0; j < Enviros[j].States.size(); ++j)
712  // {
713  // *data << uint32(Enviros[i].States[j].StateID);
714  // *data << int32(Enviros[i].States[j].StateValue);
715  // }
716  // }
717 
718  // *data << uint16(WaitingForFrontPetsMaxSecs);
719  // *data << uint16(PvpMaxRoundTime);
720  // *data << int32(CurRound);
721  // *data << uint32(NpcCreatureID);
722  // *data << uint32(NpcDisplayID);
723  // *data << int8(CurPetBattleState);
724  // *data << uint8(ForfeitPenalty);
725  // *data << ObjectGuid(InitialWildPetGUID);
726  // data->WriteBit(IsPVP);
727  // data->WriteBit(CanAwardXP);
728  // data->FlushBits();
729  // }
730  //}
731 
732  if (flags.ActivePlayer)
733  {
734  bool HasSceneInstanceIDs = false;
735  bool HasRuneState = ToUnit()->GetPowerIndex(POWER_RUNES) != MAX_POWERS;
736 
737  data->WriteBit(HasSceneInstanceIDs);
738  data->WriteBit(HasRuneState);
739  data->FlushBits();
740  //if (HasSceneInstanceIDs)
741  //{
742  // *data << uint32(SceneInstanceIDs.size());
743  // for (std::size_t i = 0; i < SceneInstanceIDs.size(); ++i)
744  // *data << uint32(SceneInstanceIDs[i]);
745  //}
746  if (HasRuneState)
747  {
748  Player const* player = ToPlayer();
749  float baseCd = float(player->GetRuneBaseCooldown());
750  uint32 maxRunes = uint32(player->GetMaxPower(POWER_RUNES));
751 
752  *data << uint8((1 << maxRunes) - 1);
753  *data << uint8(player->GetRunesState());
754  *data << uint32(maxRunes);
755  for (uint32 i = 0; i < maxRunes; ++i)
756  *data << uint8((baseCd - float(player->GetRuneCooldown(i))) / baseCd * 255);
757  }
758  }
759 
760  if (flags.Conversation)
761  {
762  Conversation const* self = ToConversation();
763  if (data->WriteBit(self->GetTextureKitId() != 0))
764  *data << uint32(self->GetTextureKitId());
765 
766  data->FlushBits();
767  }
768 }
Streamer< XYZ > PositionXYZStream()
Definition: Position.h:125
uint8 GetRunesState() const
Definition: Player.cpp:26110
Definition: AreaTriggerTemplate.h:37
Definition: UnitDefines.h:103
Position const & GetTargetRollPitchYaw() const
Definition: AreaTrigger.h:105
AreaTriggerTemplate const * GetTemplate() const
Definition: AreaTrigger.cpp:491
Definition: AreaTriggerTemplate.h:33
struct GameObjectValue::@207 Transport
bool IsSphere() const
Definition: AreaTriggerTemplate.h:122
uint32 GetUnitMovementFlags() const
Definition: Unit.h:1702
Definition: AreaTriggerTemplate.h:35
bool Conversation
Definition: Object.h:95
bool IsSplineEnabled() const
Definition: Unit.cpp:12883
uint32 fallTime
Definition: MovementInfo.h:68
uint32 MorphCurveId
Definition: AreaTriggerTemplate.h:214
bool SceneObject
Definition: Object.h:93
bool HasUnitMovementFlag(uint32 f) const
Definition: Unit.h:1701
Definition: AreaTriggerTemplate.h:38
bool GameObject
Definition: Object.h:90
Definition: AreaTriggerTemplate.h:200
MovementInfo m_movementInfo
Definition: Object.h:658
constexpr auto data(C &c)
Definition: advstd.h:96
struct AreaTriggerShapeInfo::@200::@204 BoxDatas
float cosAngle
Definition: MovementInfo.h:70
Movement::MoveSpline * movespline
Definition: Unit.h:1805
Definition: AreaTriggerTemplate.h:34
uint32 GetRuneCooldown(uint8 index) const
Definition: Player.h:2485
Vehicle * GetVehicleKit() const
Definition: Unit.h:1748
Conversation * ToConversation()
Definition: Object.h:220
Definition: UnitDefines.h:111
bool Rotation
Definition: Object.h:88
std::vector< TaggedPosition< Position::XY > > PolygonVertices
Definition: AreaTriggerTemplate.h:229
bool MovementUpdate
Definition: Object.h:81
uint32 ScaleCurveId
Definition: AreaTriggerTemplate.h:213
struct MovementInfo::JumpInfo jump
float GetOrientation() const
Definition: Position.h:104
VehicleEntry const * GetVehicleInfo() const
Definition: Vehicle.h:49
uint32 GetGameTimeMS()
Definition: GameTime.cpp:44
void FlushBits()
Definition: ByteBuffer.h:147
uint32 GetWorldEffectID() const
Definition: GameObject.h:302
Definition: SharedDefines.h:284
void WriteBits(std::size_t value, int32 bits)
Definition: ByteBuffer.h:195
Definition: Object.h:410
::Movement::Spline< int32 > const & GetSpline() const
Definition: AreaTrigger.h:109
Definition: UnitDefines.h:109
struct AreaTriggerShapeInfo::@200::@206 CylinderDatas
bool ServerTime
Definition: Object.h:85
GameObject * ToGameObject()
Definition: Object.h:204
uint32 GetElapsedTimeForMovement() const
Definition: AreaTrigger.h:110
struct MovementInfo::TransportInfo transport
Definition: MovementInfo.h:124
bool HasFlag(uint32 flag) const
Definition: AreaTriggerTemplate.h:192
int32 AnimKitId
Definition: AreaTriggerTemplate.h:218
bool WriteBit(bool bit)
Definition: ByteBuffer.h:167
Player * ToPlayer()
Definition: Object.h:192
static void WriteMovementForceWithDirection(MovementForce const &movementForce, ByteBuffer &data, Position const *objectPosition=nullptr)
Definition: MovementPackets.cpp:437
uint32 time
Definition: MovementInfo.h:33
float GetPositionY() const
Definition: Position.h:102
Optional< AreaTriggerOrbitInfo > const & GetCircularMovementInfo() const
Definition: AreaTrigger.h:114
static void WriteCreateObjectAreaTriggerSpline(::Movement::Spline< int32 > const &spline, ByteBuffer &data)
Definition: MovementPackets.cpp:431
static void WriteCreateObjectSplineDataBlock(::Movement::MoveSpline const &moveSpline, ByteBuffer &data)
Definition: MovementPackets.cpp:324
bool MovementTransport
Definition: Object.h:82
GameObjectValue const * GetGOValue() const
Definition: GameObject.h:111
ObjectGuid const & GetGUID() const
Definition: Object.h:154
float zspeed
Definition: MovementInfo.h:70
int32 AnimId
Definition: AreaTriggerTemplate.h:217
Definition: UnitDefines.h:104
uint32 ID
Definition: DB2Structure.h:3640
Definition: UnitDefines.h:252
float GetSpeed(UnitMoveType mtype) const
Definition: Unit.cpp:8129
struct AreaTriggerShapeInfo::@200::@203 SphereDatas
uint32 GetTimeToTarget() const
Definition: AreaTrigger.h:82
bool CombatVictim
Definition: Object.h:84
uint32 GetExtraUnitMovementFlags() const
Definition: Unit.h:1708
bool ActivePlayer
Definition: Object.h:94
Definition: UnitDefines.h:106
bool EnablePortals
Definition: Object.h:79
int32_t int32
Definition: Define.h:148
Definition: UnitDefines.h:110
uint32_t uint32
Definition: Define.h:152
uint64_t uint64
Definition: Define.h:151
float pitch
Definition: MovementInfo.h:57
Transport * ToTransport()
Definition: GameObject.h:286
uint16_t uint16
Definition: Define.h:153
Definition: GameObject.h:81
uint32 FacingCurveId
Definition: AreaTriggerTemplate.h:215
float GetPositionZ() const
Definition: Position.h:103
bool Vehicle
Definition: Object.h:86
bool AnimKit
Definition: Object.h:87
uint32 GetRuneBaseCooldown() const
Definition: Player.cpp:26115
float splineElevation
Definition: MovementInfo.h:75
float sinAngle
Definition: MovementInfo.h:70
bool AreaTrigger
Definition: Object.h:89
virtual uint32 GetPowerIndex(Powers power) const =0
bool IsPolygon() const
Definition: AreaTriggerTemplate.h:124
void append(T value)
Definition: ByteBuffer.h:135
Unit * GetVictim() const
Definition: Unit.h:813
Definition: AreaTriggerTemplate.h:186
bool NoBirthAnim
Definition: Object.h:78
std::vector< TaggedPosition< Position::XY > > PolygonVerticesTarget
Definition: AreaTriggerTemplate.h:230
Definition: AreaTriggerTemplate.h:32
float GetPositionX() const
Definition: Position.h:101
bool IsEmpty() const
Definition: ObjectGuid.h:299
bool IsCylinder() const
Definition: AreaTriggerTemplate.h:125
int32 GetMaxPower(Powers power) const
Definition: Unit.cpp:8946
uint32 MoveCurveId
Definition: AreaTriggerTemplate.h:212
Definition: Conversation.h:28
bool HasOrbit() const
Definition: AreaTrigger.cpp:787
MovementForces const * GetMovementForces() const
Definition: Unit.h:1207
Definition: SharedDefines.h:270
bool HasSplines() const
Definition: AreaTrigger.cpp:755
uint8_t uint8
Definition: Define.h:154
AreaTriggerShapeInfo const & GetShape() const
Definition: AreaTrigger.h:102
struct AreaTriggerShapeInfo::@200::@205 PolygonDatas
AreaTriggerCreateProperties const * GetCreateProperties() const
Definition: AreaTrigger.h:91
uint32 PathProgress
Definition: GameObject.h:42
ObjectGuid guid
Definition: MovementInfo.h:48
bool SmoothPhasing
Definition: Object.h:91
uint32 GetTimeSinceCreated() const
Definition: AreaTrigger.h:81
Definition: AreaTriggerTemplate.h:118
Definition: UnitDefines.h:108
Definition: MovementInfo.h:113
bool PlayHoverAnim
Definition: Object.h:80
bool Stationary
Definition: Object.h:83
bool ThisIsYou
Definition: Object.h:92
Definition: AreaTriggerTemplate.h:36
Definition: Unit.h:736
AreaTrigger * ToAreaTrigger()
Definition: Object.h:216
bool IsBox() const
Definition: AreaTriggerTemplate.h:123
Definition: Player.h:1056
Definition: SharedDefines.h:2627
Definition: UnitDefines.h:107
Unit * ToUnit()
Definition: Object.h:200
float xyspeed
Definition: MovementInfo.h:70
Position const & GetRollPitchYaw() const
Definition: AreaTrigger.h:104
Definition: AreaTrigger.h:41
Definition: AreaTriggerTemplate.h:40
Definition: UnitDefines.h:105
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildOutOfRangeUpdateBlock()

void Object::BuildOutOfRangeUpdateBlock ( UpdateData data) const
265 {
266  data->AddOutOfRangeGUID(GetGUID());
267 }
ObjectGuid const & GetGUID() const
Definition: Object.h:154
void AddOutOfRangeGUID(GuidSet &guids)
Definition: UpdateData.cpp:30
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildUpdate()

virtual void Object::BuildUpdate ( UpdateDataMapType )
inlinevirtual

Reimplemented in WorldObject, Item, and Transport.

188 { }
+ Here is the caller graph for this function:

◆ BuildValuesCreate()

virtual void Object::BuildValuesCreate ( ByteBuffer data,
Player const *  target 
) const
protectedpure virtual

Implemented in Player, Unit, Item, GameObject, AzeriteItem, Bag, Corpse, AreaTrigger, AzeriteEmpoweredItem, DynamicObject, and Conversation.

+ Here is the caller graph for this function:

◆ BuildValuesUpdate()

virtual void Object::BuildValuesUpdate ( ByteBuffer data,
Player const *  target 
) const
protectedpure virtual

Implemented in Player, Unit, Item, GameObject, AzeriteItem, Bag, Corpse, AreaTrigger, AzeriteEmpoweredItem, DynamicObject, and Conversation.

+ Here is the caller graph for this function:

◆ BuildValuesUpdateBlockForPlayer()

void Object::BuildValuesUpdateBlockForPlayer ( UpdateData data,
Player const *  target 
) const
242 {
244 
245  BuildValuesUpdate(&buf, target);
246 
247  data->AddUpdateBlock(buf);
248 }
Definition: ByteBuffer.h:53
void AddUpdateBlock(ByteBuffer const &block)
Definition: UpdateData.cpp:40
ByteBuffer PrepareValuesUpdateBuffer() const
Definition: Object.cpp:269
virtual void BuildValuesUpdate(ByteBuffer *data, Player const *target) const =0
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildValuesUpdateBlockForPlayerWithFlag()

void Object::BuildValuesUpdateBlockForPlayerWithFlag ( UpdateData data,
UF::UpdateFieldFlag  flags,
Player const *  target 
) const
251 {
253 
254  BuildValuesUpdateWithFlag(&buf, flags, target);
255 
256  data->AddUpdateBlock(buf);
257 }
virtual void BuildValuesUpdateWithFlag(ByteBuffer *data, UF::UpdateFieldFlag flags, Player const *target) const
Definition: Object.cpp:775
Definition: ByteBuffer.h:53
void AddUpdateBlock(ByteBuffer const &block)
Definition: UpdateData.cpp:40
ByteBuffer PrepareValuesUpdateBuffer() const
Definition: Object.cpp:269
uint8 flags
Definition: DisableMgr.cpp:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildValuesUpdateWithFlag()

void Object::BuildValuesUpdateWithFlag ( ByteBuffer data,
UF::UpdateFieldFlag  flags,
Player const *  target 
) const
virtual

Reimplemented in Player, Unit, Item, and AzeriteItem.

776 {
777  std::size_t sizePos = data->wpos();
778  *data << uint32(0);
779  *data << uint32(0);
780 
781  data->put<uint32>(sizePos, data->wpos() - sizePos - 4);
782 }
size_t wpos() const
Definition: ByteBuffer.h:409
uint32_t uint32
Definition: Define.h:152
void put(std::size_t pos, T value)
Definition: ByteBuffer.h:212
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ClearDynamicUpdateFieldValues()

template<typename T >
void Object::ClearDynamicUpdateFieldValues ( UF::DynamicUpdateFieldSetter< T >  setter)
inlineprotected
281  {
284  }
void AddToObjectUpdateIfNeeded()
Definition: Object.cpp:784
void ClearDynamicUpdateFieldValues(DynamicUpdateFieldSetter< T > &setter)
Definition: Object.h:130
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ClearUpdateMask()

void Object::ClearUpdateMask ( bool  remove)
virtual

Reimplemented in Player, Unit, Item, GameObject, AzeriteItem, Bag, Corpse, AreaTrigger, AzeriteEmpoweredItem, DynamicObject, and Conversation.

794 {
796 
797  if (m_objectUpdated)
798  {
799  if (remove)
801  m_objectUpdated = false;
802  }
803 }
bool m_objectUpdated
Definition: Object.h:361
void ClearChangesMask(UpdateField< T, BlockBit, Bit >(Derived::*field))
Definition: UpdateField.h:664
virtual void RemoveFromObjectUpdate()=0
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECT > m_objectData
Definition: Object.h:224
UF::UpdateFieldHolder m_values
Definition: Object.h:223
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DestroyForPlayer()

void Object::DestroyForPlayer ( Player target) const
virtual

Reimplemented in Player, and Unit.

278 {
279  ASSERT(target);
280 
281  UpdateData updateData(target->GetMapId());
282  BuildDestroyUpdateBlock(&updateData);
283  WorldPacket packet;
284  updateData.BuildPacket(&packet);
285  target->SendDirectMessage(&packet);
286 }
void BuildDestroyUpdateBlock(UpdateData *data) const
Definition: Object.cpp:259
Definition: UpdateData.h:36
void SendDirectMessage(WorldPacket const *data) const
Definition: Player.cpp:6123
uint32 GetMapId() const
Definition: Position.h:252
#define ASSERT
Definition: Errors.h:57
Definition: WorldPacket.h:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoWithSuppressingObjectUpdates()

template<typename Action >
void Object::DoWithSuppressingObjectUpdates ( Action &&  action)
inlineprotected
333  {
334  bool wasUpdatedBeforeAction = m_objectUpdated;
335  action();
336  if (m_objectUpdated && !wasUpdatedBeforeAction)
337  {
339  m_objectUpdated = false;
340  }
341  }
bool m_objectUpdated
Definition: Object.h:361
virtual void RemoveFromObjectUpdate()=0
+ Here is the caller graph for this function:

◆ ForceUpdateFieldChange()

template<typename T >
void Object::ForceUpdateFieldChange ( UF::UpdateFieldSetter< T > const &  )
inline
228  {
230  }
void AddToObjectUpdateIfNeeded()
Definition: Object.cpp:784
+ Here is the caller graph for this function:

◆ GetDynamicFlags()

uint32 Object::GetDynamicFlags ( ) const
inline
161 { return m_objectData->DynamicFlags; }
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECT > m_objectData
Definition: Object.h:224
+ Here is the caller graph for this function:

◆ GetEntry()

uint32 Object::GetEntry ( ) const
inline
155 { return m_objectData->EntryID; }
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECT > m_objectData
Definition: Object.h:224

◆ GetGUID()

ObjectGuid const& Object::GetGUID ( ) const
inline
154 { return m_guid; }
ObjectGuid m_guid
Definition: Object.h:364

◆ GetNameForLocaleIdx()

virtual std::string Object::GetNameForLocaleIdx ( LocaleConstant  locale) const
pure virtual

Implemented in WorldObject, Creature, Item, and GameObject.

◆ GetObjectScale()

float Object::GetObjectScale ( ) const
inline
158 { return m_objectData->Scale; }
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECT > m_objectData
Definition: Object.h:224
+ Here is the caller graph for this function:

◆ GetTypeId()

TypeID Object::GetTypeId ( ) const
inline
167 { return m_objectTypeId; }
TypeID m_objectTypeId
Definition: Object.h:354

◆ GetUpdateFieldFlagsFor()

UF::UpdateFieldFlag Object::GetUpdateFieldFlagsFor ( Player const *  target) const
protectedvirtual

Reimplemented in Player, Unit, and Item.

+ Here is the caller graph for this function:

◆ HasDynamicFlag()

bool Object::HasDynamicFlag ( uint32  flag) const
inline
162 { return (*m_objectData->DynamicFlags & flag) != 0; }
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECT > m_objectData
Definition: Object.h:224
+ Here is the caller graph for this function:

◆ hasInvolvedQuest()

virtual bool Object::hasInvolvedQuest ( uint32  ) const
inlinevirtual

Reimplemented in Item, Creature, and GameObject.

186 { return false; }
+ Here is the caller graph for this function:

◆ hasQuest()

virtual bool Object::hasQuest ( uint32  ) const
inlinevirtual

Reimplemented in Item, Creature, and GameObject.

185 { return false; }
+ Here is the caller graph for this function:

◆ InsertDynamicUpdateFieldValue()

template<typename T >
UF::DynamicUpdateFieldSetter<T>::insert_result Object::InsertDynamicUpdateFieldValue ( UF::DynamicUpdateFieldSetter< T >  setter,
uint32  index 
)
inlineprotected
267  {
269  return UF::InsertDynamicUpdateFieldValue(setter, index);
270  }
void AddToObjectUpdateIfNeeded()
Definition: Object.cpp:784
DynamicUpdateFieldSetter< T >::insert_result InsertDynamicUpdateFieldValue(DynamicUpdateFieldSetter< T > &setter, uint32 index)
Definition: Object.h:118
+ Here is the call graph for this function:

◆ IsAreaTrigger()

bool Object::IsAreaTrigger ( ) const
inline
215 { return GetTypeId() == TYPEID_AREATRIGGER; }
TypeID GetTypeId() const
Definition: Object.h:167
Definition: ObjectGuid.h:45

◆ IsConversation()

bool Object::IsConversation ( ) const
inline
219 { return GetTypeId() == TYPEID_CONVERSATION; }
TypeID GetTypeId() const
Definition: Object.h:167
Definition: ObjectGuid.h:47

◆ IsCorpse()

bool Object::IsCorpse ( ) const
inline
207 { return GetTypeId() == TYPEID_CORPSE; }
TypeID GetTypeId() const
Definition: Object.h:167
Definition: ObjectGuid.h:44

◆ IsCreature()

bool Object::IsCreature ( ) const
inline
195 { return GetTypeId() == TYPEID_UNIT; }
TypeID GetTypeId() const
Definition: Object.h:167
Definition: ObjectGuid.h:39
+ Here is the caller graph for this function:

◆ IsDynObject()

bool Object::IsDynObject ( ) const
inline
211 { return GetTypeId() == TYPEID_DYNAMICOBJECT; }
TypeID GetTypeId() const
Definition: Object.h:167
Definition: ObjectGuid.h:43

◆ IsGameObject()

bool Object::IsGameObject ( ) const
inline
203 { return GetTypeId() == TYPEID_GAMEOBJECT; }
TypeID GetTypeId() const
Definition: Object.h:167
Definition: ObjectGuid.h:42

◆ IsInWorld()

bool Object::IsInWorld ( ) const
inline
149 { return m_inWorld; }
bool m_inWorld
Definition: Object.h:365
+ Here is the caller graph for this function:

◆ IsPlayer()

bool Object::IsPlayer ( ) const
inline
191 { return GetTypeId() == TYPEID_PLAYER; }
TypeID GetTypeId() const
Definition: Object.h:167
Definition: ObjectGuid.h:40
+ Here is the caller graph for this function:

◆ isType()

bool Object::isType ( uint16  mask) const
inline
168 { return (mask & m_objectType) != 0; }
uint16 m_objectType
Definition: Object.h:352
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsUnit()

bool Object::IsUnit ( ) const
inline
199 { return isType(TYPEMASK_UNIT); }
Definition: ObjectGuid.h:59
bool isType(uint16 mask) const
Definition: Object.h:168
+ Here is the caller graph for this function:

◆ operator=()

Object& Object::operator= ( Object const &  right)
privatedelete

◆ PrepareValuesUpdateBuffer()

ByteBuffer Object::PrepareValuesUpdateBuffer ( ) const
270 {
271  ByteBuffer buffer(500, ByteBuffer::Reserve{});
272  buffer << uint8(UPDATETYPE_VALUES);
273  buffer << GetGUID();
274  return buffer;
275 }
Definition: ByteBuffer.h:53
Definition: ByteBuffer.h:66
ObjectGuid const & GetGUID() const
Definition: Object.h:154
uint8_t uint8
Definition: Define.h:154
Definition: UpdateData.h:30
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveDynamicFlag()

void Object::RemoveDynamicFlag ( uint32  flag)
inline
void RemoveUpdateFieldFlagValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type flag)
Definition: Object.h:252
MutableFieldReference< T, false > ModifyValue(UpdateField< T, BlockBit, Bit >(Derived::*field))
Definition: UpdateField.h:657
UpdateField< uint32, 0, 2 > DynamicFlags
Definition: UpdateFields.h:50
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECT > m_objectData
Definition: Object.h:224
UF::UpdateFieldHolder m_values
Definition: Object.h:223
+ Here is the caller graph for this function:

◆ RemoveDynamicUpdateFieldValue()

template<typename T >
void Object::RemoveDynamicUpdateFieldValue ( UF::DynamicUpdateFieldSetter< T >  setter,
uint32  index 
)
inlineprotected
274  {
276  UF::RemoveDynamicUpdateFieldValue(setter, index);
277  }
void AddToObjectUpdateIfNeeded()
Definition: Object.cpp:784
void RemoveDynamicUpdateFieldValue(DynamicUpdateFieldSetter< T > &setter, uint32 index)
Definition: Object.h:124
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveFromObjectUpdate()

virtual void Object::RemoveFromObjectUpdate ( )
protectedpure virtual

Implemented in WorldObject, and Item.

+ Here is the caller graph for this function:

◆ RemoveFromWorld()

void Object::RemoveFromWorld ( )
virtual

Reimplemented in Player, Unit, WorldObject, Puppet, GameObject, Minion, Creature, Corpse, AreaTrigger, TempSummon, Pet, DynamicObject, Conversation, and Bag.

127 {
128  if (!m_inWorld)
129  return;
130 
131  m_inWorld = false;
132 
133  // if we remove from world then sending changes not required
134  ClearUpdateMask(true);
135 }
virtual void ClearUpdateMask(bool remove)
Definition: Object.cpp:793
bool m_inWorld
Definition: Object.h:365
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveOptionalUpdateFieldValue()

template<typename T >
void Object::RemoveOptionalUpdateFieldValue ( UF::OptionalUpdateFieldSetter< T >  setter)
inlineprotected
288  {
291  }
void AddToObjectUpdateIfNeeded()
Definition: Object.cpp:784
void RemoveOptionalUpdateFieldValue(OptionalUpdateFieldSetter< T > &setter)
Definition: Object.h:136
+ Here is the call graph for this function:

◆ RemoveUpdateFieldFlagValue()

template<typename T >
void Object::RemoveUpdateFieldFlagValue ( UF::UpdateFieldSetter< T >  setter,
typename UF::UpdateFieldSetter< T >::value_type  flag 
)
inlineprotected
253  {
254  static_assert(std::is_integral<T>::value, "RemoveUpdateFieldFlagValue must be used with integral types");
255  SetUpdateFieldValue(setter, setter.GetValue() & ~flag);
256  }
T GetValue() const
Definition: UpdateField.h:99
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:238
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendUpdateToPlayer()

void Object::SendUpdateToPlayer ( Player player)
228 {
229  // send create update to player
230  UpdateData upd(player->GetMapId());
231  WorldPacket packet;
232 
233  if (player->HaveAtClient(this))
234  BuildValuesUpdateBlockForPlayer(&upd, player);
235  else
236  BuildCreateUpdateBlockForPlayer(&upd, player);
237  upd.BuildPacket(&packet);
238  player->SendDirectMessage(&packet);
239 }
void BuildValuesUpdateBlockForPlayer(UpdateData *data, Player const *target) const
Definition: Object.cpp:241
bool HaveAtClient(Object const *u) const
Definition: Player.cpp:23770
Definition: UpdateData.h:36
void SendDirectMessage(WorldPacket const *data) const
Definition: Player.cpp:6123
virtual void BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const
Definition: Object.cpp:137
uint32 GetMapId() const
Definition: Position.h:252
Definition: WorldPacket.h:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetDynamicFlags()

void Object::SetDynamicFlags ( uint32  flag)
inline
MutableFieldReference< T, false > ModifyValue(UpdateField< T, BlockBit, Bit >(Derived::*field))
Definition: UpdateField.h:657
UpdateField< uint32, 0, 2 > DynamicFlags
Definition: UpdateFields.h:50
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECT > m_objectData
Definition: Object.h:224
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:238
UF::UpdateFieldHolder m_values
Definition: Object.h:223
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetEntry()

void Object::SetEntry ( uint32  entry)
inline
MutableFieldReference< T, false > ModifyValue(UpdateField< T, BlockBit, Bit >(Derived::*field))
Definition: UpdateField.h:657
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECT > m_objectData
Definition: Object.h:224
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:238
UpdateField< int32, 0, 1 > EntryID
Definition: UpdateFields.h:49
UF::UpdateFieldHolder m_values
Definition: Object.h:223
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetIsNewObject()

void Object::SetIsNewObject ( bool  enable)
inline
187 { m_isNewObject = enable; }
bool m_isNewObject
Definition: Object.h:366

◆ SetObjectScale()

virtual void Object::SetObjectScale ( float  scale)
inlinevirtual

Reimplemented in Player, and Creature.

MutableFieldReference< T, false > ModifyValue(UpdateField< T, BlockBit, Bit >(Derived::*field))
Definition: UpdateField.h:657
UpdateField< float, 0, 3 > Scale
Definition: UpdateFields.h:52
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECT > m_objectData
Definition: Object.h:224
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:238
UF::UpdateFieldHolder m_values
Definition: Object.h:223
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetUpdateFieldFlagValue()

template<typename T >
void Object::SetUpdateFieldFlagValue ( UF::UpdateFieldSetter< T >  setter,
typename UF::UpdateFieldSetter< T >::value_type  flag 
)
inlineprotected
246  {
247  static_assert(std::is_integral<T>::value, "SetUpdateFieldFlagValue must be used with integral types");
248  SetUpdateFieldValue(setter, setter.GetValue() | flag);
249  }
T GetValue() const
Definition: UpdateField.h:99
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:238
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetUpdateFieldStatValue()

template<typename T >
void Object::SetUpdateFieldStatValue ( UF::UpdateFieldSetter< T >  setter,
typename UF::UpdateFieldSetter< T >::value_type  value 
)
inlineprotected
296  {
297  static_assert(std::is_arithmetic<T>::value, "SetUpdateFieldStatValue must be used with arithmetic types");
298  SetUpdateFieldValue(setter, std::max(value, T(0)));
299  }
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:238
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetUpdateFieldValue()

template<typename T >
void Object::SetUpdateFieldValue ( UF::UpdateFieldSetter< T >  setter,
typename UF::UpdateFieldSetter< T >::value_type  value 
)
inlineprotected
239  {
240  if (UF::SetUpdateFieldValue(setter, std::move(value)))
242  }
void AddToObjectUpdateIfNeeded()
Definition: Object.cpp:784
bool SetUpdateFieldValue(UpdateFieldSetter< T > &setter, typename UpdateFieldSetter< T >::value_type &&value)
Definition: Object.h:106
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToAreaTrigger() [1/2]

AreaTrigger* Object::ToAreaTrigger ( )
inline
216 { if (IsAreaTrigger()) return reinterpret_cast<AreaTrigger*>(this); else return nullptr; }
bool IsAreaTrigger() const
Definition: Object.h:215
Definition: AreaTrigger.h:41
+ Here is the caller graph for this function:

◆ ToAreaTrigger() [2/2]

AreaTrigger const* Object::ToAreaTrigger ( ) const
inline
217 { if (IsAreaTrigger()) return reinterpret_cast<AreaTrigger const*>(this); else return nullptr; }
bool IsAreaTrigger() const
Definition: Object.h:215
Definition: AreaTrigger.h:41

◆ ToConversation() [1/2]

Conversation* Object::ToConversation ( )
inline
220 { if (GetTypeId() == TYPEID_CONVERSATION) return reinterpret_cast<Conversation*>(this); else return nullptr; }
TypeID GetTypeId() const
Definition: Object.h:167
Definition: ObjectGuid.h:47
Definition: Conversation.h:28
+ Here is the caller graph for this function:

◆ ToConversation() [2/2]

Conversation const* Object::ToConversation ( ) const
inline
221 { if (GetTypeId() == TYPEID_CONVERSATION) return reinterpret_cast<Conversation const*>(this); else return nullptr; }
TypeID GetTypeId() const
Definition: Object.h:167
Definition: ObjectGuid.h:47
Definition: Conversation.h:28

◆ ToCorpse() [1/2]

Corpse* Object::ToCorpse ( )
inline
208 { if (IsCorpse()) return reinterpret_cast<Corpse*>(this); else return nullptr; }
Definition: Corpse.h:50
bool IsCorpse() const
Definition: Object.h:207
+ Here is the caller graph for this function:

◆ ToCorpse() [2/2]

Corpse const* Object::ToCorpse ( ) const
inline
209 { if (IsCorpse()) return reinterpret_cast<Corpse const*>(this); else return nullptr; }
Definition: Corpse.h:50
bool IsCorpse() const
Definition: Object.h:207

◆ ToCreature() [1/2]

Creature* Object::ToCreature ( )
inline
196 { if (IsCreature()) return reinterpret_cast<Creature*>(this); else return nullptr; }
Definition: Creature.h:61
bool IsCreature() const
Definition: Object.h:195

◆ ToCreature() [2/2]

Creature const* Object::ToCreature ( ) const
inline
197 { if (IsCreature()) return reinterpret_cast<Creature const*>(this); else return nullptr; }
Definition: Creature.h:61
bool IsCreature() const
Definition: Object.h:195

◆ ToDynObject() [1/2]

DynamicObject* Object::ToDynObject ( )
inline
212 { if (IsDynObject()) return reinterpret_cast<DynamicObject*>(this); else return nullptr; }
bool IsDynObject() const
Definition: Object.h:211
Definition: DynamicObject.h:35
+ Here is the caller graph for this function:

◆ ToDynObject() [2/2]

DynamicObject const* Object::ToDynObject ( ) const
inline
213 { if (IsDynObject()) return reinterpret_cast<DynamicObject const*>(this); else return nullptr; }
bool IsDynObject() const
Definition: Object.h:211
Definition: DynamicObject.h:35

◆ ToGameObject() [1/2]

GameObject* Object::ToGameObject ( )
inline
204 { if (IsGameObject()) return reinterpret_cast<GameObject*>(this); else return nullptr; }
Definition: GameObject.h:81
bool IsGameObject() const
Definition: Object.h:203
+ Here is the caller graph for this function:

◆ ToGameObject() [2/2]

GameObject const* Object::ToGameObject ( ) const
inline
205 { if (IsGameObject()) return reinterpret_cast<GameObject const*>(this); else return nullptr; }
Definition: GameObject.h:81
bool IsGameObject() const
Definition: Object.h:203

◆ ToPlayer() [1/2]

Player* Object::ToPlayer ( )
inline
192 { if (IsPlayer()) return reinterpret_cast<Player*>(this); else return nullptr; }
bool IsPlayer() const
Definition: Object.h:191
Definition: Player.h:1056

◆ ToPlayer() [2/2]

Player const* Object::ToPlayer ( ) const
inline
193 { if (IsPlayer()) return reinterpret_cast<Player const*>(this); else return nullptr; }
bool IsPlayer() const
Definition: Object.h:191
Definition: Player.h:1056

◆ ToUnit() [1/2]

Unit* Object::ToUnit ( )
inline
200 { if (IsUnit()) return reinterpret_cast<Unit*>(this); else return nullptr; }
bool IsUnit() const
Definition: Object.h:199
Definition: Unit.h:736

◆ ToUnit() [2/2]

Unit const* Object::ToUnit ( ) const
inline
201 { if (IsUnit()) return reinterpret_cast<Unit const*>(this); else return nullptr; }
bool IsUnit() const
Definition: Object.h:199
Definition: Unit.h:736

Member Data Documentation

◆ m_guid

ObjectGuid Object::m_guid
private

◆ m_inWorld

bool Object::m_inWorld
private

◆ m_isNewObject

bool Object::m_isNewObject
private

◆ m_objectData

UF::UpdateField<UF::ObjectData, 0, TYPEID_OBJECT> Object::m_objectData

◆ m_objectType

uint16 Object::m_objectType
protected

◆ m_objectTypeId

TypeID Object::m_objectTypeId
protected

◆ m_objectUpdated

bool Object::m_objectUpdated
protected

◆ m_updateFlag

CreateObjectBits Object::m_updateFlag
protected

◆ m_values

UF::UpdateFieldHolder Object::m_values

The documentation for this class was generated from the following files: