TrinityCore
Loading...
Searching...
No Matches
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
 
ByteBufferPrepareValuesUpdateBuffer (UpdateData *data) 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 LootGetLootForPlayer (Player const *player) 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
 

Detailed Description

Definition at line 148 of file Object.h.

Constructor & Destructor Documentation

◆ ~Object()

Object::~Object ( )
virtual

Definition at line 84 of file Object.cpp.

85{
86 if (IsInWorld())
87 {
88 TC_LOG_FATAL("misc", "Object::~Object {} deleted but still in world!!", GetGUID().ToString());
90 TC_LOG_FATAL("misc", "Item slot {}", ((Item*)this)->GetSlot());
91 ABORT();
92 }
93
95 {
96 TC_LOG_FATAL("misc", "Object::~Object {} deleted but still in update list!!", GetGUID().ToString());
97 ABORT();
98 }
99}
#define ABORT
Definition: Errors.h:74
#define TC_LOG_FATAL(filterType__,...)
Definition: Log.h:168
@ TYPEMASK_ITEM
Definition: ObjectGuid.h:56
Definition: Item.h:170
ObjectGuid const & GetGUID() const
Definition: Object.h:159
bool IsInWorld() const
Definition: Object.h:153
bool isType(uint16 mask) const
Definition: Object.h:173
bool m_objectUpdated
Definition: Object.h:395
string ToString(int i)
Definition: strutil.h:491
+ Here is the call graph for this function:

◆ Object() [1/3]

Object::Object ( )
protected

Definition at line 72 of file Object.cpp.

72 : m_values(this)
73{
77
78 m_inWorld = false;
79 m_isNewObject = false;
80 m_isDestroyedObject = false;
81 m_objectUpdated = false;
82}
@ TYPEID_OBJECT
Definition: ObjectGuid.h:35
@ TYPEMASK_OBJECT
Definition: ObjectGuid.h:55
uint16 m_objectType
Definition: Object.h:386
bool m_isNewObject
Definition: Object.h:400
bool m_isDestroyedObject
Definition: Object.h:401
CreateObjectBits m_updateFlag
Definition: Object.h:389
UF::UpdateFieldHolder m_values
Definition: Object.h:253
bool m_inWorld
Definition: Object.h:399
TypeID m_objectTypeId
Definition: Object.h:388
void Clear()
Definition: Object.h:101
+ 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

Definition at line 101 of file Object.cpp.

102{
103 m_objectUpdated = false;
104 m_guid = guid;
105}
ObjectGuid m_guid
Definition: Object.h:398
+ Here is the caller graph for this function:

◆ AddDynamicUpdateFieldValue()

template<typename T >
UF::DynamicUpdateFieldSetter< T >::insert_result Object::AddDynamicUpdateFieldValue ( UF::DynamicUpdateFieldSetter< T >  setter)
inlineprotected

Definition at line 293 of file Object.h.

294 {
296 return UF::AddDynamicUpdateFieldValue(setter);
297 }
void AddToObjectUpdateIfNeeded()
Definition: Object.cpp:776
DynamicUpdateFieldSetter< T >::insert_result AddDynamicUpdateFieldValue(DynamicUpdateFieldSetter< T > &setter)
Definition: Object.h:116
+ 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 Item, and WorldObject.

+ Here is the caller graph for this function:

◆ AddToObjectUpdateIfNeeded()

void Object::AddToObjectUpdateIfNeeded ( )
protected

Definition at line 776 of file Object.cpp.

777{
780}
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 AreaTrigger, Conversation, Corpse, Creature, DynamicObject, GameObject, Bag, WorldObject, Pet, Player, SceneObject, and Unit.

Definition at line 107 of file Object.cpp.

108{
109 if (m_inWorld)
110 return;
111
112 m_inWorld = true;
113
114 // synchronize values mirror with values array (changes will send in updatecreate opcode any way
116 ClearUpdateMask(false);
117}
#define ASSERT
Definition: Errors.h:68
virtual void ClearUpdateMask(bool remove)
Definition: Object.cpp:782
+ 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

Definition at line 336 of file Object.h.

337 {
338 static_assert(std::is_arithmetic<T>::value, "SetUpdateFieldStatValue must be used with arithmetic types");
339
340 T value = setter.GetValue();
341 if (apply)
342 value += mod;
343 else
344 value -= mod;
345
346 SetUpdateFieldValue(setter, value);
347 }
void SetUpdateFieldValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type value)
Definition: Object.h:272
+ 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

Definition at line 350 of file Object.h.

351 {
352 static_assert(std::is_arithmetic<T>::value, "SetUpdateFieldStatValue must be used with arithmetic types");
353
354 T value = setter.GetValue();
355
356 // don't want to include Util.h here
357 //ApplyPercentModFloatVar(value, percent, apply);
358 if (percent == -100.0f)
359 percent = -99.99f;
360 value *= (apply ? (100.0f + percent) / 100.0f : 100.0f / (100.0f + percent));
361
362 SetUpdateFieldValue(setter, value);
363 }
void apply(T *val)
Definition: ByteConverter.h:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildCreateUpdateBlockForPlayer()

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

Reimplemented in Bag, and Player.

Definition at line 130 of file Object.cpp.

131{
132 if (!target)
133 return;
134
136 uint8 objectType = m_objectTypeId;
138
139 if (target == this) // building packet for yourself
140 {
141 flags.ThisIsYou = true;
142 flags.ActivePlayer = true;
143 objectType = TYPEID_ACTIVE_PLAYER;
144 }
145
146 if (WorldObject const* worldObject = dynamic_cast<WorldObject const*>(this))
147 {
148 if (!flags.MovementUpdate && !worldObject->m_movementInfo.transport.guid.IsEmpty())
149 flags.MovementTransport = true;
150
151 if (worldObject->GetAIAnimKitId() || worldObject->GetMovementAnimKitId() || worldObject->GetMeleeAnimKitId())
152 flags.AnimKit = true;
153
154 if (worldObject->GetSmoothPhasing() && worldObject->GetSmoothPhasing()->GetInfoForSeer(target->GetGUID()))
155 flags.SmoothPhasing = true;
156 }
157
158 if (Unit const* unit = ToUnit())
159 {
160 flags.PlayHoverAnim = unit->IsPlayingHoverAnim();
161
162 if (unit->GetVictim())
163 flags.CombatVictim = true;
164 }
165
166 ByteBuffer& buf = data->GetBuffer();
167 buf << uint8(updateType);
168 buf << GetGUID();
169 buf << uint8(objectType);
170
171 BuildMovementUpdate(&buf, flags, target);
172 BuildValuesCreate(&buf, target);
173 data->AddUpdateBlock();
174}
uint8_t uint8
Definition: Define.h:145
uint16 flags
Definition: DisableMgr.cpp:49
@ TYPEID_ACTIVE_PLAYER
Definition: ObjectGuid.h:42
@ UPDATETYPE_CREATE_OBJECT
Definition: UpdateData.h:31
@ UPDATETYPE_CREATE_OBJECT2
Definition: UpdateData.h:32
virtual void BuildValuesCreate(ByteBuffer *data, Player const *target) const =0
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:158
void BuildMovementUpdate(ByteBuffer *data, CreateObjectBits flags, Player *target) const
Definition: Object.cpp:248
Unit * ToUnit()
Definition: Object.h:214
Definition: Unit.h:747
ByteBuffer & GetBuffer()
Definition: UpdateData.h:50
void AddUpdateBlock()
Definition: UpdateData.h:49
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BuildDestroyUpdateBlock()

void Object::BuildDestroyUpdateBlock ( UpdateData data) const

Definition at line 208 of file Object.cpp.

209{
210 data->AddDestroyObject(GetGUID());
211}
void AddDestroyObject(ObjectGuid guid)
Definition: UpdateData.cpp:25
+ 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

Definition at line 794 of file Object.cpp.

795{
796 UpdateDataMapType::iterator iter = data_map.find(player);
797
798 if (iter == data_map.end())
799 {
800 std::pair<UpdateDataMapType::iterator, bool> p = data_map.emplace(player, UpdateData(player->GetMapId()));
801 ASSERT(p.second);
802 iter = p.first;
803 }
804
805 BuildValuesUpdateBlockForPlayer(&iter->second, iter->first);
806}
void BuildValuesUpdateBlockForPlayer(UpdateData *data, Player const *target) const
Definition: Object.cpp:190
uint32 GetMapId() const
Definition: Position.h:185
+ 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

Definition at line 248 of file Object.cpp.

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

◆ BuildOutOfRangeUpdateBlock()

void Object::BuildOutOfRangeUpdateBlock ( UpdateData data) const

Definition at line 213 of file Object.cpp.

214{
215 data->AddOutOfRangeGUID(GetGUID());
216}
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 Item, WorldObject, and Transport.

Definition at line 196 of file Object.h.

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

◆ BuildValuesCreate()

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

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

+ Here is the caller graph for this function:

◆ BuildValuesUpdate()

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

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

+ Here is the caller graph for this function:

◆ BuildValuesUpdateBlockForPlayer()

void Object::BuildValuesUpdateBlockForPlayer ( UpdateData data,
Player const *  target 
) const

Definition at line 190 of file Object.cpp.

191{
193
194 BuildValuesUpdate(&buf, target);
195
196 data->AddUpdateBlock();
197}
virtual void BuildValuesUpdate(ByteBuffer *data, Player const *target) const =0
ByteBuffer & PrepareValuesUpdateBuffer(UpdateData *data) const
Definition: Object.cpp:218
+ 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

Definition at line 199 of file Object.cpp.

200{
202
203 BuildValuesUpdateWithFlag(&buf, flags, target);
204
205 data->AddUpdateBlock();
206}
virtual void BuildValuesUpdateWithFlag(ByteBuffer *data, UF::UpdateFieldFlag flags, Player const *target) const
Definition: Object.cpp:767
+ 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 AzeriteItem, Item, Player, and Unit.

Definition at line 767 of file Object.cpp.

768{
769 std::size_t sizePos = data->wpos();
770 *data << uint32(0);
771 *data << uint32(0);
772
773 data->put<uint32>(sizePos, data->wpos() - sizePos - 4);
774}
size_t wpos() const
Definition: ByteBuffer.h:412
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

Definition at line 314 of file Object.h.

315 {
318 }
void ClearDynamicUpdateFieldValues(DynamicUpdateFieldSetter< T > &setter)
Definition: Object.h:134
+ 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 AreaTrigger, Conversation, Corpse, DynamicObject, GameObject, AzeriteEmpoweredItem, AzeriteItem, Bag, Item, Player, SceneObject, and Unit.

Definition at line 782 of file Object.cpp.

783{
785
786 if (m_objectUpdated)
787 {
788 if (remove)
790 m_objectUpdated = false;
791 }
792}
UF::UpdateField< UF::ObjectData, 0, TYPEID_OBJECT > m_objectData
Definition: Object.h:254
virtual void RemoveFromObjectUpdate()=0
void ClearChangesMask(UpdateField< T, BlockBit, Bit >(Derived::*field))
Definition: UpdateField.h:680
+ 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.

Definition at line 226 of file Object.cpp.

227{
228 ASSERT(target);
229
230 UpdateData updateData(target->GetMapId());
231 BuildDestroyUpdateBlock(&updateData);
232 WorldPacket packet;
233 updateData.BuildPacket(&packet);
234 target->SendDirectMessage(&packet);
235}
void BuildDestroyUpdateBlock(UpdateData *data) const
Definition: Object.cpp:208
void SendDirectMessage(WorldPacket const *data) const
Definition: Player.cpp:6375
+ 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

Definition at line 366 of file Object.h.

367 {
368 bool wasUpdatedBeforeAction = m_objectUpdated;
369 action();
370 if (m_objectUpdated && !wasUpdatedBeforeAction)
371 {
373 m_objectUpdated = false;
374 }
375 }
+ Here is the caller graph for this function:

◆ ForceUpdateFieldChange()

template<typename T >
void Object::ForceUpdateFieldChange ( UF::UpdateFieldSetter< T > const &  )
inline

Definition at line 257 of file Object.h.

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

◆ GetDebugInfo()

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

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

Definition at line 808 of file Object.cpp.

809{
810 std::stringstream sstr;
811 sstr << GetGUID().ToString() + " Entry " << GetEntry();
812 return sstr.str();
813}
std::string ToString() const
Definition: ObjectGuid.cpp:554
uint32 GetEntry() const
Definition: Object.h:160
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDynamicFlags()

uint32 Object::GetDynamicFlags ( ) const
inline

Definition at line 166 of file Object.h.

166{ return m_objectData->DynamicFlags; }
+ Here is the caller graph for this function:

◆ GetEntry()

uint32 Object::GetEntry ( ) const
inline

Definition at line 160 of file Object.h.

160{ return m_objectData->EntryID; }

◆ GetGUID() [1/2]

ObjectGuid const & Object::GetGUID ( ) const
inline

Definition at line 159 of file Object.h.

159{ return m_guid; }

◆ GetGUID() [2/2]

static ObjectGuid Object::GetGUID ( Object const *  o)
inlinestatic

Definition at line 158 of file Object.h.

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

◆ GetLootForPlayer()

virtual Loot * Object::GetLootForPlayer ( Player const *  player) const
inlinevirtual

Reimplemented in Corpse, GameObject, Item, and Creature.

Definition at line 264 of file Object.h.

264{ return nullptr; }

◆ GetNameForLocaleIdx()

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

Implemented in Creature, GameObject, Item, and WorldObject.

◆ GetObjectScale()

float Object::GetObjectScale ( ) const
inline

Definition at line 163 of file Object.h.

163{ return m_objectData->Scale; }
+ Here is the caller graph for this function:

◆ GetTypeId()

TypeID Object::GetTypeId ( ) const
inline

Definition at line 172 of file Object.h.

172{ return m_objectTypeId; }

◆ GetUpdateFieldFlagsFor()

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

Reimplemented in Item, Player, and Unit.

Definition at line 762 of file Object.cpp.

+ Here is the caller graph for this function:

◆ HasDynamicFlag()

bool Object::HasDynamicFlag ( uint32  flag) const
inline

Definition at line 167 of file Object.h.

167{ return (*m_objectData->DynamicFlags & flag) != 0; }
+ Here is the caller graph for this function:

◆ hasInvolvedQuest()

virtual bool Object::hasInvolvedQuest ( uint32  ) const
inlinevirtual

Reimplemented in Creature, GameObject, and Item.

Definition at line 192 of file Object.h.

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

◆ hasQuest()

virtual bool Object::hasQuest ( uint32  ) const
inlinevirtual

Reimplemented in Creature, GameObject, and Item.

Definition at line 191 of file Object.h.

191{ 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

Definition at line 300 of file Object.h.

301 {
303 return UF::InsertDynamicUpdateFieldValue(setter, index);
304 }
DynamicUpdateFieldSetter< T >::insert_result InsertDynamicUpdateFieldValue(DynamicUpdateFieldSetter< T > &setter, uint32 index)
Definition: Object.h:122
+ Here is the call graph for this function:

◆ IsAreaTrigger()

bool Object::IsAreaTrigger ( ) const
inline

Definition at line 235 of file Object.h.

235{ return GetTypeId() == TYPEID_AREATRIGGER; }
@ TYPEID_AREATRIGGER
Definition: ObjectGuid.h:46
TypeID GetTypeId() const
Definition: Object.h:172

◆ IsConversation()

bool Object::IsConversation ( ) const
inline

Definition at line 247 of file Object.h.

247{ return GetTypeId() == TYPEID_CONVERSATION; }
@ TYPEID_CONVERSATION
Definition: ObjectGuid.h:48

◆ IsCorpse()

bool Object::IsCorpse ( ) const
inline

Definition at line 223 of file Object.h.

223{ return GetTypeId() == TYPEID_CORPSE; }
@ TYPEID_CORPSE
Definition: ObjectGuid.h:45
+ Here is the caller graph for this function:

◆ IsCreature()

bool Object::IsCreature ( ) const
inline

Definition at line 205 of file Object.h.

205{ return GetTypeId() == TYPEID_UNIT; }
@ TYPEID_UNIT
Definition: ObjectGuid.h:40
+ Here is the caller graph for this function:

◆ IsDestroyedObject()

bool Object::IsDestroyedObject ( ) const
inline

Definition at line 194 of file Object.h.

194{ return m_isDestroyedObject; }
+ Here is the caller graph for this function:

◆ IsDynObject()

bool Object::IsDynObject ( ) const
inline

Definition at line 229 of file Object.h.

229{ return GetTypeId() == TYPEID_DYNAMICOBJECT; }
@ TYPEID_DYNAMICOBJECT
Definition: ObjectGuid.h:44

◆ IsGameObject()

bool Object::IsGameObject ( ) const
inline

Definition at line 217 of file Object.h.

217{ return GetTypeId() == TYPEID_GAMEOBJECT; }
@ TYPEID_GAMEOBJECT
Definition: ObjectGuid.h:43
+ Here is the caller graph for this function:

◆ IsInWorld()

bool Object::IsInWorld ( ) const
inline

Definition at line 153 of file Object.h.

153{ return m_inWorld; }
+ Here is the caller graph for this function:

◆ IsPlayer()

bool Object::IsPlayer ( ) const
inline

Definition at line 199 of file Object.h.

199{ return GetTypeId() == TYPEID_PLAYER; }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
+ Here is the caller graph for this function:

◆ IsSceneObject()

bool Object::IsSceneObject ( ) const
inline

Definition at line 241 of file Object.h.

241{ return GetTypeId() == TYPEID_SCENEOBJECT; }
@ TYPEID_SCENEOBJECT
Definition: ObjectGuid.h:47

◆ isType()

bool Object::isType ( uint16  mask) const
inline

Definition at line 173 of file Object.h.

173{ return (mask & m_objectType) != 0; }
+ Here is the caller graph for this function:

◆ IsUnit()

bool Object::IsUnit ( ) const
inline

Definition at line 211 of file Object.h.

211{ return isType(TYPEMASK_UNIT); }
@ TYPEMASK_UNIT
Definition: ObjectGuid.h:60
+ Here is the caller graph for this function:

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ PrepareValuesUpdateBuffer()

ByteBuffer & Object::PrepareValuesUpdateBuffer ( UpdateData data) const

Definition at line 218 of file Object.cpp.

219{
220 ByteBuffer& buffer = data->GetBuffer();
221 buffer << uint8(UPDATETYPE_VALUES);
222 buffer << GetGUID();
223 return buffer;
224}
@ UPDATETYPE_VALUES
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

Definition at line 169 of file Object.h.

void RemoveUpdateFieldFlagValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type flag)
Definition: Object.h:286
MutableFieldReference< T, false > ModifyValue(UpdateField< T, BlockBit, Bit >(Derived::*field))
Definition: UpdateField.h:673
UpdateField< uint32, 0, 2 > DynamicFlags
Definition: UpdateFields.h:53
+ Here is the caller graph for this function:

◆ RemoveDynamicUpdateFieldValue()

template<typename T >
void Object::RemoveDynamicUpdateFieldValue ( UF::DynamicUpdateFieldSetter< T >  setter,
uint32  index 
)
inlineprotected

Definition at line 307 of file Object.h.

308 {
311 }
void RemoveDynamicUpdateFieldValue(DynamicUpdateFieldSetter< T > &setter, uint32 index)
Definition: Object.h:128
+ 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 Item, and WorldObject.

+ Here is the caller graph for this function:

◆ RemoveFromWorld()

void Object::RemoveFromWorld ( )
virtual

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

Definition at line 119 of file Object.cpp.

120{
121 if (!m_inWorld)
122 return;
123
124 m_inWorld = false;
125
126 // if we remove from world then sending changes not required
127 ClearUpdateMask(true);
128}
+ 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

Definition at line 321 of file Object.h.

322 {
325 }
void RemoveOptionalUpdateFieldValue(OptionalUpdateFieldSetter< T > &setter)
Definition: Object.h:140
+ 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

Definition at line 286 of file Object.h.

287 {
288 static_assert(std::is_integral<T>::value, "RemoveUpdateFieldFlagValue must be used with integral types");
289 SetUpdateFieldValue(setter, setter.GetValue() & ~flag);
290 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReplaceAllDynamicFlags()

void Object::ReplaceAllDynamicFlags ( uint32  flag)
inline

Definition at line 170 of file Object.h.

+ Here is the caller graph for this function:

◆ SendOutOfRangeForPlayer()

void Object::SendOutOfRangeForPlayer ( Player target) const

Definition at line 237 of file Object.cpp.

238{
239 ASSERT(target);
240
241 UpdateData updateData(target->GetMapId());
242 BuildOutOfRangeUpdateBlock(&updateData);
243 WorldPacket packet;
244 updateData.BuildPacket(&packet);
245 target->SendDirectMessage(&packet);
246}
void BuildOutOfRangeUpdateBlock(UpdateData *data) const
Definition: Object.cpp:213
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendUpdateToPlayer()

void Object::SendUpdateToPlayer ( Player player)

Definition at line 176 of file Object.cpp.

177{
178 // send create update to player
179 UpdateData upd(player->GetMapId());
180 WorldPacket packet;
181
182 if (player->HaveAtClient(this))
184 else
186 upd.BuildPacket(&packet);
187 player->SendDirectMessage(&packet);
188}
virtual void BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const
Definition: Object.cpp:130
bool HaveAtClient(Object const *u) const
Definition: Player.cpp:23534
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetDestroyedObject()

void Object::SetDestroyedObject ( bool  destroyed)
inline

Definition at line 195 of file Object.h.

195{ m_isDestroyedObject = destroyed; }
+ Here is the caller graph for this function:

◆ SetDynamicFlag()

void Object::SetDynamicFlag ( uint32  flag)
inline

Definition at line 168 of file Object.h.

void SetUpdateFieldFlagValue(UF::UpdateFieldSetter< T > setter, typename UF::UpdateFieldSetter< T >::value_type flag)
Definition: Object.h:279
+ Here is the caller graph for this function:

◆ SetEntry()

void Object::SetEntry ( uint32  entry)
inline

Definition at line 161 of file Object.h.

UpdateField< int32, 0, 1 > EntryID
Definition: UpdateFields.h:51
+ Here is the caller graph for this function:

◆ SetIsNewObject()

void Object::SetIsNewObject ( bool  enable)
inline

Definition at line 193 of file Object.h.

193{ m_isNewObject = enable; }

◆ SetObjectScale()

virtual void Object::SetObjectScale ( float  scale)
inlinevirtual

Reimplemented in Creature, and Player.

Definition at line 164 of file Object.h.

UpdateField< float, 0, 3 > Scale
Definition: UpdateFields.h:55
+ 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

Definition at line 279 of file Object.h.

280 {
281 static_assert(std::is_integral<T>::value, "SetUpdateFieldFlagValue must be used with integral types");
282 SetUpdateFieldValue(setter, setter.GetValue() | flag);
283 }
+ 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

Definition at line 329 of file Object.h.

330 {
331 static_assert(std::is_arithmetic<T>::value, "SetUpdateFieldStatValue must be used with arithmetic types");
332 SetUpdateFieldValue(setter, std::max(value, T(0)));
333 }
+ 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

Definition at line 272 of file Object.h.

273 {
274 if (UF::SetUpdateFieldValue(setter, std::move(value)))
276 }
bool SetUpdateFieldValue(UpdateFieldSetter< T > &setter, typename UpdateFieldSetter< T >::value_type &&value)
Definition: Object.h:110
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToAreaTrigger() [1/4]

AreaTrigger * Object::ToAreaTrigger ( )
inline

Definition at line 238 of file Object.h.

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

◆ ToAreaTrigger() [2/4]

AreaTrigger const * Object::ToAreaTrigger ( ) const
inline

Definition at line 239 of file Object.h.

239{ if (IsAreaTrigger()) return reinterpret_cast<AreaTrigger const*>(this); else return nullptr; }

◆ ToAreaTrigger() [3/4]

static AreaTrigger * Object::ToAreaTrigger ( Object o)
inlinestatic

Definition at line 236 of file Object.h.

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

◆ ToAreaTrigger() [4/4]

static AreaTrigger const * Object::ToAreaTrigger ( Object const *  o)
inlinestatic

Definition at line 237 of file Object.h.

237{ return o ? o->ToAreaTrigger() : nullptr; }
+ Here is the call graph for this function:

◆ ToConversation() [1/4]

Conversation * Object::ToConversation ( )
inline

Definition at line 250 of file Object.h.

250{ if (IsConversation()) return reinterpret_cast<Conversation*>(this); else return nullptr; }
bool IsConversation() const
Definition: Object.h:247

◆ ToConversation() [2/4]

Conversation const * Object::ToConversation ( ) const
inline

Definition at line 251 of file Object.h.

251{ if (IsConversation()) return reinterpret_cast<Conversation const*>(this); else return nullptr; }

◆ ToConversation() [3/4]

static Conversation * Object::ToConversation ( Object o)
inlinestatic

Definition at line 248 of file Object.h.

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

◆ ToConversation() [4/4]

static Conversation const * Object::ToConversation ( Object const *  o)
inlinestatic

Definition at line 249 of file Object.h.

249{ return o ? o->ToConversation() : nullptr; }
+ Here is the call graph for this function:

◆ ToCorpse() [1/4]

Corpse * Object::ToCorpse ( )
inline

Definition at line 226 of file Object.h.

226{ if (IsCorpse()) return reinterpret_cast<Corpse*>(this); else return nullptr; }
Definition: Corpse.h:53
bool IsCorpse() const
Definition: Object.h:223
+ Here is the caller graph for this function:

◆ ToCorpse() [2/4]

Corpse const * Object::ToCorpse ( ) const
inline

Definition at line 227 of file Object.h.

227{ if (IsCorpse()) return reinterpret_cast<Corpse const*>(this); else return nullptr; }

◆ ToCorpse() [3/4]

static Corpse * Object::ToCorpse ( Object o)
inlinestatic

Definition at line 224 of file Object.h.

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

◆ ToCorpse() [4/4]

static Corpse const * Object::ToCorpse ( Object const *  o)
inlinestatic

Definition at line 225 of file Object.h.

225{ return o ? o->ToCorpse() : nullptr; }
+ Here is the call graph for this function:

◆ ToCreature() [1/4]

Creature * Object::ToCreature ( )
inline

Definition at line 208 of file Object.h.

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

◆ ToCreature() [2/4]

Creature const * Object::ToCreature ( ) const
inline

Definition at line 209 of file Object.h.

209{ if (IsCreature()) return reinterpret_cast<Creature const*>(this); else return nullptr; }

◆ ToCreature() [3/4]

static Creature * Object::ToCreature ( Object o)
inlinestatic

Definition at line 206 of file Object.h.

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

◆ ToCreature() [4/4]

static Creature const * Object::ToCreature ( Object const *  o)
inlinestatic

Definition at line 207 of file Object.h.

207{ return o ? o->ToCreature() : nullptr; }
+ Here is the call graph for this function:

◆ ToDynObject() [1/4]

DynamicObject * Object::ToDynObject ( )
inline

Definition at line 232 of file Object.h.

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

◆ ToDynObject() [2/4]

DynamicObject const * Object::ToDynObject ( ) const
inline

Definition at line 233 of file Object.h.

233{ if (IsDynObject()) return reinterpret_cast<DynamicObject const*>(this); else return nullptr; }

◆ ToDynObject() [3/4]

static DynamicObject * Object::ToDynObject ( Object o)
inlinestatic

Definition at line 230 of file Object.h.

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

◆ ToDynObject() [4/4]

static DynamicObject const * Object::ToDynObject ( Object const *  o)
inlinestatic

Definition at line 231 of file Object.h.

231{ return o ? o->ToDynObject() : nullptr; }
+ Here is the call graph for this function:

◆ ToGameObject() [1/4]

GameObject * Object::ToGameObject ( )
inline

Definition at line 220 of file Object.h.

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

◆ ToGameObject() [2/4]

GameObject const * Object::ToGameObject ( ) const
inline

Definition at line 221 of file Object.h.

221{ if (IsGameObject()) return reinterpret_cast<GameObject const*>(this); else return nullptr; }

◆ ToGameObject() [3/4]

static GameObject * Object::ToGameObject ( Object o)
inlinestatic

Definition at line 218 of file Object.h.

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

◆ ToGameObject() [4/4]

static GameObject const * Object::ToGameObject ( Object const *  o)
inlinestatic

Definition at line 219 of file Object.h.

219{ return o ? o->ToGameObject() : nullptr; }
+ Here is the call graph for this function:

◆ ToPlayer() [1/4]

Player * Object::ToPlayer ( )
inline

Definition at line 202 of file Object.h.

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

◆ ToPlayer() [2/4]

Player const * Object::ToPlayer ( ) const
inline

Definition at line 203 of file Object.h.

203{ if (IsPlayer()) return reinterpret_cast<Player const*>(this); else return nullptr; }

◆ ToPlayer() [3/4]

static Player * Object::ToPlayer ( Object o)
inlinestatic

Definition at line 200 of file Object.h.

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

◆ ToPlayer() [4/4]

static Player const * Object::ToPlayer ( Object const *  o)
inlinestatic

Definition at line 201 of file Object.h.

201{ return o ? o->ToPlayer() : nullptr; }
+ Here is the call graph for this function:

◆ ToSceneObject() [1/4]

SceneObject * Object::ToSceneObject ( )
inline

Definition at line 244 of file Object.h.

244{ if (IsSceneObject()) return reinterpret_cast<SceneObject*>(this); else return nullptr; }
bool IsSceneObject() const
Definition: Object.h:241

◆ ToSceneObject() [2/4]

SceneObject const * Object::ToSceneObject ( ) const
inline

Definition at line 245 of file Object.h.

245{ if (IsSceneObject()) return reinterpret_cast<SceneObject const*>(this); else return nullptr; }

◆ ToSceneObject() [3/4]

static SceneObject * Object::ToSceneObject ( Object o)
inlinestatic

Definition at line 242 of file Object.h.

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

◆ ToSceneObject() [4/4]

static SceneObject const * Object::ToSceneObject ( Object const *  o)
inlinestatic

Definition at line 243 of file Object.h.

243{ return o ? o->ToSceneObject() : nullptr; }
+ Here is the call graph for this function:

◆ ToUnit() [1/4]

Unit * Object::ToUnit ( )
inline

Definition at line 214 of file Object.h.

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

◆ ToUnit() [2/4]

Unit const * Object::ToUnit ( ) const
inline

Definition at line 215 of file Object.h.

215{ if (IsUnit()) return reinterpret_cast<Unit const*>(this); else return nullptr; }

◆ ToUnit() [3/4]

static Unit * Object::ToUnit ( Object o)
inlinestatic

Definition at line 212 of file Object.h.

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

◆ ToUnit() [4/4]

static Unit const * Object::ToUnit ( Object const *  o)
inlinestatic

Definition at line 213 of file Object.h.

213{ return o ? o->ToUnit() : nullptr; }
+ Here is the call graph for this function:

Member Data Documentation

◆ m_guid

ObjectGuid Object::m_guid
private

Definition at line 398 of file Object.h.

◆ m_inWorld

bool Object::m_inWorld
private

Definition at line 399 of file Object.h.

◆ m_isDestroyedObject

bool Object::m_isDestroyedObject
private

Definition at line 401 of file Object.h.

◆ m_isNewObject

bool Object::m_isNewObject
private

Definition at line 400 of file Object.h.

◆ m_objectData

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

Definition at line 254 of file Object.h.

◆ m_objectType

uint16 Object::m_objectType
protected

Definition at line 386 of file Object.h.

◆ m_objectTypeId

TypeID Object::m_objectTypeId
protected

Definition at line 388 of file Object.h.

◆ m_objectUpdated

bool Object::m_objectUpdated
protected

Definition at line 395 of file Object.h.

◆ m_updateFlag

CreateObjectBits Object::m_updateFlag
protected

Definition at line 389 of file Object.h.

◆ m_values

UF::UpdateFieldHolder Object::m_values

Definition at line 253 of file Object.h.


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