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 SetDynamicFlag (uint32 flag)
 
void RemoveDynamicFlag (uint32 flag)
 
void ReplaceAllDynamicFlags (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
 
void SendOutOfRangeForPlayer (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)
 
bool IsDestroyedObject () const
 
void SetDestroyedObject (bool destroyed)
 
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 IsSceneObject () const
 
SceneObjectToSceneObject ()
 
SceneObject const * ToSceneObject () const
 
bool IsConversation () const
 
ConversationToConversation ()
 
Conversation const * ToConversation () const
 
template<typename T >
void ForceUpdateFieldChange (UF::UpdateFieldSetter< T > const &)
 
virtual std::string GetDebugInfo () const
 
virtual void BuildValuesUpdateWithFlag (ByteBuffer *data, UF::UpdateFieldFlag flags, Player const *target) const
 

Static Public Member Functions

static ObjectGuid GetGUID (Object const *o)
 
static PlayerToPlayer (Object *o)
 
static Player const * ToPlayer (Object const *o)
 
static CreatureToCreature (Object *o)
 
static Creature const * ToCreature (Object const *o)
 
static UnitToUnit (Object *o)
 
static Unit const * ToUnit (Object const *o)
 
static GameObjectToGameObject (Object *o)
 
static GameObject const * ToGameObject (Object const *o)
 
static CorpseToCorpse (Object *o)
 
static Corpse const * ToCorpse (Object const *o)
 
static DynamicObjectToDynObject (Object *o)
 
static DynamicObject const * ToDynObject (Object const *o)
 
static AreaTriggerToAreaTrigger (Object *o)
 
static AreaTrigger const * ToAreaTrigger (Object const *o)
 
static SceneObjectToSceneObject (Object *o)
 
static SceneObject const * ToSceneObject (Object const *o)
 
static ConversationToConversation (Object *o)
 
static Conversation const * ToConversation (Object const *o)
 

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, Player *target) 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 bool 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
 
 Object (Object &&right)=delete
 
Objectoperator= (Object const &right)=delete
 
Objectoperator= (Object &&right)=delete
 

Private Attributes

ObjectGuid m_guid
 
bool m_inWorld
 
bool m_isNewObject
 
bool m_isDestroyedObject
 

Constructor & Destructor Documentation

◆ ~Object()

Object::~Object ( )
virtual
100 {
101  if (IsInWorld())
102  {
103  TC_LOG_FATAL("misc", "Object::~Object %s deleted but still in world!!", GetGUID().ToString().c_str());
104  if (isType(TYPEMASK_ITEM))
105  TC_LOG_FATAL("misc", "Item slot %u", ((Item*)this)->GetSlot());
106  ABORT();
107  }
108 
109  if (m_objectUpdated)
110  {
111  TC_LOG_FATAL("misc", "Object::~Object %s deleted but still in update list!!", GetGUID().ToString().c_str());
112  ABORT();
113  }
114 }
bool m_objectUpdated
Definition: Object.h:391
Definition: ObjectGuid.h:55
bool IsInWorld() const
Definition: Object.h:151
ObjectGuid const & GetGUID() const
Definition: Object.h:157
#define TC_LOG_FATAL(filterType__,...)
Definition: Log.h:188
string ToString(int i)
Definition: strutil.h:491
Definition: Item.h:169
bool isType(uint16 mask) const
Definition: Object.h:171
#define ABORT
Definition: Errors.h:74
+ Here is the call graph for this function:

◆ Object() [1/3]

Object::Object ( )
protected
72  : m_values(this)
73 {
77 
78  m_inWorld = false;
79  m_isNewObject = false;
80  m_isDestroyedObject = false;
81  m_objectUpdated = false;
82 }
bool m_objectUpdated
Definition: Object.h:391
bool m_inWorld
Definition: Object.h:395
CreateObjectBits m_updateFlag
Definition: Object.h:385
Definition: ObjectGuid.h:54
uint16 m_objectType
Definition: Object.h:382
TypeID m_objectTypeId
Definition: Object.h:384
Definition: ObjectGuid.h:34
bool m_isDestroyedObject
Definition: Object.h:397
void Clear()
Definition: Object.h:99
bool m_isNewObject
Definition: Object.h:396
UF::UpdateFieldHolder m_values
Definition: Object.h:251
+ Here is the call graph for this function:

◆ Object() [2/3]

Object::Object ( Object const &  right)
privatedelete

◆ Object() [3/3]

Object::Object ( Object &&  right)
privatedelete

Member Function Documentation

◆ _Create()

void Object::_Create ( ObjectGuid const &  guid)
protected
117 {
118  m_objectUpdated = false;
119  m_guid = guid;
120 }
bool m_objectUpdated
Definition: Object.h:391
ObjectGuid m_guid
Definition: Object.h:394
+ Here is the caller graph for this function:

◆ AddDynamicUpdateFieldValue()

template<typename T >
UF::DynamicUpdateFieldSetter<T>::insert_result Object::AddDynamicUpdateFieldValue ( UF::DynamicUpdateFieldSetter< T >  setter)
inlineprotected
290  {
292  return UF::AddDynamicUpdateFieldValue(setter);
293  }
void AddToObjectUpdateIfNeeded()
Definition: Object.cpp:750
DynamicUpdateFieldSetter< T >::insert_result AddDynamicUpdateFieldValue(DynamicUpdateFieldSetter< T > &setter)
Definition: Object.h:114
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddToObjectUpdate()

virtual bool Object::AddToObjectUpdate ( )
protectedpure virtual

Implemented in WorldObject, and Item.

+ Here is the caller graph for this function:

◆ AddToObjectUpdateIfNeeded()

void Object::AddToObjectUpdateIfNeeded ( )
protected
751 {
752  if (m_inWorld && !m_objectUpdated)
754 }
bool m_objectUpdated
Definition: Object.h:391
bool m_inWorld
Definition: Object.h:395
virtual bool AddToObjectUpdate()=0
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddToWorld()

void Object::AddToWorld ( )
virtual

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

123 {
124  if (m_inWorld)
125  return;
126 
127  m_inWorld = true;
128 
129  // synchronize values mirror with values array (changes will send in updatecreate opcode any way
131  ClearUpdateMask(false);
132 }
bool m_objectUpdated
Definition: Object.h:391
virtual void ClearUpdateMask(bool remove)
Definition: Object.cpp:756
bool m_inWorld
Definition: Object.h:395
#define ASSERT
Definition: Errors.h:68
+ 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
333  {
334  static_assert(std::is_arithmetic<T>::value, "SetUpdateFieldStatValue must be used with arithmetic types");
335 
336  T value = setter.GetValue();
337  if (apply)
338  value += mod;
339  else
340  value -= mod;
341 
342  SetUpdateFieldValue(setter, value);
343  }
T GetValue() const
Definition: UpdateField.h:99
void apply(T *val)
Definition: ByteConverter.h:40
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:268
+ 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
347  {
348  static_assert(std::is_arithmetic<T>::value, "SetUpdateFieldStatValue must be used with arithmetic types");
349 
350  T value = setter.GetValue();
351 
352  // don't want to include Util.h here
353  //ApplyPercentModFloatVar(value, percent, apply);
354  if (percent == -100.0f)
355  percent = -99.99f;
356  value *= (apply ? (100.0f + percent) / 100.0f : 100.0f / (100.0f + percent));
357 
358  SetUpdateFieldValue(setter, value);
359  }
T GetValue() const
Definition: UpdateField.h:99
void apply(T *val)
Definition: ByteConverter.h:40
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:268
+ Here is the call graph for this function:

◆ BuildCreateUpdateBlockForPlayer()

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

Reimplemented in Player, and Bag.

146 {
147  if (!target)
148  return;
149 
151  uint8 objectType = m_objectTypeId;
153 
154  if (target == this) // building packet for yourself
155  {
156  flags.ThisIsYou = true;
157  flags.ActivePlayer = true;
158  objectType = TYPEID_ACTIVE_PLAYER;
159  }
160 
161  if (WorldObject const* worldObject = dynamic_cast<WorldObject const*>(this))
162  {
163  if (!flags.MovementUpdate && !worldObject->m_movementInfo.transport.guid.IsEmpty())
164  flags.MovementTransport = true;
165 
166  if (worldObject->GetAIAnimKitId() || worldObject->GetMovementAnimKitId() || worldObject->GetMeleeAnimKitId())
167  flags.AnimKit = true;
168 
169  if (worldObject->GetSmoothPhasing() && worldObject->GetSmoothPhasing()->GetInfoForSeer(target->GetGUID()))
170  flags.SmoothPhasing = true;
171  }
172 
173  if (Unit const* unit = ToUnit())
174  {
175  flags.PlayHoverAnim = unit->IsPlayingHoverAnim();
176 
177  if (unit->GetVictim())
178  flags.CombatVictim = true;
179  }
180 
181  ByteBuffer buf(0x400, ByteBuffer::Reserve{});
182  buf << uint8(updateType);
183  buf << GetGUID();
184  buf << uint8(objectType);
185 
186  BuildMovementUpdate(&buf, flags, target);
187  BuildValuesCreate(&buf, target);
188  data->AddUpdateBlock(buf);
189 }
Definition: UpdateData.h:32
Definition: ByteBuffer.h:61
Definition: Object.h:78
uint16 flags
Definition: DisableMgr.cpp:49
void BuildMovementUpdate(ByteBuffer *data, CreateObjectBits flags, Player *target) const
Definition: Object.cpp:263
void AddUpdateBlock(ByteBuffer const &block)
Definition: UpdateData.cpp:40
virtual void BuildValuesCreate(ByteBuffer *data, Player const *target) const =0
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:156
CreateObjectBits m_updateFlag
Definition: Object.h:385
Definition: ObjectGuid.h:41
bool MovementUpdate
Definition: Object.h:83
Definition: UpdateData.h:31
Definition: Object.h:430
Definition: ByteBuffer.h:74
bool MovementTransport
Definition: Object.h:84
ObjectGuid const & GetGUID() const
Definition: Object.h:157
TypeID m_objectTypeId
Definition: Object.h:384
bool CombatVictim
Definition: Object.h:86
bool ActivePlayer
Definition: Object.h:96
bool AnimKit
Definition: Object.h:89
uint8_t uint8
Definition: Define.h:145
bool SmoothPhasing
Definition: Object.h:93
bool PlayHoverAnim
Definition: Object.h:82
bool ThisIsYou
Definition: Object.h:94
bool m_isNewObject
Definition: Object.h:396
Definition: Unit.h:746
Unit * ToUnit()
Definition: Object.h:212
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildDestroyUpdateBlock()

void Object::BuildDestroyUpdateBlock ( UpdateData data) const
224 {
225  data->AddDestroyObject(GetGUID());
226 }
void AddDestroyObject(ObjectGuid guid)
Definition: UpdateData.cpp:25
ObjectGuid const & GetGUID() const
Definition: Object.h:157
+ 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
769 {
770  UpdateDataMapType::iterator iter = data_map.find(player);
771 
772  if (iter == data_map.end())
773  {
774  std::pair<UpdateDataMapType::iterator, bool> p = data_map.emplace(player, UpdateData(player->GetMapId()));
775  ASSERT(p.second);
776  iter = p.first;
777  }
778 
779  BuildValuesUpdateBlockForPlayer(&iter->second, iter->first);
780 }
void BuildValuesUpdateBlockForPlayer(UpdateData *data, Player const *target) const
Definition: Object.cpp:205
Definition: UpdateData.h:36
uint32 GetMapId() const
Definition: Position.h:186
#define ASSERT
Definition: Errors.h:68
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildMovementUpdate()

void Object::BuildMovementUpdate ( ByteBuffer data,
CreateObjectBits  flags,
Player target 
) const
protected
264 {
265  std::vector<uint32> const* PauseTimes = nullptr;
266  if (GameObject const* go = ToGameObject())
267  PauseTimes = go->GetPauseTimes();
268 
269  data->WriteBit(flags.NoBirthAnim);
270  data->WriteBit(flags.EnablePortals);
271  data->WriteBit(flags.PlayHoverAnim);
272  data->WriteBit(flags.MovementUpdate);
273  data->WriteBit(flags.MovementTransport);
274  data->WriteBit(flags.Stationary);
275  data->WriteBit(flags.CombatVictim);
276  data->WriteBit(flags.ServerTime);
277  data->WriteBit(flags.Vehicle);
278  data->WriteBit(flags.AnimKit);
279  data->WriteBit(flags.Rotation);
280  data->WriteBit(flags.AreaTrigger);
281  data->WriteBit(flags.GameObject);
282  data->WriteBit(flags.SmoothPhasing);
283  data->WriteBit(flags.ThisIsYou);
284  data->WriteBit(flags.SceneObject);
285  data->WriteBit(flags.ActivePlayer);
286  data->WriteBit(flags.Conversation);
287  data->FlushBits();
288 
289  if (flags.MovementUpdate)
290  {
291  Unit const* unit = ToUnit();
292  bool HasFallDirection = unit->HasUnitMovementFlag(MOVEMENTFLAG_FALLING);
293  bool HasFall = HasFallDirection || unit->m_movementInfo.jump.fallTime != 0;
294  bool HasSpline = unit->IsSplineEnabled();
295  bool HasInertia = unit->m_movementInfo.inertia.has_value();
296 
297  *data << GetGUID(); // MoverGUID
298 
299  *data << uint32(unit->GetUnitMovementFlags());
300  *data << uint32(unit->GetExtraUnitMovementFlags());
301  *data << uint32(unit->GetExtraUnitMovementFlags2());
302 
303  *data << uint32(unit->m_movementInfo.time); // MoveTime
304  *data << float(unit->GetPositionX());
305  *data << float(unit->GetPositionY());
306  *data << float(unit->GetPositionZ());
307  *data << float(unit->GetOrientation());
308 
309  *data << float(unit->m_movementInfo.pitch); // Pitch
310  *data << float(unit->m_movementInfo.splineElevation); // StepUpStartElevation
311 
312  *data << uint32(0); // RemoveForcesIDs.size()
313  *data << uint32(0); // MoveIndex
314 
315  //for (std::size_t i = 0; i < RemoveForcesIDs.size(); ++i)
316  // *data << ObjectGuid(RemoveForcesIDs);
317 
318  data->WriteBit(!unit->m_movementInfo.transport.guid.IsEmpty()); // HasTransport
319  data->WriteBit(HasFall); // HasFall
320  data->WriteBit(HasSpline); // HasSpline - marks that the unit uses spline movement
321  data->WriteBit(false); // HeightChangeFailed
322  data->WriteBit(false); // RemoteTimeValid
323  data->WriteBit(HasInertia); // HasInertia
324 
325  if (!unit->m_movementInfo.transport.guid.IsEmpty())
326  *data << unit->m_movementInfo.transport;
327 
328  if (HasInertia)
329  {
330  *data << unit->m_movementInfo.inertia->guid;
331  *data << unit->m_movementInfo.inertia->force.PositionXYZStream();
332  *data << uint32(unit->m_movementInfo.inertia->lifetime);
333  }
334 
335  if (HasFall)
336  {
337  *data << uint32(unit->m_movementInfo.jump.fallTime); // Time
338  *data << float(unit->m_movementInfo.jump.zspeed); // JumpVelocity
339 
340  if (data->WriteBit(HasFallDirection))
341  {
342  *data << float(unit->m_movementInfo.jump.sinAngle); // Direction
343  *data << float(unit->m_movementInfo.jump.cosAngle);
344  *data << float(unit->m_movementInfo.jump.xyspeed); // Speed
345  }
346  }
347 
348  *data << float(unit->GetSpeed(MOVE_WALK));
349  *data << float(unit->GetSpeed(MOVE_RUN));
350  *data << float(unit->GetSpeed(MOVE_RUN_BACK));
351  *data << float(unit->GetSpeed(MOVE_SWIM));
352  *data << float(unit->GetSpeed(MOVE_SWIM_BACK));
353  *data << float(unit->GetSpeed(MOVE_FLIGHT));
354  *data << float(unit->GetSpeed(MOVE_FLIGHT_BACK));
355  *data << float(unit->GetSpeed(MOVE_TURN_RATE));
356  *data << float(unit->GetSpeed(MOVE_PITCH_RATE));
357 
358  if (MovementForces const* movementForces = unit->GetMovementForces())
359  {
360  *data << uint32(movementForces->GetForces()->size());
361  *data << float(movementForces->GetModMagnitude()); // MovementForcesModMagnitude
362  }
363  else
364  {
365  *data << uint32(0);
366  *data << float(1.0f); // MovementForcesModMagnitude
367  }
368 
369  data->WriteBit(HasSpline);
370  data->FlushBits();
371 
372  if (MovementForces const* movementForces = unit->GetMovementForces())
373  for (MovementForce const& force : *movementForces->GetForces())
375 
376  if (HasSpline)
378  }
379 
380  *data << uint32(PauseTimes ? PauseTimes->size() : 0);
381 
382  if (flags.Stationary)
383  {
384  WorldObject const* self = static_cast<WorldObject const*>(this);
385  *data << float(self->GetStationaryX());
386  *data << float(self->GetStationaryY());
387  *data << float(self->GetStationaryZ());
388  *data << float(self->GetStationaryO());
389  }
390 
391  if (flags.CombatVictim)
392  *data << ToUnit()->GetVictim()->GetGUID(); // CombatVictim
393 
394  if (flags.ServerTime)
395  *data << uint32(GameTime::GetGameTimeMS());
396 
397  if (flags.Vehicle)
398  {
399  Unit const* unit = ToUnit();
400  *data << uint32(unit->GetVehicleKit()->GetVehicleInfo()->ID); // RecID
401  *data << float(unit->GetOrientation()); // InitialRawFacing
402  }
403 
404  if (flags.AnimKit)
405  {
406  WorldObject const* self = static_cast<WorldObject const*>(this);
407  *data << uint16(self->GetAIAnimKitId()); // AiID
408  *data << uint16(self->GetMovementAnimKitId()); // MovementID
409  *data << uint16(self->GetMeleeAnimKitId()); // MeleeID
410  }
411 
412  if (flags.Rotation)
413  *data << uint64(ToGameObject()->GetPackedLocalRotation()); // Rotation
414 
415  if (PauseTimes && !PauseTimes->empty())
416  data->append(PauseTimes->data(), PauseTimes->size());
417 
418  if (flags.MovementTransport)
419  {
420  WorldObject const* self = static_cast<WorldObject const*>(this);
421  *data << self->m_movementInfo.transport;
422  }
423 
424  if (flags.AreaTrigger)
425  {
426  AreaTrigger const* areaTrigger = ToAreaTrigger();
427  AreaTriggerCreateProperties const* createProperties = areaTrigger->GetCreateProperties();
428  AreaTriggerTemplate const* areaTriggerTemplate = areaTrigger->GetTemplate();
429  AreaTriggerShapeInfo const& shape = areaTrigger->GetShape();
430 
431  *data << uint32(areaTrigger->GetTimeSinceCreated());
432 
433  *data << areaTrigger->GetRollPitchYaw().PositionXYZStream();
434 
435  bool hasAbsoluteOrientation = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_ABSOLUTE_ORIENTATION);
436  bool hasDynamicShape = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_DYNAMIC_SHAPE);
437  bool hasAttached = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_ATTACHED);
438  bool hasFaceMovementDir = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_FACE_MOVEMENT_DIR);
439  bool hasFollowsTerrain = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_FOLLOWS_TERRAIN);
440  bool hasUnk1 = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_UNK1);
441  bool hasTargetRollPitchYaw = areaTriggerTemplate && areaTrigger->GetTemplate()->HasFlag(AREATRIGGER_FLAG_HAS_TARGET_ROLL_PITCH_YAW);
442  bool hasScaleCurveID = createProperties && createProperties->ScaleCurveId != 0;
443  bool hasMorphCurveID = createProperties && createProperties->MorphCurveId != 0;
444  bool hasFacingCurveID = createProperties && createProperties->FacingCurveId != 0;
445  bool hasMoveCurveID = createProperties && createProperties->MoveCurveId != 0;
446  bool hasAreaTriggerSphere = shape.IsSphere();
447  bool hasAreaTriggerBox = shape.IsBox();
448  bool hasAreaTriggerPolygon = createProperties && shape.IsPolygon();
449  bool hasAreaTriggerCylinder = shape.IsCylinder();
450  bool hasDisk = shape.IsDisk();
451  bool hasAreaTriggerSpline = areaTrigger->HasSplines();
452  bool hasOrbit = areaTrigger->HasOrbit();
453  bool hasMovementScript = false;
454 
455  data->WriteBit(hasAbsoluteOrientation);
456  data->WriteBit(hasDynamicShape);
457  data->WriteBit(hasAttached);
458  data->WriteBit(hasFaceMovementDir);
459  data->WriteBit(hasFollowsTerrain);
460  data->WriteBit(hasUnk1);
461  data->WriteBit(hasTargetRollPitchYaw);
462  data->WriteBit(hasScaleCurveID);
463  data->WriteBit(hasMorphCurveID);
464  data->WriteBit(hasFacingCurveID);
465  data->WriteBit(hasMoveCurveID);
466  data->WriteBit(hasAreaTriggerSphere);
467  data->WriteBit(hasAreaTriggerBox);
468  data->WriteBit(hasAreaTriggerPolygon);
469  data->WriteBit(hasAreaTriggerCylinder);
470  data->WriteBit(hasDisk);
471  data->WriteBit(hasAreaTriggerSpline);
472  data->WriteBit(hasOrbit);
473  data->WriteBit(hasMovementScript);
474 
475  data->FlushBits();
476 
477  if (hasAreaTriggerSpline)
478  {
479  *data << uint32(areaTrigger->GetTimeToTarget());
480  *data << uint32(areaTrigger->GetElapsedTimeForMovement());
481 
483  }
484 
485  if (hasTargetRollPitchYaw)
486  *data << areaTrigger->GetTargetRollPitchYaw().PositionXYZStream();
487 
488  if (hasScaleCurveID)
489  *data << uint32(createProperties->ScaleCurveId);
490 
491  if (hasMorphCurveID)
492  *data << uint32(createProperties->MorphCurveId);
493 
494  if (hasFacingCurveID)
495  *data << uint32(createProperties->FacingCurveId);
496 
497  if (hasMoveCurveID)
498  *data << uint32(createProperties->MoveCurveId);
499 
500  if (hasAreaTriggerSphere)
501  {
502  *data << float(shape.SphereDatas.Radius);
503  *data << float(shape.SphereDatas.RadiusTarget);
504  }
505 
506  if (hasAreaTriggerBox)
507  {
508  *data << float(shape.BoxDatas.Extents[0]);
509  *data << float(shape.BoxDatas.Extents[1]);
510  *data << float(shape.BoxDatas.Extents[2]);
511  *data << float(shape.BoxDatas.ExtentsTarget[0]);
512  *data << float(shape.BoxDatas.ExtentsTarget[1]);
513  *data << float(shape.BoxDatas.ExtentsTarget[2]);
514  }
515 
516  if (hasAreaTriggerPolygon)
517  {
518  *data << int32(createProperties->PolygonVertices.size());
519  *data << int32(createProperties->PolygonVerticesTarget.size());
520  *data << float(shape.PolygonDatas.Height);
521  *data << float(shape.PolygonDatas.HeightTarget);
522 
523  for (TaggedPosition<Position::XY> const& vertice : createProperties->PolygonVertices)
524  *data << vertice;
525 
526  for (TaggedPosition<Position::XY> const& vertice : createProperties->PolygonVerticesTarget)
527  *data << vertice;
528  }
529 
530  if (hasAreaTriggerCylinder)
531  {
532  *data << float(shape.CylinderDatas.Radius);
533  *data << float(shape.CylinderDatas.RadiusTarget);
534  *data << float(shape.CylinderDatas.Height);
535  *data << float(shape.CylinderDatas.HeightTarget);
536  *data << float(shape.CylinderDatas.LocationZOffset);
537  *data << float(shape.CylinderDatas.LocationZOffsetTarget);
538  }
539 
540  if (hasDisk)
541  {
542  *data << float(shape.DiskDatas.InnerRadius);
543  *data << float(shape.DiskDatas.InnerRadiusTarget);
544  *data << float(shape.DiskDatas.OuterRadius);
545  *data << float(shape.DiskDatas.OuterRadiusTarget);
546  *data << float(shape.DiskDatas.Height);
547  *data << float(shape.DiskDatas.HeightTarget);
548  *data << float(shape.DiskDatas.LocationZOffset);
549  *data << float(shape.DiskDatas.LocationZOffsetTarget);
550  }
551 
552  //if (hasMovementScript)
553  // *data << *areaTrigger->GetMovementScript(); // AreaTriggerMovementScriptInfo
554 
555  if (hasOrbit)
556  *data << *areaTrigger->GetCircularMovementInfo();
557  }
558 
559  if (flags.GameObject)
560  {
561  bool bit8 = false;
562  uint32 Int1 = 0;
563 
564  GameObject const* gameObject = ToGameObject();
565 
566  *data << uint32(gameObject->GetWorldEffectID());
567 
568  data->WriteBit(bit8);
569  data->FlushBits();
570  if (bit8)
571  *data << uint32(Int1);
572  }
573 
574  if (flags.SmoothPhasing)
575  {
576  SmoothPhasingInfo const* smoothPhasingInfo = static_cast<WorldObject const*>(this)->GetSmoothPhasing()->GetInfoForSeer(target->GetGUID());
577  ASSERT(smoothPhasingInfo);
578 
579  data->WriteBit(smoothPhasingInfo->ReplaceActive);
580  data->WriteBit(smoothPhasingInfo->StopAnimKits);
581  data->WriteBit(smoothPhasingInfo->ReplaceObject.has_value());
582  data->FlushBits();
583  if (smoothPhasingInfo->ReplaceObject)
584  *data << *smoothPhasingInfo->ReplaceObject;
585  }
586 
587  if (flags.SceneObject)
588  {
589  data->WriteBit(false); // HasLocalScriptData
590  data->WriteBit(false); // HasPetBattleFullUpdate
591  data->FlushBits();
592 
593  // if (HasLocalScriptData)
594  // {
595  // data->WriteBits(Data.length(), 7);
596  // data->FlushBits();
597  // data->WriteString(Data);
598  // }
599 
600  // if (HasPetBattleFullUpdate)
601  // {
602  // for (std::size_t i = 0; i < 2; ++i)
603  // {
604  // *data << ObjectGuid(Players[i].CharacterID);
605  // *data << int32(Players[i].TrapAbilityID);
606  // *data << int32(Players[i].TrapStatus);
607  // *data << uint16(Players[i].RoundTimeSecs);
608  // *data << int8(Players[i].FrontPet);
609  // *data << uint8(Players[i].InputFlags);
610 
611  // data->WriteBits(Players[i].Pets.size(), 2);
612  // data->FlushBits();
613  // for (std::size_t j = 0; j < Players[i].Pets.size(); ++j)
614  // {
615  // *data << ObjectGuid(Players[i].Pets[j].BattlePetGUID);
616  // *data << int32(Players[i].Pets[j].SpeciesID);
617  // *data << int32(Players[i].Pets[j].CreatureID);
618  // *data << int32(Players[i].Pets[j].DisplayID);
619  // *data << int16(Players[i].Pets[j].Level);
620  // *data << int16(Players[i].Pets[j].Xp);
621  // *data << int32(Players[i].Pets[j].CurHealth);
622  // *data << int32(Players[i].Pets[j].MaxHealth);
623  // *data << int32(Players[i].Pets[j].Power);
624  // *data << int32(Players[i].Pets[j].Speed);
625  // *data << int32(Players[i].Pets[j].NpcTeamMemberID);
626  // *data << uint16(Players[i].Pets[j].BreedQuality);
627  // *data << uint16(Players[i].Pets[j].StatusFlags);
628  // *data << int8(Players[i].Pets[j].Slot);
629 
630  // *data << uint32(Players[i].Pets[j].Abilities.size());
631  // *data << uint32(Players[i].Pets[j].Auras.size());
632  // *data << uint32(Players[i].Pets[j].States.size());
633  // for (std::size_t k = 0; k < Players[i].Pets[j].Abilities.size(); ++k)
634  // {
635  // *data << int32(Players[i].Pets[j].Abilities[k].AbilityID);
636  // *data << int16(Players[i].Pets[j].Abilities[k].CooldownRemaining);
637  // *data << int16(Players[i].Pets[j].Abilities[k].LockdownRemaining);
638  // *data << int8(Players[i].Pets[j].Abilities[k].AbilityIndex);
639  // *data << uint8(Players[i].Pets[j].Abilities[k].Pboid);
640  // }
641 
642  // for (std::size_t k = 0; k < Players[i].Pets[j].Auras.size(); ++k)
643  // {
644  // *data << int32(Players[i].Pets[j].Auras[k].AbilityID);
645  // *data << uint32(Players[i].Pets[j].Auras[k].InstanceID);
646  // *data << int32(Players[i].Pets[j].Auras[k].RoundsRemaining);
647  // *data << int32(Players[i].Pets[j].Auras[k].CurrentRound);
648  // *data << uint8(Players[i].Pets[j].Auras[k].CasterPBOID);
649  // }
650 
651  // for (std::size_t k = 0; k < Players[i].Pets[j].States.size(); ++k)
652  // {
653  // *data << uint32(Players[i].Pets[j].States[k].StateID);
654  // *data << int32(Players[i].Pets[j].States[k].StateValue);
655  // }
656 
657  // data->WriteBits(Players[i].Pets[j].CustomName.length(), 7);
658  // data->FlushBits();
659  // data->WriteString(Players[i].Pets[j].CustomName);
660  // }
661  // }
662 
663  // for (std::size_t i = 0; i < 3; ++i)
664  // {
665  // *data << uint32(Enviros[j].Auras.size());
666  // *data << uint32(Enviros[j].States.size());
667  // for (std::size_t j = 0; j < Enviros[j].Auras.size(); ++j)
668  // {
669  // *data << int32(Enviros[j].Auras[j].AbilityID);
670  // *data << uint32(Enviros[j].Auras[j].InstanceID);
671  // *data << int32(Enviros[j].Auras[j].RoundsRemaining);
672  // *data << int32(Enviros[j].Auras[j].CurrentRound);
673  // *data << uint8(Enviros[j].Auras[j].CasterPBOID);
674  // }
675 
676  // for (std::size_t j = 0; j < Enviros[j].States.size(); ++j)
677  // {
678  // *data << uint32(Enviros[i].States[j].StateID);
679  // *data << int32(Enviros[i].States[j].StateValue);
680  // }
681  // }
682 
683  // *data << uint16(WaitingForFrontPetsMaxSecs);
684  // *data << uint16(PvpMaxRoundTime);
685  // *data << int32(CurRound);
686  // *data << uint32(NpcCreatureID);
687  // *data << uint32(NpcDisplayID);
688  // *data << int8(CurPetBattleState);
689  // *data << uint8(ForfeitPenalty);
690  // *data << ObjectGuid(InitialWildPetGUID);
691  // data->WriteBit(IsPVP);
692  // data->WriteBit(CanAwardXP);
693  // data->FlushBits();
694  // }
695  }
696 
697  if (flags.ActivePlayer)
698  {
699  Player const* player = ToPlayer();
700 
701  bool HasSceneInstanceIDs = !player->GetSceneMgr().GetSceneTemplateByInstanceMap().empty();
702  bool HasRuneState = ToUnit()->GetPowerIndex(POWER_RUNES) != MAX_POWERS;
703 
704  data->WriteBit(HasSceneInstanceIDs);
705  data->WriteBit(HasRuneState);
706  data->FlushBits();
707  if (HasSceneInstanceIDs)
708  {
709  *data << uint32(player->GetSceneMgr().GetSceneTemplateByInstanceMap().size());
710  for (auto const& itr : player->GetSceneMgr().GetSceneTemplateByInstanceMap())
711  *data << uint32(itr.first);
712  }
713  if (HasRuneState)
714  {
715  float baseCd = float(player->GetRuneBaseCooldown());
716  uint32 maxRunes = uint32(player->GetMaxPower(POWER_RUNES));
717 
718  *data << uint8((1 << maxRunes) - 1);
719  *data << uint8(player->GetRunesState());
720  *data << uint32(maxRunes);
721  for (uint32 i = 0; i < maxRunes; ++i)
722  *data << uint8((baseCd - float(player->GetRuneCooldown(i))) / baseCd * 255);
723  }
724  }
725 
726  if (flags.Conversation)
727  {
728  Conversation const* self = ToConversation();
729  if (data->WriteBit(self->GetTextureKitId() != 0))
730  *data << uint32(self->GetTextureKitId());
731 
732  data->FlushBits();
733  }
734 }
Streamer< XYZ > PositionXYZStream()
Definition: Position.h:89
Optional< ObjectGuid > ReplaceObject
Definition: SmoothPhasing.h:29
uint8 GetRunesState() const
Definition: Player.cpp:26422
Definition: AreaTriggerTemplate.h:37
Definition: UnitDefines.h:108
Position const & GetTargetRollPitchYaw() const
Definition: AreaTrigger.h:118
struct AreaTriggerShapeInfo::@199::@206 DiskDatas
AreaTriggerTemplate const * GetTemplate() const
Definition: AreaTrigger.cpp:542
Definition: AreaTriggerTemplate.h:33
bool IsSphere() const
Definition: AreaTriggerTemplate.h:123
uint32 GetUnitMovementFlags() const
Definition: Unit.h:1748
Definition: SmoothPhasing.h:26
Definition: AreaTriggerTemplate.h:35
bool Conversation
Definition: Object.h:97
bool IsSplineEnabled() const
Definition: Unit.cpp:13180
uint32 fallTime
Definition: MovementInfo.h:81
uint32 MorphCurveId
Definition: AreaTriggerTemplate.h:228
bool SceneObject
Definition: Object.h:95
bool HasUnitMovementFlag(uint32 f) const
Definition: Unit.h:1747
Definition: AreaTriggerTemplate.h:38
bool GameObject
Definition: Object.h:92
Definition: AreaTriggerTemplate.h:214
MovementInfo m_movementInfo
Definition: Object.h:690
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:156
float cosAngle
Definition: MovementInfo.h:83
Movement::MoveSpline * movespline
Definition: Unit.h:1857
Definition: AreaTriggerTemplate.h:34
uint32 GetRuneCooldown(uint8 index) const
Definition: Player.h:2612
Vehicle * GetVehicleKit() const
Definition: Unit.h:1800
Conversation * ToConversation()
Definition: Object.h:248
Definition: UnitDefines.h:116
bool Rotation
Definition: Object.h:90
std::vector< TaggedPosition< Position::XY > > PolygonVertices
Definition: AreaTriggerTemplate.h:243
bool MovementUpdate
Definition: Object.h:83
uint32 ScaleCurveId
Definition: AreaTriggerTemplate.h:227
struct MovementInfo::JumpInfo jump
float GetOrientation() const
Definition: Position.h:80
Optional< Inertia > inertia
Definition: MovementInfo.h:70
VehicleEntry const * GetVehicleInfo() const
Definition: Vehicle.h:53
uint32 GetGameTimeMS()
Definition: GameTime.cpp:44
void FlushBits()
Definition: ByteBuffer.h:155
uint32 GetWorldEffectID() const
Definition: GameObject.h:376
Definition: SharedDefines.h:291
Definition: Object.h:430
::Movement::Spline< int32 > const & GetSpline() const
Definition: AreaTrigger.h:122
Definition: UnitDefines.h:114
struct AreaTriggerShapeInfo::@199::@204 PolygonDatas
SceneMgr & GetSceneMgr()
Definition: Player.h:2684
bool ServerTime
Definition: Object.h:87
GameObject * ToGameObject()
Definition: Object.h:218
uint32 GetElapsedTimeForMovement() const
Definition: AreaTrigger.h:123
struct MovementInfo::TransportInfo transport
Definition: MovementInfo.h:149
bool HasFlag(uint32 flag) const
Definition: AreaTriggerTemplate.h:207
bool WriteBit(bool bit)
Definition: ByteBuffer.h:175
Player * ToPlayer()
Definition: Object.h:200
static void WriteMovementForceWithDirection(MovementForce const &movementForce, ByteBuffer &data, Position const *objectPosition=nullptr)
Definition: MovementPackets.cpp:456
uint32 time
Definition: MovementInfo.h:35
float GetPositionY() const
Definition: Position.h:78
Optional< AreaTriggerOrbitInfo > const & GetCircularMovementInfo() const
Definition: AreaTrigger.h:127
static void WriteCreateObjectAreaTriggerSpline(::Movement::Spline< int32 > const &spline, ByteBuffer &data)
Definition: MovementPackets.cpp:450
static void WriteCreateObjectSplineDataBlock(::Movement::MoveSpline const &moveSpline, ByteBuffer &data)
Definition: MovementPackets.cpp:343
bool MovementTransport
Definition: Object.h:84
ObjectGuid const & GetGUID() const
Definition: Object.h:157
float zspeed
Definition: MovementInfo.h:83
Definition: UnitDefines.h:109
uint32 ID
Definition: DB2Structure.h:3930
bool IsDisk() const
Definition: AreaTriggerTemplate.h:127
bool StopAnimKits
Definition: SmoothPhasing.h:31
Definition: UnitDefines.h:348
float GetSpeed(UnitMoveType mtype) const
Definition: Unit.cpp:8242
uint32 GetTimeToTarget() const
Definition: AreaTrigger.h:95
bool CombatVictim
Definition: Object.h:86
uint32 GetExtraUnitMovementFlags() const
Definition: Unit.h:1754
bool ActivePlayer
Definition: Object.h:96
Definition: UnitDefines.h:111
bool EnablePortals
Definition: Object.h:81
int32_t int32
Definition: Define.h:139
Definition: UnitDefines.h:115
uint32_t uint32
Definition: Define.h:143
uint64_t uint64
Definition: Define.h:142
float pitch
Definition: MovementInfo.h:59
uint16_t uint16
Definition: Define.h:144
Definition: GameObject.h:125
uint32 FacingCurveId
Definition: AreaTriggerTemplate.h:229
float GetPositionZ() const
Definition: Position.h:79
bool Vehicle
Definition: Object.h:88
bool AnimKit
Definition: Object.h:89
uint32 GetRuneBaseCooldown() const
Definition: Player.cpp:26427
float splineElevation
Definition: MovementInfo.h:88
float sinAngle
Definition: MovementInfo.h:83
bool AreaTrigger
Definition: Object.h:91
virtual uint32 GetPowerIndex(Powers power) const =0
bool IsPolygon() const
Definition: AreaTriggerTemplate.h:125
void append(T value)
Definition: ByteBuffer.h:143
Unit * GetVictim() const
Definition: Unit.h:833
Definition: AreaTriggerTemplate.h:201
bool NoBirthAnim
Definition: Object.h:80
std::vector< TaggedPosition< Position::XY > > PolygonVerticesTarget
Definition: AreaTriggerTemplate.h:244
Definition: AreaTriggerTemplate.h:32
SceneTemplateByInstance const & GetSceneTemplateByInstanceMap() const
Definition: SceneMgr.h:69
float GetPositionX() const
Definition: Position.h:77
bool IsEmpty() const
Definition: ObjectGuid.h:310
bool IsCylinder() const
Definition: AreaTriggerTemplate.h:126
struct AreaTriggerShapeInfo::@199::@202 SphereDatas
int32 GetMaxPower(Powers power) const
Definition: Unit.cpp:9089
uint32 MoveCurveId
Definition: AreaTriggerTemplate.h:226
Definition: Conversation.h:29
bool HasOrbit() const
Definition: AreaTrigger.cpp:845
MovementForces const * GetMovementForces() const
Definition: Unit.h:1241
uint32 GetExtraUnitMovementFlags2() const
Definition: Unit.h:1760
Definition: SharedDefines.h:277
bool HasSplines() const
Definition: AreaTrigger.cpp:813
uint8_t uint8
Definition: Define.h:145
#define ASSERT
Definition: Errors.h:68
AreaTriggerShapeInfo const & GetShape() const
Definition: AreaTrigger.h:115
AreaTriggerCreateProperties const * GetCreateProperties() const
Definition: AreaTrigger.h:104
bool ReplaceActive
Definition: SmoothPhasing.h:30
ObjectGuid guid
Definition: MovementInfo.h:50
bool SmoothPhasing
Definition: Object.h:93
uint32 GetTimeSinceCreated() const
Definition: AreaTrigger.h:94
Definition: AreaTriggerTemplate.h:119
Definition: UnitDefines.h:113
Definition: MovementInfo.h:138
bool PlayHoverAnim
Definition: Object.h:82
bool Stationary
Definition: Object.h:85
bool ThisIsYou
Definition: Object.h:94
Definition: AreaTriggerTemplate.h:36
Definition: Unit.h:746
AreaTrigger * ToAreaTrigger()
Definition: Object.h:236
struct AreaTriggerShapeInfo::@199::@205 CylinderDatas
bool IsBox() const
Definition: AreaTriggerTemplate.h:124
Definition: Player.h:1131
Definition: UnitDefines.h:112
Unit * ToUnit()
Definition: Object.h:212
float xyspeed
Definition: MovementInfo.h:83
Position const & GetRollPitchYaw() const
Definition: AreaTrigger.h:117
Definition: AreaTrigger.h:42
struct AreaTriggerShapeInfo::@199::@203 BoxDatas
Definition: UnitDefines.h:110
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildOutOfRangeUpdateBlock()

void Object::BuildOutOfRangeUpdateBlock ( UpdateData data) const
229 {
230  data->AddOutOfRangeGUID(GetGUID());
231 }
ObjectGuid const & GetGUID() const
Definition: Object.h:157
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.

194 { }
+ 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, Corpse, Bag, AreaTrigger, AzeriteEmpoweredItem, DynamicObject, SceneObject, 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, Corpse, Bag, AreaTrigger, AzeriteEmpoweredItem, DynamicObject, SceneObject, and Conversation.

+ Here is the caller graph for this function:

◆ BuildValuesUpdateBlockForPlayer()

void Object::BuildValuesUpdateBlockForPlayer ( UpdateData data,
Player const *  target 
) const
206 {
208 
209  BuildValuesUpdate(&buf, target);
210 
211  data->AddUpdateBlock(buf);
212 }
Definition: ByteBuffer.h:61
void AddUpdateBlock(ByteBuffer const &block)
Definition: UpdateData.cpp:40
ByteBuffer PrepareValuesUpdateBuffer() const
Definition: Object.cpp:233
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
215 {
217 
218  BuildValuesUpdateWithFlag(&buf, flags, target);
219 
220  data->AddUpdateBlock(buf);
221 }
virtual void BuildValuesUpdateWithFlag(ByteBuffer *data, UF::UpdateFieldFlag flags, Player const *target) const
Definition: Object.cpp:741
Definition: ByteBuffer.h:61
uint16 flags
Definition: DisableMgr.cpp:49
void AddUpdateBlock(ByteBuffer const &block)
Definition: UpdateData.cpp:40
ByteBuffer PrepareValuesUpdateBuffer() const
Definition: Object.cpp:233
+ 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.

742 {
743  std::size_t sizePos = data->wpos();
744  *data << uint32(0);
745  *data << uint32(0);
746 
747  data->put<uint32>(sizePos, data->wpos() - sizePos - 4);
748 }
size_t wpos() const
Definition: ByteBuffer.h:412
uint32_t uint32
Definition: Define.h:143
void put(std::size_t pos, T value)
Definition: ByteBuffer.h:220
+ 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
311  {
314  }
void AddToObjectUpdateIfNeeded()
Definition: Object.cpp:750
void ClearDynamicUpdateFieldValues(DynamicUpdateFieldSetter< T > &setter)
Definition: Object.h:132
+ 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, Corpse, Bag, AreaTrigger, AzeriteEmpoweredItem, DynamicObject, SceneObject, and Conversation.

757 {
759 
760  if (m_objectUpdated)
761  {
762  if (remove)
764  m_objectUpdated = false;
765  }
766 }
bool m_objectUpdated
Definition: Object.h:391
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:252
UF::UpdateFieldHolder m_values
Definition: Object.h:251
+ 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.

242 {
243  ASSERT(target);
244 
245  UpdateData updateData(target->GetMapId());
246  BuildDestroyUpdateBlock(&updateData);
247  WorldPacket packet;
248  updateData.BuildPacket(&packet);
249  target->SendDirectMessage(&packet);
250 }
void BuildDestroyUpdateBlock(UpdateData *data) const
Definition: Object.cpp:223
Definition: UpdateData.h:36
void SendDirectMessage(WorldPacket const *data) const
Definition: Player.cpp:6174
uint32 GetMapId() const
Definition: Position.h:186
#define ASSERT
Definition: Errors.h:68
Definition: WorldPacket.h:25
+ 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
363  {
364  bool wasUpdatedBeforeAction = m_objectUpdated;
365  action();
366  if (m_objectUpdated && !wasUpdatedBeforeAction)
367  {
369  m_objectUpdated = false;
370  }
371  }
bool m_objectUpdated
Definition: Object.h:391
virtual void RemoveFromObjectUpdate()=0
+ Here is the caller graph for this function:

◆ ForceUpdateFieldChange()

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

◆ GetDebugInfo()

std::string Object::GetDebugInfo ( ) const
virtual

Reimplemented in Player, Unit, WorldObject, Item, GameObject, Creature, Pet, Guardian, Minion, Transport, Bag, and TempSummon.

783 {
784  std::stringstream sstr;
785  sstr << GetGUID().ToString() + " Entry " << GetEntry();
786  return sstr.str();
787 }
std::string ToString() const
Definition: ObjectGuid.cpp:531
ObjectGuid const & GetGUID() const
Definition: Object.h:157
uint32 GetEntry() const
Definition: Object.h:158
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDynamicFlags()

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

◆ GetEntry()

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

◆ GetGUID() [1/2]

static ObjectGuid Object::GetGUID ( Object const *  o)
inlinestatic
156 { return o ? o->GetGUID() : ObjectGuid::Empty; }
static ObjectGuid const Empty
Definition: ObjectGuid.h:265
+ Here is the call graph for this function:

◆ GetGUID() [2/2]

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

◆ GetNameForLocaleIdx()

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

Implemented in WorldObject, Creature, GameObject, and Item.

◆ GetObjectScale()

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

◆ GetTypeId()

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

◆ 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
165 { return (*m_objectData->DynamicFlags & flag) != 0; }
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECT > m_objectData
Definition: Object.h:252
+ Here is the caller graph for this function:

◆ hasInvolvedQuest()

virtual bool Object::hasInvolvedQuest ( uint32  ) const
inlinevirtual

Reimplemented in Item, Creature, and GameObject.

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

◆ hasQuest()

virtual bool Object::hasQuest ( uint32  ) const
inlinevirtual

Reimplemented in Item, Creature, and GameObject.

189 { 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
297  {
299  return UF::InsertDynamicUpdateFieldValue(setter, index);
300  }
void AddToObjectUpdateIfNeeded()
Definition: Object.cpp:750
DynamicUpdateFieldSetter< T >::insert_result InsertDynamicUpdateFieldValue(DynamicUpdateFieldSetter< T > &setter, uint32 index)
Definition: Object.h:120
+ Here is the call graph for this function:

◆ IsAreaTrigger()

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

◆ IsConversation()

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

◆ IsCorpse()

bool Object::IsCorpse ( ) const
inline
221 { return GetTypeId() == TYPEID_CORPSE; }
TypeID GetTypeId() const
Definition: Object.h:170
Definition: ObjectGuid.h:44
+ Here is the caller graph for this function:

◆ IsCreature()

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

◆ IsDestroyedObject()

bool Object::IsDestroyedObject ( ) const
inline
192 { return m_isDestroyedObject; }
bool m_isDestroyedObject
Definition: Object.h:397
+ Here is the caller graph for this function:

◆ IsDynObject()

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

◆ IsGameObject()

bool Object::IsGameObject ( ) const
inline
215 { return GetTypeId() == TYPEID_GAMEOBJECT; }
TypeID GetTypeId() const
Definition: Object.h:170
Definition: ObjectGuid.h:42
+ Here is the caller graph for this function:

◆ IsInWorld()

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

◆ IsPlayer()

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

◆ IsSceneObject()

bool Object::IsSceneObject ( ) const
inline
239 { return GetTypeId() == TYPEID_SCENEOBJECT; }
TypeID GetTypeId() const
Definition: Object.h:170
Definition: ObjectGuid.h:46

◆ isType()

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

◆ IsUnit()

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

◆ operator=() [1/2]

Object& Object::operator= ( Object const &  right)
privatedelete
+ Here is the caller graph for this function:

◆ operator=() [2/2]

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

◆ PrepareValuesUpdateBuffer()

ByteBuffer Object::PrepareValuesUpdateBuffer ( ) const
234 {
235  ByteBuffer buffer(500, ByteBuffer::Reserve{});
236  buffer << uint8(UPDATETYPE_VALUES);
237  buffer << GetGUID();
238  return buffer;
239 }
Definition: ByteBuffer.h:61
Definition: ByteBuffer.h:74
ObjectGuid const & GetGUID() const
Definition: Object.h:157
uint8_t uint8
Definition: Define.h:145
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:282
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:252
UF::UpdateFieldHolder m_values
Definition: Object.h:251
+ Here is the caller graph for this function:

◆ RemoveDynamicUpdateFieldValue()

template<typename T >
void Object::RemoveDynamicUpdateFieldValue ( UF::DynamicUpdateFieldSetter< T >  setter,
uint32  index 
)
inlineprotected
304  {
306  UF::RemoveDynamicUpdateFieldValue(setter, index);
307  }
void AddToObjectUpdateIfNeeded()
Definition: Object.cpp:750
void RemoveDynamicUpdateFieldValue(DynamicUpdateFieldSetter< T > &setter, uint32 index)
Definition: Object.h:126
+ 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, GameObject, Minion, Corpse, Creature, AreaTrigger, DynamicObject, SceneObject, Conversation, TempSummon, Pet, and Bag.

135 {
136  if (!m_inWorld)
137  return;
138 
139  m_inWorld = false;
140 
141  // if we remove from world then sending changes not required
142  ClearUpdateMask(true);
143 }
virtual void ClearUpdateMask(bool remove)
Definition: Object.cpp:756
bool m_inWorld
Definition: Object.h:395
+ 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
318  {
321  }
void AddToObjectUpdateIfNeeded()
Definition: Object.cpp:750
void RemoveOptionalUpdateFieldValue(OptionalUpdateFieldSetter< T > &setter)
Definition: Object.h:138
+ 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
283  {
284  static_assert(std::is_integral<T>::value, "RemoveUpdateFieldFlagValue must be used with integral types");
285  SetUpdateFieldValue(setter, setter.GetValue() & ~flag);
286  }
T GetValue() const
Definition: UpdateField.h:99
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:268
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReplaceAllDynamicFlags()

void Object::ReplaceAllDynamicFlags ( 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:252
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:268
UF::UpdateFieldHolder m_values
Definition: Object.h:251
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendOutOfRangeForPlayer()

void Object::SendOutOfRangeForPlayer ( Player target) const
253 {
254  ASSERT(target);
255 
256  UpdateData updateData(target->GetMapId());
257  BuildOutOfRangeUpdateBlock(&updateData);
258  WorldPacket packet;
259  updateData.BuildPacket(&packet);
260  target->SendDirectMessage(&packet);
261 }
void BuildOutOfRangeUpdateBlock(UpdateData *data) const
Definition: Object.cpp:228
Definition: UpdateData.h:36
void SendDirectMessage(WorldPacket const *data) const
Definition: Player.cpp:6174
uint32 GetMapId() const
Definition: Position.h:186
#define ASSERT
Definition: Errors.h:68
Definition: WorldPacket.h:25
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendUpdateToPlayer()

void Object::SendUpdateToPlayer ( Player player)
192 {
193  // send create update to player
194  UpdateData upd(player->GetMapId());
195  WorldPacket packet;
196 
197  if (player->HaveAtClient(this))
198  BuildValuesUpdateBlockForPlayer(&upd, player);
199  else
200  BuildCreateUpdateBlockForPlayer(&upd, player);
201  upd.BuildPacket(&packet);
202  player->SendDirectMessage(&packet);
203 }
void BuildValuesUpdateBlockForPlayer(UpdateData *data, Player const *target) const
Definition: Object.cpp:205
bool HaveAtClient(Object const *u) const
Definition: Player.cpp:24002
Definition: UpdateData.h:36
void SendDirectMessage(WorldPacket const *data) const
Definition: Player.cpp:6174
virtual void BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const
Definition: Object.cpp:145
uint32 GetMapId() const
Definition: Position.h:186
Definition: WorldPacket.h:25
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetDestroyedObject()

void Object::SetDestroyedObject ( bool  destroyed)
inline
193 { m_isDestroyedObject = destroyed; }
bool m_isDestroyedObject
Definition: Object.h:397
+ Here is the caller graph for this function:

◆ SetDynamicFlag()

void Object::SetDynamicFlag ( uint32  flag)
inline
void SetUpdateFieldFlagValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type flag)
Definition: Object.h:275
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:252
UF::UpdateFieldHolder m_values
Definition: Object.h:251
+ 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:252
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:268
UpdateField< int32, 0, 1 > EntryID
Definition: UpdateFields.h:49
UF::UpdateFieldHolder m_values
Definition: Object.h:251
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetIsNewObject()

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

◆ 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:252
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:268
UF::UpdateFieldHolder m_values
Definition: Object.h:251
+ 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
276  {
277  static_assert(std::is_integral<T>::value, "SetUpdateFieldFlagValue must be used with integral types");
278  SetUpdateFieldValue(setter, setter.GetValue() | flag);
279  }
T GetValue() const
Definition: UpdateField.h:99
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:268
+ 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
326  {
327  static_assert(std::is_arithmetic<T>::value, "SetUpdateFieldStatValue must be used with arithmetic types");
328  SetUpdateFieldValue(setter, std::max(value, T(0)));
329  }
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:268
+ 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
269  {
270  if (UF::SetUpdateFieldValue(setter, std::move(value)))
272  }
void AddToObjectUpdateIfNeeded()
Definition: Object.cpp:750
bool SetUpdateFieldValue(UpdateFieldSetter< T > &setter, typename UpdateFieldSetter< T >::value_type &&value)
Definition: Object.h:108
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToAreaTrigger() [1/4]

static AreaTrigger* Object::ToAreaTrigger ( Object o)
inlinestatic
234 { return o ? o->ToAreaTrigger() : nullptr; }
static AreaTrigger * ToAreaTrigger(Object *o)
Definition: Object.h:234
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToAreaTrigger() [2/4]

static AreaTrigger const* Object::ToAreaTrigger ( Object const *  o)
inlinestatic
235 { return o ? o->ToAreaTrigger() : nullptr; }
+ Here is the call graph for this function:

◆ ToAreaTrigger() [3/4]

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

◆ ToAreaTrigger() [4/4]

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

◆ ToConversation() [1/4]

static Conversation* Object::ToConversation ( Object o)
inlinestatic
246 { return o ? o->ToConversation() : nullptr; }
static Conversation * ToConversation(Object *o)
Definition: Object.h:246
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToConversation() [2/4]

static Conversation const* Object::ToConversation ( Object const *  o)
inlinestatic
247 { return o ? o->ToConversation() : nullptr; }
+ Here is the call graph for this function:

◆ ToConversation() [3/4]

Conversation* Object::ToConversation ( )
inline
248 { if (IsConversation()) return reinterpret_cast<Conversation*>(this); else return nullptr; }
bool IsConversation() const
Definition: Object.h:245
Definition: Conversation.h:29
+ Here is the caller graph for this function:

◆ ToConversation() [4/4]

Conversation const* Object::ToConversation ( ) const
inline
249 { if (IsConversation()) return reinterpret_cast<Conversation const*>(this); else return nullptr; }
bool IsConversation() const
Definition: Object.h:245
Definition: Conversation.h:29

◆ ToCorpse() [1/4]

static Corpse* Object::ToCorpse ( Object o)
inlinestatic
222 { return o ? o->ToCorpse() : nullptr; }
static Corpse * ToCorpse(Object *o)
Definition: Object.h:222
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToCorpse() [2/4]

static Corpse const* Object::ToCorpse ( Object const *  o)
inlinestatic
223 { return o ? o->ToCorpse() : nullptr; }
+ Here is the call graph for this function:

◆ ToCorpse() [3/4]

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

◆ ToCorpse() [4/4]

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

◆ ToCreature() [1/4]

static Creature* Object::ToCreature ( Object o)
inlinestatic
204 { return o ? o->ToCreature() : nullptr; }
static Creature * ToCreature(Object *o)
Definition: Object.h:204
+ Here is the call graph for this function:

◆ ToCreature() [2/4]

static Creature const* Object::ToCreature ( Object const *  o)
inlinestatic
205 { return o ? o->ToCreature() : nullptr; }
+ Here is the call graph for this function:

◆ ToCreature() [3/4]

Creature* Object::ToCreature ( )
inline
206 { if (IsCreature()) return reinterpret_cast<Creature*>(this); else return nullptr; }
Definition: Creature.h:69
bool IsCreature() const
Definition: Object.h:203
+ Here is the caller graph for this function:

◆ ToCreature() [4/4]

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

◆ ToDynObject() [1/4]

static DynamicObject* Object::ToDynObject ( Object o)
inlinestatic
228 { return o ? o->ToDynObject() : nullptr; }
static DynamicObject * ToDynObject(Object *o)
Definition: Object.h:228
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToDynObject() [2/4]

static DynamicObject const* Object::ToDynObject ( Object const *  o)
inlinestatic
229 { return o ? o->ToDynObject() : nullptr; }
+ Here is the call graph for this function:

◆ ToDynObject() [3/4]

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

◆ ToDynObject() [4/4]

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

◆ ToGameObject() [1/4]

static GameObject* Object::ToGameObject ( Object o)
inlinestatic
216 { return o ? o->ToGameObject() : nullptr; }
static GameObject * ToGameObject(Object *o)
Definition: Object.h:216
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToGameObject() [2/4]

static GameObject const* Object::ToGameObject ( Object const *  o)
inlinestatic
217 { return o ? o->ToGameObject() : nullptr; }
+ Here is the call graph for this function:

◆ ToGameObject() [3/4]

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

◆ ToGameObject() [4/4]

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

◆ ToPlayer() [1/4]

static Player* Object::ToPlayer ( Object o)
inlinestatic
198 { return o ? o->ToPlayer() : nullptr; }
static Player * ToPlayer(Object *o)
Definition: Object.h:198
+ Here is the call graph for this function:

◆ ToPlayer() [2/4]

static Player const* Object::ToPlayer ( Object const *  o)
inlinestatic
199 { return o ? o->ToPlayer() : nullptr; }
+ Here is the call graph for this function:

◆ ToPlayer() [3/4]

Player* Object::ToPlayer ( )
inline
200 { if (IsPlayer()) return reinterpret_cast<Player*>(this); else return nullptr; }
bool IsPlayer() const
Definition: Object.h:197
Definition: Player.h:1131
+ Here is the caller graph for this function:

◆ ToPlayer() [4/4]

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

◆ ToSceneObject() [1/4]

static SceneObject* Object::ToSceneObject ( Object o)
inlinestatic
240 { return o ? o->ToSceneObject() : nullptr; }
static SceneObject * ToSceneObject(Object *o)
Definition: Object.h:240
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToSceneObject() [2/4]

static SceneObject const* Object::ToSceneObject ( Object const *  o)
inlinestatic
241 { return o ? o->ToSceneObject() : nullptr; }
+ Here is the call graph for this function:

◆ ToSceneObject() [3/4]

SceneObject* Object::ToSceneObject ( )
inline
242 { if (IsSceneObject()) return reinterpret_cast<SceneObject*>(this); else return nullptr; }
bool IsSceneObject() const
Definition: Object.h:239
Definition: SceneObject.h:32

◆ ToSceneObject() [4/4]

SceneObject const* Object::ToSceneObject ( ) const
inline
243 { if (IsSceneObject()) return reinterpret_cast<SceneObject const*>(this); else return nullptr; }
bool IsSceneObject() const
Definition: Object.h:239
Definition: SceneObject.h:32

◆ ToUnit() [1/4]

static Unit* Object::ToUnit ( Object o)
inlinestatic
210 { return o ? o->ToUnit() : nullptr; }
static Unit * ToUnit(Object *o)
Definition: Object.h:210
+ Here is the call graph for this function:

◆ ToUnit() [2/4]

static Unit const* Object::ToUnit ( Object const *  o)
inlinestatic
211 { return o ? o->ToUnit() : nullptr; }
+ Here is the call graph for this function:

◆ ToUnit() [3/4]

Unit* Object::ToUnit ( )
inline
212 { if (IsUnit()) return reinterpret_cast<Unit*>(this); else return nullptr; }
bool IsUnit() const
Definition: Object.h:209
Definition: Unit.h:746
+ Here is the caller graph for this function:

◆ ToUnit() [4/4]

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

Member Data Documentation

◆ m_guid

ObjectGuid Object::m_guid
private

◆ m_inWorld

bool Object::m_inWorld
private

◆ m_isDestroyedObject

bool Object::m_isDestroyedObject
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: