OregonCore  revision be9e804-git
Your Favourite TBC server
Object Class Reference

#include <Object.h>

+ Inheritance diagram for Object:

Public Member Functions

virtual ~Object ()
 
const bool & IsInWorld () const
 
virtual void AddToWorld ()
 
virtual void RemoveFromWorld ()
 
uint64 GetGUID () const
 
uint32 GetGUIDLow () const
 
uint32 GetGUIDMid () const
 
uint32 GetGUIDHigh () const
 
PackedGuid const & GetPackGUID () const
 
ObjectGuid const & GetObjectGUID () const
 
std::string GetGuidStr () const
 
uint32 GetEntry () const
 
void SetEntry (uint32 entry)
 
float GetObjectScale () const
 
void SetObjectScale (float scale)
 
uint8 GetTypeId () const
 
bool isType (uint16 mask) const
 
virtual void BuildCreateUpdateBlockForPlayer (UpdateData *data, Player *target) const
 
void SendUpdateToPlayer (Player *player)
 
void BuildValuesUpdateBlockForPlayer (UpdateData *data, Player *target) const
 
void BuildOutOfRangeUpdateBlock (UpdateData *data) const
 
void BuildMovementUpdateBlock (UpdateData *data, uint32 flags=0) const
 
virtual void DestroyForPlayer (Player *target, bool onDeath=false) const
 
const int32GetInt32Value (uint16 index) const
 
const uint32GetUInt32Value (uint16 index) const
 
const uint64GetUInt64Value (uint16 index) const
 
const float & GetFloatValue (uint16 index) const
 
uint8 GetByteValue (uint16 index, uint8 offset) const
 
ObjectGuid const & GetGuidValue (uint16 index) const
 
uint16 GetUInt16Value (uint16 index, uint8 offset) const
 
void SetInt32Value (uint16 index, int32 value)
 
void SetUInt32Value (uint16 index, uint32 value)
 
void SetUInt64Value (uint16 index, const uint64 &value)
 
void SetFloatValue (uint16 index, float value)
 
void SetByteValue (uint16 index, uint8 offset, uint8 value)
 
void SetUInt16Value (uint16 index, uint8 offset, uint16 value)
 
void SetInt16Value (uint16 index, uint8 offset, int16 value)
 
void SetStatFloatValue (uint16 index, float value)
 
void SetStatInt32Value (uint16 index, int32 value)
 
bool AddUInt64Value (uint16 index, const uint64 &value)
 
bool RemoveUInt64Value (uint16 index, const uint64 &value)
 
void ApplyModUInt32Value (uint16 index, int32 val, bool apply)
 
void ApplyModInt32Value (uint16 index, int32 val, bool apply)
 
void ApplyModUInt64Value (uint16 index, int32 val, bool apply)
 
void ApplyModPositiveFloatValue (uint16 index, float val, bool apply)
 
void ApplyModSignedFloatValue (uint16 index, float val, bool apply)
 
void ApplyPercentModFloatValue (uint16 index, float val, bool apply)
 
void SetFlag (uint16 index, uint32 newFlag)
 
void RemoveFlag (uint16 index, uint32 oldFlag)
 
void ToggleFlag (uint16 index, uint32 flag)
 
bool HasFlag (uint16 index, uint32 flag) const
 
void SetByteFlag (uint16 index, uint8 offset, uint8 newFlag)
 
void RemoveByteFlag (uint16 index, uint8 offset, uint8 newFlag)
 
void ToggleFlag (uint16 index, uint8 offset, uint8 flag)
 
bool HasByteFlag (uint16 index, uint8 offset, uint8 flag) const
 
void ApplyModFlag (uint16 index, uint32 flag, bool apply)
 
void SetFlag64 (uint16 index, uint64 newFlag)
 
void RemoveFlag64 (uint16 index, uint64 oldFlag)
 
void ToggleFlag64 (uint16 index, uint64 flag)
 
bool HasFlag64 (uint16 index, uint64 flag) const
 
void ApplyModFlag64 (uint16 index, uint64 flag, bool apply)
 
void ClearUpdateMask (bool remove)
 
bool LoadValues (const char *data)
 
uint16 GetValuesCount () const
 
virtual bool hasQuest (uint32) const
 
virtual bool hasInvolvedQuest (uint32) const
 
virtual void BuildUpdate (UpdateDataMapType &)
 
void BuildFieldsUpdate (Player *, UpdateDataMapType &) const
 
void ForceValuesUpdateAtIndex (uint32)
 
PlayerToPlayer ()
 
Player const * ToPlayer () const
 
CreatureToCreature ()
 
Creature const * ToCreature () const
 
UnitToUnit ()
 
Unit const * ToUnit () const
 
GameObjectToGameObject ()
 
GameObject const * ToGameObject () const
 
CorpseToCorpse ()
 
Corpse const * ToCorpse () const
 
DynamicObjectToDynObject ()
 
DynamicObject const * ToDynObject () const
 

Protected Member Functions

 Object ()
 
void _InitValues ()
 
void _Create (uint32 guidlow, uint32 entry, HighGuid guidhigh)
 
void _LoadIntoDataField (const char *data, uint32 startOffset, uint32 count)
 
virtual void _SetUpdateBits (UpdateMask *updateMask, Player *target) const
 
virtual void _SetCreateBits (UpdateMask *updateMask, Player *target) const
 
void _BuildMovementUpdate (ByteBuffer *data, uint8 updateFlags) const
 
void _BuildValuesUpdate (uint8 updatetype, ByteBuffer *data, UpdateMask *updateMask, Player *target) const
 

Protected Attributes

uint16 m_objectType
 
uint8 m_objectTypeId
 
uint8 m_updateFlag
 
union {
   int32 *   m_int32Values
 
   uint32 *   m_uint32Values
 
   float *   m_floatValues
 
}; 
 
uint32m_uint32Values_mirror
 
uint16 m_valuesCount
 
bool m_objectUpdated
 

Private Member Functions

bool PrintIndexError (uint32 index, bool set) const
 
 Object (const Object &)
 
Objectoperator= (Object const &)
 

Private Attributes

bool m_inWorld
 
PackedGuid m_PackGUID
 

Detailed Description

Definition at line 145 of file Object.h.

Constructor & Destructor Documentation

Object::~Object ( )
virtual

Definition at line 95 of file Object.cpp.

References ASSERT, GetGUIDLow(), GetTypeId(), IsInWorld(), m_objectUpdated, m_uint32Values, m_uint32Values_mirror, and sLog.

96 {
97  if (IsInWorld())
98  {
99  // Do NOT call RemoveFromWorld here, if the object is a player it will crash
100  sLog.outError("Crash alert! Object::~Object (GUID: %u TypeId: %u) deleted but still in world!!", GetGUIDLow(), GetTypeId());
101  ASSERT(false);
102  }
103 
104  if (m_objectUpdated)
105  {
106  sLog.outError("Crash alert! Object::~Object (GUID: %u TypeId: %u) deleted but still has updated status!!", GetGUIDLow(), GetTypeId());
107  ASSERT(false);
108  }
109 
110  delete [] m_uint32Values;
111  delete [] m_uint32Values_mirror;
112 }
bool m_objectUpdated
Definition: Object.h:416
uint32 * m_uint32Values
Definition: Object.h:408
#define sLog
Log class singleton.
Definition: Log.h:187
uint32 GetGUIDLow() const
Definition: Object.h:178
uint8 GetTypeId() const
Definition: Object.h:192
const bool & IsInWorld() const
Definition: Object.h:150
uint32 * m_uint32Values_mirror
Definition: Object.h:412
#define ASSERT
Definition: Errors.h:29
Object::Object ( )
protected

Definition at line 68 of file Object.cpp.

References m_inWorld, m_objectType, m_objectTypeId, m_objectUpdated, m_uint32Values, m_uint32Values_mirror, m_valuesCount, TYPEID_OBJECT, and TYPEMASK_OBJECT.

69 {
72 
73  m_uint32Values = 0;
75  m_valuesCount = 0;
76 
77  m_inWorld = false;
78  m_objectUpdated = false;
79 }
bool m_objectUpdated
Definition: Object.h:416
bool m_inWorld
Definition: Object.h:419
uint32 * m_uint32Values
Definition: Object.h:408
uint16 m_objectType
Definition: Object.h:400
uint8 m_objectTypeId
Definition: Object.h:402
uint32 * m_uint32Values_mirror
Definition: Object.h:412
uint16 m_valuesCount
Definition: Object.h:414
Object::Object ( const Object )
private

Member Function Documentation

void Object::_BuildMovementUpdate ( ByteBuffer data,
uint8  updateFlags 
) const
protected

Definition at line 253 of file Object.cpp.

References GAMEOBJECT_TYPE_MO_TRANSPORT, MovementInfo::GetFallTime(), GetGUID(), GetGUIDHigh(), GetGUIDLow(), getMSTime(), Player::GetTransOffsetO(), Player::GetTransOffsetX(), Player::GetTransOffsetY(), Player::GetTransOffsetZ(), Player::GetTransport(), Player::GetTransTime(), GetTypeId(), Unit::GetUnitMovementFlags(), WorldObject::m_movementInfo, MOVE_FLIGHT, MOVE_FLIGHT_BACK, MOVE_RUN, MOVE_RUN_BACK, MOVE_SWIM, MOVE_SWIM_BACK, MOVE_TURN_RATE, MOVE_WALK, MOVEMENTFLAG_FALLING, MOVEMENTFLAG_FLYING2, MOVEMENTFLAG_NONE, MOVEMENTFLAG_ONTRANSPORT, MOVEMENTFLAG_SPLINE_ELEVATION, MOVEMENTFLAG_SPLINE_ENABLED, MOVEMENTFLAG_SWIMMING, MovementInfo::s_pitch, ToPlayer(), ToUnit(), TYPEID_CONTAINER, TYPEID_CORPSE, TYPEID_DYNAMICOBJECT, TYPEID_GAMEOBJECT, TYPEID_ITEM, TYPEID_OBJECT, TYPEID_PLAYER, TYPEID_UNIT, UPDATEFLAG_HAS_ATTACKING_TARGET, UPDATEFLAG_HAS_POSITION, UPDATEFLAG_HIGHGUID, UPDATEFLAG_LIVING, UPDATEFLAG_LOWGUID, UPDATEFLAG_SELF, UPDATEFLAG_TRANSPORT, and Movement::PacketBuilder::WriteCreate().

Referenced by BuildCreateUpdateBlockForPlayer(), and BuildMovementUpdateBlock().

254 {
255  uint32 moveFlags = MOVEMENTFLAG_NONE;
256 
257  *data << uint8(updateFlags); // update flags
258 
259  if (updateFlags & UPDATEFLAG_LIVING)
260  {
261  switch (GetTypeId())
262  {
263  case TYPEID_UNIT:
264  {
265  moveFlags = ((Unit*)this)->GetUnitMovementFlags();
266  moveFlags &= ~MOVEMENTFLAG_ONTRANSPORT;
267  }
268  break;
269  case TYPEID_PLAYER:
270  {
271  moveFlags = ToPlayer()->GetUnitMovementFlags();
272 
273  if (ToPlayer()->GetTransport())
274  moveFlags |= MOVEMENTFLAG_ONTRANSPORT;
275  else
276  moveFlags &= ~MOVEMENTFLAG_ONTRANSPORT;
277 
278  }
279  break;
280  }
281 
282  *data << uint32(moveFlags); // movement flags
283  *data << uint8(0); // movemoveFlags
284  *data << uint32(getMSTime()); // time (in milliseconds)
285  }
286 
287  // 0x40
288  if (updateFlags & UPDATEFLAG_HAS_POSITION)
289  {
290  // 0x02
291  if (updateFlags & UPDATEFLAG_TRANSPORT && ((GameObject*)this)->GetGoType() == GAMEOBJECT_TYPE_MO_TRANSPORT)
292  {
293  *data << float(0);
294  *data << float(0);
295  *data << float(0);
296  *data << float(((WorldObject*)this)->GetOrientation());
297  }
298  else
299  {
300  *data << float(((WorldObject*)this)->GetPositionX());
301  *data << float(((WorldObject*)this)->GetPositionY());
302  *data << float(((WorldObject*)this)->GetPositionZ());
303  *data << float(((WorldObject*)this)->GetOrientation());
304  }
305  }
306 
307  // 0x20
308  if (updateFlags & UPDATEFLAG_LIVING)
309  {
310  // 0x00000200
311  if (moveFlags & MOVEMENTFLAG_ONTRANSPORT)
312  {
313  if (GetTypeId() == TYPEID_PLAYER)
314  {
315  *data << (uint64)ToPlayer()->GetTransport()->GetGUID();
316  *data << (float)ToPlayer()->GetTransOffsetX();
317  *data << (float)ToPlayer()->GetTransOffsetY();
318  *data << (float)ToPlayer()->GetTransOffsetZ();
319  *data << (float)ToPlayer()->GetTransOffsetO();
320  *data << (uint32)ToPlayer()->GetTransTime();
321  }
322  //Oregon currently not have support for other than player on transport
323  }
324 
325  // 0x02200000
326  if (moveFlags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING2))
327  {
328  if (GetTypeId() == TYPEID_PLAYER)
329  *data << (float)ToPlayer()->m_movementInfo.s_pitch;
330  else
331  *data << float(0); // is't part of movement packet, we must store and send it...
332  }
333 
334  if (GetTypeId() == TYPEID_PLAYER)
335  *data << (uint32)ToPlayer()->m_movementInfo.GetFallTime();
336  else
337  *data << uint32(0); // last fall time
338 
339  // 0x00001000
340  if (moveFlags & MOVEMENTFLAG_FALLING)
341  {
342  if (GetTypeId() == TYPEID_PLAYER)
343  {
344  *data << float(ToPlayer()->m_movementInfo.j_velocity);
345  *data << float(ToPlayer()->m_movementInfo.j_sinAngle);
346  *data << float(ToPlayer()->m_movementInfo.j_cosAngle);
347  *data << float(ToPlayer()->m_movementInfo.j_xyspeed);
348  }
349  else
350  {
351  *data << float(0);
352  *data << float(0);
353  *data << float(0);
354  *data << float(0);
355  }
356  }
357 
358  // 0x04000000
359  if (moveFlags & MOVEMENTFLAG_SPLINE_ELEVATION)
360  {
361  if (GetTypeId() == TYPEID_PLAYER)
362  *data << float(ToPlayer()->m_movementInfo.u_unk1);
363  else
364  *data << float(0);
365  }
366 
367  // Unit speeds
368  *data << ((Unit*)this)->GetSpeed(MOVE_WALK);
369  *data << ((Unit*)this)->GetSpeed(MOVE_RUN);
370  *data << ((Unit*)this)->GetSpeed(MOVE_RUN_BACK);
371  *data << ((Unit*)this)->GetSpeed(MOVE_SWIM);
372  *data << ((Unit*)this)->GetSpeed(MOVE_SWIM_BACK);
373  *data << ((Unit*)this)->GetSpeed(MOVE_FLIGHT);
374  *data << ((Unit*)this)->GetSpeed(MOVE_FLIGHT_BACK);
375  *data << ((Unit*)this)->GetSpeed(MOVE_TURN_RATE);
376 
377  // 0x08000000
378  if (moveFlags & MOVEMENTFLAG_SPLINE_ENABLED)
379  Movement::PacketBuilder::WriteCreate(*((Unit*)this)->movespline, *data);
380  }
381 
382  // 0x8
383  if (updateFlags & UPDATEFLAG_LOWGUID)
384  {
385  switch (GetTypeId())
386  {
387  case TYPEID_OBJECT:
388  case TYPEID_ITEM:
389  case TYPEID_CONTAINER:
390  case TYPEID_GAMEOBJECT:
392  case TYPEID_CORPSE:
393  *data << uint32(GetGUIDLow()); // GetGUIDLow()
394  break;
395  case TYPEID_UNIT:
396  *data << uint32(0x0000000B); // unk, can be 0xB or 0xC
397  break;
398  case TYPEID_PLAYER:
399  if (updateFlags & UPDATEFLAG_SELF)
400  *data << uint32(0x00000015); // unk, can be 0x15 or 0x22
401  else
402  *data << uint32(0x00000008); // unk, can be 0x7 or 0x8
403  break;
404  default:
405  *data << uint32(0x00000000); // unk
406  break;
407  }
408  }
409 
410  // 0x10
411  if (updateFlags & UPDATEFLAG_HIGHGUID)
412  {
413  switch (GetTypeId())
414  {
415  case TYPEID_OBJECT:
416  case TYPEID_ITEM:
417  case TYPEID_CONTAINER:
418  case TYPEID_GAMEOBJECT:
420  case TYPEID_CORPSE:
421  *data << uint32(GetGUIDHigh()); // GetGUIDHigh()
422  break;
423  default:
424  *data << uint32(0x00000000); // unk
425  break;
426  }
427  }
428 
429  // 0x4
430  if (updateFlags & UPDATEFLAG_HAS_ATTACKING_TARGET) // packed guid (probably target guid)
431  {
432  if (Unit const* me = ToUnit())
433  {
434  if (me->GetVictim())
435  *data << me->GetVictim()->GetPackGUID();
436  else
437  *data << uint8(0);
438  }
439  else
440  *data << uint8(0);
441  }
442 
443  // 0x2
444  if (updateFlags & UPDATEFLAG_TRANSPORT)
445  {
446  *data << uint32(getMSTime()); // ms time
447  }
448 }
float s_pitch
Definition: Object.h:440
float GetTransOffsetZ() const
Definition: Player.h:2408
uint32 GetUnitMovementFlags() const
Definition: Unit.h:1907
MovementInfo m_movementInfo
Definition: Object.h:890
uint32 getMSTime()
Definition: Timer.h:32
Transport * GetTransport() const
Definition: Player.h:2391
uint32 GetGUIDLow() const
Definition: Object.h:178
float GetTransOffsetX() const
Definition: Player.h:2400
Player * ToPlayer()
Definition: Object.h:368
uint64 GetGUID() const
Definition: Object.h:177
uint8 GetTypeId() const
Definition: Object.h:192
ACE_UINT8 uint8
Definition: Define.h:73
float GetTransOffsetO() const
Definition: Player.h:2412
float GetTransOffsetY() const
Definition: Player.h:2404
ACE_UINT64 uint64
Definition: Define.h:70
Definition: Unit.h:485
static void WriteCreate(const MoveSpline &mov, ByteBuffer &data)
uint32 GetGUIDHigh() const
Definition: Object.h:180
uint32 GetFallTime() const
Definition: Object.h:515
uint32 GetTransTime() const
Definition: Player.h:2416
ACE_UINT32 uint32
Definition: Define.h:71
Definition: Unit.h:908
Unit * ToUnit()
Definition: Object.h:374
void Object::_BuildValuesUpdate ( uint8  updatetype,
ByteBuffer data,
UpdateMask updateMask,
Player target 
) const
protected

Definition at line 450 of file Object.cpp.

References ByteBuffer::append(), ASSERT, CREATURE_FLAG_EXTRA_TRIGGER, DEBUG_LOG, CreatureInfo::flags_extra, GAMEOBJECT_ANIMPROGRESS, GAMEOBJECT_ARTKIT, GAMEOBJECT_DYN_FLAGS, GAMEOBJECT_TYPE_CHEST, GAMEOBJECT_TYPE_GOOBER, UpdateMask::GetBit(), UpdateMask::GetBlockCount(), UpdateMask::GetCount(), Creature::GetCreatureTemplate(), Unit::GetFaction(), Unit::GetFactionTemplateEntry(), Unit::GetHealthPct(), UpdateMask::GetLength(), UpdateMask::GetMask(), WorldObject::GetName(), GetTypeId(), GetUInt32Value(), GO_DYNFLAG_LO_ACTIVATE, GO_DYNFLAG_LO_SPARKLE, Player::isAllowedToLoot(), FactionTemplateEntry::IsFriendlyTo(), Player::IsGameMaster(), Player::IsInSameGroupWith(), Player::IsInSameRaidWith(), Creature::isTappedBy(), isType(), m_floatValues, m_uint32Values, m_valuesCount, CreatureInfo::modelid1, RAF_LINK_NONE, UpdateMask::SetBit(), Unit::ShouldRevealHealthTo(), sObjectMgr, ToCreature(), ToPlayer(), TYPEID_PLAYER, TYPEID_UNIT, TYPEMASK_GAMEOBJECT, TYPEMASK_UNIT, UNIT_BYTE2_FLAG_AURAS, UNIT_BYTE2_FLAG_SANCTUARY, UNIT_BYTE2_FLAG_UNK5, UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE, UNIT_DYNFLAG_OTHER_TAGGER, UNIT_DYNFLAG_REFER_A_FRIEND, UNIT_FIELD_BASEATTACKTIME, UNIT_FIELD_BYTES_2, UNIT_FIELD_DISPLAYID, UNIT_FIELD_FACTIONTEMPLATE, UNIT_FIELD_FLAGS, UNIT_FIELD_HEALTH, UNIT_FIELD_MAXHEALTH, UNIT_FIELD_NEGSTAT0, UNIT_FIELD_NEGSTAT4, UNIT_FIELD_POSSTAT0, UNIT_FIELD_POSSTAT4, UNIT_FIELD_RANGEDATTACKTIME, UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE, UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE, UNIT_FLAG_NOT_SELECTABLE, UNIT_NPC_FLAGS, UPDATETYPE_CREATE_OBJECT, UPDATETYPE_CREATE_OBJECT2, and value.

Referenced by BuildCreateUpdateBlockForPlayer(), and BuildValuesUpdateBlockForPlayer().

451 {
452  if (!target)
453  return;
454 
455  bool IsActivateToQuest = false;
456  if (updatetype == UPDATETYPE_CREATE_OBJECT || updatetype == UPDATETYPE_CREATE_OBJECT2)
457  {
458  if (isType(TYPEMASK_GAMEOBJECT) && !((GameObject*)this)->IsTransport())
459  {
460  if (((GameObject*)this)->ActivateToQuest(target) || target->IsGameMaster())
461  IsActivateToQuest = true;
462 
463  updateMask->SetBit(GAMEOBJECT_DYN_FLAGS);
464 
466  updateMask->SetBit(GAMEOBJECT_ARTKIT);
467  }
468  }
469  else //case UPDATETYPE_VALUES
470  {
471  if (isType(TYPEMASK_GAMEOBJECT) && !((GameObject*)this)->IsTransport())
472  {
473  if (((GameObject*)this)->ActivateToQuest(target) || target->IsGameMaster())
474  IsActivateToQuest = true;
475 
476  updateMask->SetBit(GAMEOBJECT_DYN_FLAGS);
477  updateMask->SetBit(GAMEOBJECT_ANIMPROGRESS);
478  }
479  }
480 
481  ASSERT(updateMask && updateMask->GetCount() == m_valuesCount);
482 
483  *data << (uint8)updateMask->GetBlockCount();
484  data->append(updateMask->GetMask(), updateMask->GetLength());
485 
486  // 2 specialized loops for speed optimization in non-unit case
487  if (isType(TYPEMASK_UNIT)) // unit (creature/player) case
488  {
489  for (uint16 index = 0; index < m_valuesCount; index ++)
490  {
491  if (updateMask->GetBit(index))
492  {
493  // remove custom flag before send
494  if (index == UNIT_NPC_FLAGS)
495  *data << uint32(m_uint32Values[index]);
496  // FIXME: Some values at server stored in float format but must be sent to client in uint32 format
497  else if (index >= UNIT_FIELD_BASEATTACKTIME && index <= UNIT_FIELD_RANGEDATTACKTIME)
498  {
499  // convert from float to uint32 and send
500  *data << uint32(m_floatValues[ index ] < 0 ? 0 : m_floatValues[ index ]);
501  }
502  // there are some float values which may be negative or can't get negative due to other checks
503  else if ((index >= UNIT_FIELD_NEGSTAT0 && index <= UNIT_FIELD_NEGSTAT4) ||
506  (index >= UNIT_FIELD_POSSTAT0 && index <= UNIT_FIELD_POSSTAT4))
507  *data << uint32(m_floatValues[ index ]);
508  // Gamemasters should be always able to select units - remove not selectable flag
509  else if (index == UNIT_FIELD_FLAGS && target->IsGameMaster())
510  *data << (m_uint32Values[ index ] & ~UNIT_FLAG_NOT_SELECTABLE);
511  // use modelid_a if not gm, _h if gm for CREATURE_FLAG_EXTRA_TRIGGER creatures
512  else if (index == UNIT_FIELD_DISPLAYID && GetTypeId() == TYPEID_UNIT)
513  {
514  const CreatureInfo* cinfo = ToCreature()->GetCreatureTemplate();
516  {
517  if (target->IsGameMaster())
518  {
519  if (cinfo->modelid1)
520  *data << cinfo->modelid1;
521  else
522  *data << 17519; // world invisible trigger's model
523  }
524  else
525  {
526  *data << 11686; // world invisible trigger's model
527  }
528  }
529  else
530  *data << m_uint32Values[ index ];
531  }
532  // hide lootable animation for unallowed players
533  else if (index == UNIT_DYNAMIC_FLAGS && GetTypeId() == TYPEID_UNIT)
534  {
535  uint32 value = m_uint32Values[index];
536 
537  if (Creature* creature = (Creature*)this)
538  if (!creature->loot.isLooted())
539  if (!(value & UNIT_DYNFLAG_LOOTABLE))
540  {
541  creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
542  value = value | UNIT_DYNFLAG_LOOTABLE;
543  }
544 
545  if (!target->isAllowedToLoot((Creature*)this))
546  if (value & UNIT_DYNFLAG_LOOTABLE)
547  value = value & ~UNIT_DYNFLAG_LOOTABLE;
548 
549  bool tapped = ToCreature()->isTappedBy(target->ToPlayer());
550 
551  if (value & UNIT_DYNFLAG_OTHER_TAGGER && tapped)
552  value = value & ~UNIT_DYNFLAG_OTHER_TAGGER;
553 
554  *data << value;
555  }
556 
557  // hide RAF menu to non-RAF linked friends
558  else if (index == UNIT_DYNAMIC_FLAGS && GetTypeId() == TYPEID_PLAYER)
559  {
560  if (sObjectMgr.GetRAFLinkStatus(target->ToPlayer(), this->ToPlayer()) != RAF_LINK_NONE)
561  *data << (m_uint32Values[ index ]);
562  else
563  *data << (m_uint32Values[ index ] & ~UNIT_DYNFLAG_REFER_A_FRIEND);
564  }
565  // FG: pretend that OTHER players in own group are friendly ("blue")
566  else if (index == UNIT_FIELD_BYTES_2 || index == UNIT_FIELD_FACTIONTEMPLATE)
567  {
568  bool ch = false;
569  if (target->GetTypeId() == TYPEID_PLAYER && GetTypeId() == TYPEID_PLAYER && target != this)
570  {
571  if (target->IsInSameGroupWith(ToPlayer()) || target->IsInSameRaidWith(ToPlayer()))
572  {
573  if (index == UNIT_FIELD_BYTES_2)
574  {
575  DEBUG_LOG("-- VALUES_UPDATE: Sending '%s' the blue-group-fix from '%s' (flag)", target->GetName(), ToPlayer()->GetName());
576  *data << (m_uint32Values[ index ] & ((UNIT_BYTE2_FLAG_SANCTUARY | UNIT_BYTE2_FLAG_AURAS | UNIT_BYTE2_FLAG_UNK5) << 8)); // this flag is at uint8 offset 1 !!
577 
578  ch = true;
579  }
580  else if (index == UNIT_FIELD_FACTIONTEMPLATE)
581  {
582  FactionTemplateEntry const* ft1, *ft2;
584  ft2 = target->ToPlayer()->GetFactionTemplateEntry();
585  if (ft1 && ft2 && !ft1->IsFriendlyTo(*ft2))
586  {
587  uint32 faction = target->ToPlayer()->GetFaction(); // pretend that all other HOSTILE players have own faction, to allow follow, heal, rezz (trade wont work)
588  DEBUG_LOG("-- VALUES_UPDATE: Sending '%s' the blue-group-fix from '%s' (faction %u)", target->GetName(), ToPlayer()->GetName(), faction);
589  *data << uint32(faction);
590  ch = true;
591  }
592  }
593  }
594  }
595  if (!ch)
596  *data << m_uint32Values[ index ];
597  }
598  else if (index == UNIT_FIELD_HEALTH)
599  {
600  if (GetTypeId() == TYPEID_UNIT || GetTypeId() == TYPEID_PLAYER)
601  {
602  const Unit* me = reinterpret_cast<const Unit*>(this);
603  if (me->ShouldRevealHealthTo(target))
604  *data << m_uint32Values[ index ];
605  else
606  *data << uint32(std::ceil(me->GetHealthPct()));
607  }
608  else
609  *data << m_uint32Values[ index ];
610  }
611  else if (index == UNIT_FIELD_MAXHEALTH)
612  {
613  if (GetTypeId() == TYPEID_UNIT || GetTypeId() == TYPEID_PLAYER)
614  {
615  const Unit* me = reinterpret_cast<const Unit*>(this);
616  if (me->ShouldRevealHealthTo(target))
617  *data << m_uint32Values[ index ];
618  else
619  *data << uint32(100);
620  }
621  else
622  *data << m_uint32Values[ index ];
623  }
624  else
625  {
626  // send in current format (float as float, uint32 as uint32)
627  *data << m_uint32Values[ index ];
628  }
629  }
630  }
631  }
632  else if (isType(TYPEMASK_GAMEOBJECT)) // gameobject case
633  {
634  for (uint16 index = 0; index < m_valuesCount; ++index)
635  {
636  if (updateMask->GetBit(index))
637  {
638  // send in current format (float as float, uint32 as uint32)
639  if (index == GAMEOBJECT_DYN_FLAGS)
640  {
641  if (IsActivateToQuest)
642  {
643  switch (((GameObject*)this)->GetGoType())
644  {
648  *data << uint16(-1);
649  break;
650  default:
651  *data << uint32(0); // unknown, not happen.
652  break;
653  }
654  }
655  else
656  *data << uint32(0); // disable quest object
657  }
658  else
659  *data << m_uint32Values[ index ]; // other cases
660  }
661  }
662  }
663  else // other objects case (no special index checks)
664  {
665  for (uint16 index = 0; index < m_valuesCount; ++index)
666  {
667  if (updateMask->GetBit(index))
668  {
669  // send in current format (float as float, uint32 as uint32)
670  *data << m_uint32Values[ index ];
671  }
672  }
673  }
674 }
bool GetBit(uint32 index)
Definition: UpdateMask.h:49
const uint32 & GetUInt32Value(uint16 index) const
Definition: Object.h:210
uint32 * m_uint32Values
Definition: Object.h:408
uint32 GetFaction() const
Definition: Unit.h:1116
bool isType(uint16 mask) const
Definition: Object.h:193
bool IsGameMaster() const
Definition: Player.h:1010
uint32 modelid1
Definition: Creature.h:134
#define sObjectMgr
Definition: ObjectMgr.h:1317
Player * ToPlayer()
Definition: Object.h:368
uint32 flags_extra
Definition: Creature.h:195
bool ShouldRevealHealthTo(Player *player) const
Definition: Unit.cpp:11001
uint8 * GetMask()
Definition: UpdateMask.h:66
uint8 GetTypeId() const
Definition: Object.h:192
ACE_UINT8 uint8
Definition: Define.h:73
bool IsFriendlyTo(FactionTemplateEntry const &entry) const
Definition: DBCStructure.h:314
etc mysql my cnf *Then change max_allowed_packet to a bigger value
#define DEBUG_LOG(...)
Definition: Log.h:194
const char * GetName() const
Definition: Object.h:680
bool IsInSameRaidWith(Player const *p) const
Definition: Player.h:1805
bool isAllowedToLoot(const Creature *creature)
Definition: Player.cpp:15041
void append(const std::string &str)
Definition: ByteBuffer.h:358
CreatureInfo const * GetCreatureTemplate() const
Definition: Creature.h:565
uint32 GetLength()
Definition: UpdateMask.h:58
Creature * ToCreature()
Definition: Object.h:371
float * m_floatValues
Definition: Object.h:409
uint16 m_valuesCount
Definition: Object.h:414
bool isTappedBy(Player const *player) const
Definition: Creature.cpp:1033
#define ASSERT
Definition: Errors.h:29
ACE_UINT16 uint16
Definition: Define.h:72
FactionTemplateEntry const * GetFactionTemplateEntry() const
Definition: Unit.cpp:7222
ACE_UINT32 uint32
Definition: Define.h:71
uint32 GetCount()
Definition: UpdateMask.h:62
void SetBit(uint32 index)
Definition: UpdateMask.h:39
Definition: Unit.h:908
bool IsInSameGroupWith(Player const *p) const
Definition: Player.cpp:2319
uint32 GetBlockCount()
Definition: UpdateMask.h:54
float GetHealthPct() const
Definition: Unit.h:1085
void Object::_Create ( uint32  guidlow,
uint32  entry,
HighGuid  guidhigh 
)
protected

Definition at line 125 of file Object.cpp.

References _InitValues(), m_objectType, m_PackGUID, m_uint32Values, MAKE_NEW_GUID, OBJECT_FIELD_GUID, OBJECT_FIELD_TYPE, PackedGuid::Set(), SetUInt32Value(), and SetUInt64Value().

Referenced by WorldObject::_Create(), Transport::Create(), Bag::Create(), Corpse::Create(), Pet::Create(), Item::Create(), GameObject::Create(), Player::Create(), Creature::CreateFromProto(), Player::Initialize(), Item::LoadFromDB(), and Player::LoadFromDB().

126 {
127  if (!m_uint32Values)
128  _InitValues();
129 
130  uint64 guid = MAKE_NEW_GUID(guidlow, entry, guidhigh);
133  m_PackGUID.Set(guid);
134 }
uint32 * m_uint32Values
Definition: Object.h:408
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:777
uint16 m_objectType
Definition: Object.h:400
PackedGuid m_PackGUID
Definition: Object.h:421
#define MAKE_NEW_GUID(l, e, h)
Definition: ObjectGuid.h:80
void SetUInt64Value(uint16 index, const uint64 &value)
Definition: Object.cpp:796
ACE_UINT64 uint64
Definition: Define.h:70
void Set(uint64 const &guid)
Definition: ObjectGuid.h:302
void _InitValues()
Definition: Object.cpp:114
void Object::_InitValues ( )
protected

Definition at line 114 of file Object.cpp.

References m_objectUpdated, m_uint32Values, m_uint32Values_mirror, and m_valuesCount.

Referenced by _Create(), and LoadValues().

115 {
117  memset(m_uint32Values, 0, m_valuesCount * sizeof(uint32));
118 
120  memset(m_uint32Values_mirror, 0, m_valuesCount * sizeof(uint32));
121 
122  m_objectUpdated = false;
123 }
bool m_objectUpdated
Definition: Object.h:416
uint32 * m_uint32Values
Definition: Object.h:408
uint32 * m_uint32Values_mirror
Definition: Object.h:412
uint16 m_valuesCount
Definition: Object.h:414
ACE_UINT32 uint32
Definition: Define.h:71
void Object::_LoadIntoDataField ( const char *  data,
uint32  startOffset,
uint32  count 
)
protected

Definition at line 719 of file Object.cpp.

References atol, m_uint32Values, and StrSplit().

Referenced by Corpse::LoadCorpseFromDB(), and Item::LoadFromDB().

720 {
721  if (!data)
722  return;
723 
724  Tokens tokens = StrSplit(data, " ");
725 
726  if (tokens.size() != count)
727  return;
728 
729  Tokens::iterator iter;
730  uint32 index;
731  for (iter = tokens.begin(), index = 0; index < count; ++iter, ++index)
732  m_uint32Values[startOffset + index] = atol((*iter).c_str());
733 }
uint32 * m_uint32Values
Definition: Object.h:408
std::vector< std::string > Tokens
Definition: Util.h:26
Tokens StrSplit(const std::string &src, const std::string &sep)
Definition: Util.cpp:58
ACE_UINT32 uint32
Definition: Define.h:71
#define atol(a)
Definition: Common.h:162
void Object::_SetCreateBits ( UpdateMask updateMask,
Player target 
) const
protectedvirtual

Reimplemented in Player.

Definition at line 747 of file Object.cpp.

References m_uint32Values, m_valuesCount, UpdateMask::SetBit(), and value.

Referenced by Player::_SetCreateBits(), and BuildCreateUpdateBlockForPlayer().

748 {
750 
751  for (uint16 index = 0; index < m_valuesCount; ++index, ++value)
752  {
753  if (*value)
754  updateMask->SetBit(index);
755  }
756 }
uint32 * m_uint32Values
Definition: Object.h:408
etc mysql my cnf *Then change max_allowed_packet to a bigger value
uint16 m_valuesCount
Definition: Object.h:414
ACE_UINT16 uint16
Definition: Define.h:72
ACE_UINT32 uint32
Definition: Define.h:71
void SetBit(uint32 index)
Definition: UpdateMask.h:39
void Object::_SetUpdateBits ( UpdateMask updateMask,
Player target 
) const
protectedvirtual

Reimplemented in Player.

Definition at line 735 of file Object.cpp.

References m_uint32Values, m_uint32Values_mirror, m_valuesCount, UpdateMask::SetBit(), and value.

Referenced by Player::_SetUpdateBits(), and BuildValuesUpdateBlockForPlayer().

736 {
738  uint32* mirror = m_uint32Values_mirror;
739 
740  for (uint16 index = 0; index < m_valuesCount; ++index, ++value, ++mirror)
741  {
742  if (*mirror != *value)
743  updateMask->SetBit(index);
744  }
745 }
uint32 * m_uint32Values
Definition: Object.h:408
uint32 * m_uint32Values_mirror
Definition: Object.h:412
etc mysql my cnf *Then change max_allowed_packet to a bigger value
uint16 m_valuesCount
Definition: Object.h:414
ACE_UINT16 uint16
Definition: Define.h:72
ACE_UINT32 uint32
Definition: Define.h:71
void SetBit(uint32 index)
Definition: UpdateMask.h:39
virtual void Object::AddToWorld ( )
inlinevirtual

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

Definition at line 154 of file Object.h.

References ASSERT.

Referenced by Player::_StoreItem(), DynamicObject::AddToWorld(), Bag::AddToWorld(), Corpse::AddToWorld(), GameObject::AddToWorld(), Unit::AddToWorld(), Player::AddToWorld(), Player::EquipItem(), Guild::LoadGuildBankFromDB(), and Player::QuickEquipItem().

155  {
156  if (m_inWorld)
157  return;
158 
160 
161  m_inWorld = true;
162 
163  // synchronize values mirror with values array (changes will send in updatecreate opcode any way
164  ClearUpdateMask(true);
165  }
void ClearUpdateMask(bool remove)
Definition: Object.cpp:676
bool m_inWorld
Definition: Object.h:419
uint32 * m_uint32Values
Definition: Object.h:408
#define ASSERT
Definition: Errors.h:29
bool Object::AddUInt64Value ( uint16  index,
const uint64 value 
)

Definition at line 815 of file Object.cpp.

References ObjectAccessor::AddUpdateObject(), ASSERT, Oregon::Singleton< ObjectAccessor, Oregon::ClassLevelLockable< ObjectAccessor, ACE_Thread_Mutex > >::Instance(), m_inWorld, m_objectUpdated, m_uint32Values, m_valuesCount, and PrintIndexError().

Referenced by Unit::SetCharm(), Unit::SetMinion(), and Player::SetViewpoint().

816 {
817  ASSERT(index + 1 < m_valuesCount || PrintIndexError(index , true));
818  if (value && !*((uint64*) & (m_uint32Values[index])))
819  {
820  m_uint32Values[ index ] = *((uint32*)&value);
821  m_uint32Values[ index + 1 ] = *(((uint32*)&value) + 1);
822 
823  if (m_inWorld)
824  {
825  if (!m_objectUpdated)
826  {
828  m_objectUpdated = true;
829  }
830  }
831  return true;
832  }
833  return false;
834 }
bool m_objectUpdated
Definition: Object.h:416
bool m_inWorld
Definition: Object.h:419
uint32 * m_uint32Values
Definition: Object.h:408
void AddUpdateObject(Object *obj)
etc mysql my cnf *Then change max_allowed_packet to a bigger value
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
ACE_UINT64 uint64
Definition: Define.h:70
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
ACE_UINT32 uint32
Definition: Define.h:71
void Object::ApplyModFlag ( uint16  index,
uint32  flag,
bool  apply 
)
inline

Definition at line 305 of file Object.h.

Referenced by Aura::HandleAuraTrackStealthed(), Aura::HandleModUnattackable(), WorldSession::HandleTogglePvP(), Player::KillPlayer(), Player::LoadCorpse(), and Item::LoadFromDB().

306  {
307  if (apply) SetFlag(index, flag);
308  else RemoveFlag(index, flag);
309  }
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:983
void apply(T *val)
Definition: ByteConverter.h:41
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1004
void Object::ApplyModFlag64 ( uint16  index,
uint64  flag,
bool  apply 
)
inline

Definition at line 339 of file Object.h.

340  {
341  if (apply) SetFlag64(index, flag);
342  else RemoveFlag64(index, flag);
343  }
void apply(T *val)
Definition: ByteConverter.h:41
void SetFlag64(uint16 index, uint64 newFlag)
Definition: Object.h:311
void RemoveFlag64(uint16 index, uint64 oldFlag)
Definition: Object.h:318
void Object::ApplyModInt32Value ( uint16  index,
int32  val,
bool  apply 
)

Definition at line 953 of file Object.cpp.

References GetInt32Value(), and SetInt32Value().

Referenced by Aura::HandleModPowerCost(), and Aura::HandleModTargetResistance().

954 {
955  int32 cur = GetInt32Value(index);
956  cur += (apply ? val : -val);
957  SetInt32Value(index, cur);
958 }
void SetInt32Value(uint16 index, int32 value)
Definition: Object.cpp:758
ACE_INT32 int32
Definition: Define.h:67
void apply(T *val)
Definition: ByteConverter.h:41
const int32 & GetInt32Value(uint16 index) const
Definition: Object.h:204
void Object::ApplyModPositiveFloatValue ( uint16  index,
float  val,
bool  apply 
)

Definition at line 974 of file Object.cpp.

References GetFloatValue(), and SetFloatValue().

975 {
976  float cur = GetFloatValue(index);
977  cur += (apply ? val : -val);
978  if (cur < 0)
979  cur = 0;
980  SetFloatValue(index, cur);
981 }
void apply(T *val)
Definition: ByteConverter.h:41
void SetFloatValue(uint16 index, float value)
Definition: Object.cpp:857
const float & GetFloatValue(uint16 index) const
Definition: Object.h:222
void Object::ApplyModSignedFloatValue ( uint16  index,
float  val,
bool  apply 
)

Definition at line 960 of file Object.cpp.

References GetFloatValue(), and SetFloatValue().

Referenced by Aura::HandleModDamagePercentDone(), and Aura::HandleModPowerCostPCT().

961 {
962  float cur = GetFloatValue(index);
963  cur += (apply ? val : -val);
964  SetFloatValue(index, cur);
965 }
void apply(T *val)
Definition: ByteConverter.h:41
void SetFloatValue(uint16 index, float value)
Definition: Object.cpp:857
const float & GetFloatValue(uint16 index) const
Definition: Object.h:222
void Object::ApplyModUInt32Value ( uint16  index,
int32  val,
bool  apply 
)

Definition at line 944 of file Object.cpp.

References GetUInt32Value(), and SetUInt32Value().

Referenced by Player::_ApplyWeaponDependentAuraDamageMod(), Unit::ApplyMaxPowerMod(), Unit::ApplyPowerMod(), Player::ApplyRatingMod(), Aura::HandleAuraEmpathy(), Aura::HandleModDamageDone(), and Player::RewardHonor().

945 {
946  int32 cur = GetUInt32Value(index);
947  cur += (apply ? val : -val);
948  if (cur < 0)
949  cur = 0;
950  SetUInt32Value(index, cur);
951 }
const uint32 & GetUInt32Value(uint16 index) const
Definition: Object.h:210
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:777
ACE_INT32 int32
Definition: Define.h:67
void apply(T *val)
Definition: ByteConverter.h:41
void Object::ApplyModUInt64Value ( uint16  index,
int32  val,
bool  apply 
)
void Object::ApplyPercentModFloatValue ( uint16  index,
float  val,
bool  apply 
)

Definition at line 967 of file Object.cpp.

References ApplyPercentModFloatVar(), GetFloatValue(), SetFloatValue(), and value.

968 {
969  float value = GetFloatValue(index);
970  ApplyPercentModFloatVar(value, val, apply);
971  SetFloatValue(index, value);
972 }
void apply(T *val)
Definition: ByteConverter.h:41
etc mysql my cnf *Then change max_allowed_packet to a bigger value
void ApplyPercentModFloatVar(float &var, float val, bool apply)
Definition: Util.h:88
void SetFloatValue(uint16 index, float value)
Definition: Object.cpp:857
const float & GetFloatValue(uint16 index) const
Definition: Object.h:222
void Object::BuildCreateUpdateBlockForPlayer ( UpdateData data,
Player target 
) const
virtual

lower flag1

Reimplemented in Player, and Bag.

Definition at line 148 of file Object.cpp.

References _BuildMovementUpdate(), _BuildValuesUpdate(), _SetCreateBits(), UpdateData::AddUpdateBlock(), GAMEOBJECT_TYPE_DUEL_ARBITER, GAMEOBJECT_TYPE_FLAGDROP, GAMEOBJECT_TYPE_FLAGSTAND, GAMEOBJECT_TYPE_TRANSPORT, GAMEOBJECT_TYPE_TRAP, GetGUID(), Unit::GetPetGUID(), isType(), m_objectTypeId, m_updateFlag, m_valuesCount, UpdateMask::SetCount(), TYPEMASK_CORPSE, TYPEMASK_DYNAMICOBJECT, TYPEMASK_GAMEOBJECT, TYPEMASK_PLAYER, UPDATEFLAG_HAS_POSITION, UPDATEFLAG_SELF, UPDATEFLAG_TRANSPORT, UPDATETYPE_CREATE_OBJECT, and UPDATETYPE_CREATE_OBJECT2.

Referenced by Bag::BuildCreateUpdateBlockForPlayer(), Player::BuildCreateUpdateBlockForPlayer(), SendUpdateToPlayer(), and Transport::UpdateForMap().

149 {
150  if (!target)
151  return;
152 
153  uint8 updatetype = UPDATETYPE_CREATE_OBJECT;
154  uint8 flags = m_updateFlag;
155 
157  if (target == this) // building packet for oneself
158  flags |= UPDATEFLAG_SELF;
159 
160  if (flags & UPDATEFLAG_HAS_POSITION)
161  {
162  // UPDATETYPE_CREATE_OBJECT2 dynamic objects, corpses...
164  updatetype = UPDATETYPE_CREATE_OBJECT2;
165 
166  // UPDATETYPE_CREATE_OBJECT2 for pets...
167  if (target->GetPetGUID() == GetGUID())
168  updatetype = UPDATETYPE_CREATE_OBJECT2;
169 
170  // UPDATETYPE_CREATE_OBJECT2 for some gameobject types...
172  {
173  switch (((GameObject*)this)->GetGoType())
174  {
179  updatetype = UPDATETYPE_CREATE_OBJECT2;
180  break;
182  flags |= UPDATEFLAG_TRANSPORT;
183  break;
184  default:
185  break;
186  }
187  }
188  }
189 
190  //sLog.outDebug("BuildCreateUpdate: update-type: %u, object-type: %u got flags: %X, flags2: %X", updatetype, m_objectTypeId, flags, flags2);
191 
192  ByteBuffer buf(500);
193  buf << (uint8)updatetype;
194  //buf << GetPackGUID(); //client crashes when using this
195  buf << (uint8)0xFF << GetGUID();
196  buf << (uint8)m_objectTypeId;
197 
198  _BuildMovementUpdate(&buf, flags);
199 
200  UpdateMask updateMask;
201  updateMask.SetCount(m_valuesCount);
202  _SetCreateBits(&updateMask, target);
203  _BuildValuesUpdate(updatetype, &buf, &updateMask, target);
204  data->AddUpdateBlock(buf);
205 }
void _BuildMovementUpdate(ByteBuffer *data, uint8 updateFlags) const
Definition: Object.cpp:253
void _BuildValuesUpdate(uint8 updatetype, ByteBuffer *data, UpdateMask *updateMask, Player *target) const
Definition: Object.cpp:450
bool isType(uint16 mask) const
Definition: Object.h:193
uint8 m_objectTypeId
Definition: Object.h:402
uint64 GetGUID() const
Definition: Object.h:177
ACE_UINT8 uint8
Definition: Define.h:73
uint8 m_updateFlag
Definition: Object.h:403
uint64 GetPetGUID() const
Definition: Unit.h:1378
void AddUpdateBlock(const ByteBuffer &block)
Definition: UpdateData.cpp:41
virtual void _SetCreateBits(UpdateMask *updateMask, Player *target) const
Definition: Object.cpp:747
void SetCount(uint32 valuesCount)
Definition: UpdateMask.h:71
uint16 m_valuesCount
Definition: Object.h:414
void Object::BuildFieldsUpdate ( Player pl,
UpdateDataMapType data_map 
) const

Definition at line 688 of file Object.cpp.

References ASSERT, and BuildValuesUpdateBlockForPlayer().

Referenced by WorldObjectChangeAccumulator::BuildPacket(), and Item::BuildUpdate().

689 {
690  UpdateDataMapType::iterator iter = data_map.find(pl);
691 
692  if (iter == data_map.end())
693  {
694  std::pair<UpdateDataMapType::iterator, bool> p = data_map.insert(UpdateDataMapType::value_type(pl, UpdateData()));
695  ASSERT(p.second);
696  iter = p.first;
697  }
698 
699  BuildValuesUpdateBlockForPlayer(&iter->second, iter->first);
700 }
void BuildValuesUpdateBlockForPlayer(UpdateData *data, Player *target) const
Definition: Object.cpp:218
#define ASSERT
Definition: Errors.h:29
void Object::BuildMovementUpdateBlock ( UpdateData data,
uint32  flags = 0 
) const

Definition at line 136 of file Object.cpp.

References _BuildMovementUpdate(), UpdateData::AddUpdateBlock(), GetGUID(), and UPDATETYPE_MOVEMENT.

137 {
138  ByteBuffer buf(500);
139 
140  buf << uint8(UPDATETYPE_MOVEMENT);
141  buf << GetGUID();
142 
143  _BuildMovementUpdate(&buf, flags);
144 
145  data->AddUpdateBlock(buf);
146 }
void _BuildMovementUpdate(ByteBuffer *data, uint8 updateFlags) const
Definition: Object.cpp:253
uint64 GetGUID() const
Definition: Object.h:177
ACE_UINT8 uint8
Definition: Define.h:73
void AddUpdateBlock(const ByteBuffer &block)
Definition: UpdateData.cpp:41
void Object::BuildOutOfRangeUpdateBlock ( UpdateData data) const

Definition at line 236 of file Object.cpp.

References UpdateData::AddOutOfRangeGUID(), and GetGUID().

Referenced by Transport::UpdateForMap().

237 {
238  data->AddOutOfRangeGUID(GetGUID());
239 }
void AddOutOfRangeGUID(std::set< uint64 > &guids)
Definition: UpdateData.cpp:31
uint64 GetGUID() const
Definition: Object.h:177
virtual void Object::BuildUpdate ( UpdateDataMapType )
inlinevirtual

Reimplemented in WorldObject, and Item.

Definition at line 362 of file Object.h.

Referenced by ObjectAccessor::Update().

362 {}
void Object::BuildValuesUpdateBlockForPlayer ( UpdateData data,
Player target 
) const

Definition at line 218 of file Object.cpp.

References _BuildValuesUpdate(), _SetUpdateBits(), UpdateData::AddUpdateBlock(), GetGUID(), m_valuesCount, UpdateMask::SetCount(), and UPDATETYPE_VALUES.

Referenced by BuildFieldsUpdate(), GameObject::Update(), and Player::UpdateTriggerVisibility().

219 {
220  ByteBuffer buf(500);
221 
222  buf << (uint8) UPDATETYPE_VALUES;
223  //buf << GetPackGUID(); //client crashes when using this. but not have crash in debug mode
224  buf << (uint8)0xFF;
225  buf << GetGUID();
226 
227  UpdateMask updateMask;
228  updateMask.SetCount(m_valuesCount);
229 
230  _SetUpdateBits(&updateMask, target);
231  _BuildValuesUpdate(UPDATETYPE_VALUES, &buf, &updateMask, target);
232 
233  data->AddUpdateBlock(buf);
234 }
void _BuildValuesUpdate(uint8 updatetype, ByteBuffer *data, UpdateMask *updateMask, Player *target) const
Definition: Object.cpp:450
virtual void _SetUpdateBits(UpdateMask *updateMask, Player *target) const
Definition: Object.cpp:735
uint64 GetGUID() const
Definition: Object.h:177
ACE_UINT8 uint8
Definition: Define.h:73
void AddUpdateBlock(const ByteBuffer &block)
Definition: UpdateData.cpp:41
void SetCount(uint32 valuesCount)
Definition: UpdateMask.h:71
uint16 m_valuesCount
Definition: Object.h:414
void Object::ClearUpdateMask ( bool  remove)
void Object::DestroyForPlayer ( Player target,
bool  onDeath = false 
) const
virtual

If the following bool is true, the client will call "void CGUnit_C::OnDeath()" for this object. OnDeath() does for eg trigger death animation and interrupts certain spells/missiles/auras/sounds...

Reimplemented in Player.

Definition at line 241 of file Object.cpp.

References ASSERT, GetGUID(), Player::GetSession(), WorldSession::SendPacket(), and SMSG_DESTROY_OBJECT.

Referenced by Player::_StoreItem(), WorldObject::DestroyForNearbyPlayers(), Player::DestroyForPlayer(), Player::DestroyItem(), Player::EquipItem(), and Player::UpdateVisibilityOf().

242 {
243  ASSERT(target);
244 
245  WorldPacket data(SMSG_DESTROY_OBJECT, 8 + 1);
246  data << uint64(GetGUID());
249  data << uint8(onDeath ? 1 : 0);
250  target->GetSession()->SendPacket(&data);
251 }
void SendPacket(WorldPacket const *packet)
uint64 GetGUID() const
Definition: Object.h:177
ACE_UINT8 uint8
Definition: Define.h:73
ACE_UINT64 uint64
Definition: Define.h:70
#define ASSERT
Definition: Errors.h:29
WorldSession * GetSession() const
Definition: Player.h:1947
void Object::ForceValuesUpdateAtIndex ( uint32  i)

Definition at line 1827 of file Object.cpp.

References ObjectAccessor::AddUpdateObject(), GetUInt32Value(), Oregon::Singleton< ObjectAccessor, Oregon::ClassLevelLockable< ObjectAccessor, ACE_Thread_Mutex > >::Instance(), m_inWorld, m_objectUpdated, and m_uint32Values_mirror.

Referenced by WorldSession::DoLootRelease(), Aura::HandleAuraModShapeshift(), and Unit::SendHealthUpdateDueToCharm().

1828 {
1829  m_uint32Values_mirror[i] = GetUInt32Value(i) + 1; // makes server think the field changed
1830  if (m_inWorld)
1831  {
1832  if (!m_objectUpdated)
1833  {
1835  m_objectUpdated = true;
1836  }
1837  }
1838 }
bool m_objectUpdated
Definition: Object.h:416
const uint32 & GetUInt32Value(uint16 index) const
Definition: Object.h:210
bool m_inWorld
Definition: Object.h:419
uint32 * m_uint32Values_mirror
Definition: Object.h:412
void AddUpdateObject(Object *obj)
uint8 Object::GetByteValue ( uint16  index,
uint8  offset 
) const
inline

Definition at line 228 of file Object.h.

References ASSERT.

Referenced by Unit::_IsValidAssistTarget(), WorldSession::HandleBuyBankSlotOpcode(), WorldSession::HandleMirrorImageDataRequest(), WorldSession::HandlePetRename(), Player::HasBankBagSlot(), Unit::haveOffhandWeapon(), Pet::SavePetToDB(), Unit::SetCharm(), and Unit::SetMinion().

229  {
230  ASSERT(index < m_valuesCount || PrintIndexError(index , false));
231  ASSERT(offset < 4);
232  return *(((uint8*)&m_uint32Values[ index ]) + offset);
233  }
uint32 * m_uint32Values
Definition: Object.h:408
ACE_UINT8 uint8
Definition: Define.h:73
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
uint32 Object::GetEntry ( ) const
inline

Definition at line 186 of file Object.h.

References OBJECT_FIELD_ENTRY.

Referenced by Guild::_CanStoreItem_InSpecificSlot(), Guild::_CanStoreItem_InTab(), Map::_GetScriptCreature(), Map::_GetScriptCreatureSourceOrTarget(), Map::_GetScriptPlayer(), Map::_GetScriptPlayerSourceOrTarget(), Map::_GetScriptUnit(), Map::_GetScriptWorldObject(), Unit::_IsValidAttackTarget(), Player::_SaveInventory(), Map::_ScriptProcessDoor(), Guild::_StoreItem(), Player::_StoreItem(), GameObject::ActivateToQuest(), BattlegroundAV::AddAVCreature(), InstanceData::AddDoor(), Player::AddItemToBuyBackSlot(), InstanceData::AddMinion(), AuctionHouseBot::addNewAuctions(), WorldObject::AddObjectToRemoveList(), Player::AddQuestAndCheckCompletion(), Map::AddToActive(), Guild::AppendDisplayGuildBankSlot(), Player::ApplyEquipCooldown(), TotemAI::AttackStart(), AuctionEntry::BuildAuctionInfo(), Player::CanBankItem(), Item::CanBeMergedPartlyWith(), CreatureEventAI::CanCast(), Player::CanEquipItem(), Creature::CanInteractWithBattleMaster(), Guild::CanStoreItem(), Player::CanStoreItem(), Player::CanStoreItems(), Player::CanTakeMoreSimilarItems(), Player::CanUnequipItem(), Player::CanUseItem(), Unit::CastCustomSpell(), Pet::CastPetAura(), Unit::CastSpell(), Spell::CheckDummyCast(), Spell::CheckItems(), AreaAura::CheckTarget(), Item::CloneItem(), Pet::CreateBaseAtCreature(), Unit::CreateTamedPetFrom(), Map::CreatureCellRelocation(), CreatureEventAI::CreatureEventAI(), Map::CreatureRelocation(), Map::CreatureRespawnRelocation(), SummonList::DespawnEntry(), Player::DestroyItem(), Player::DestroyItemCount(), SummonList::DoAction(), Spell::DoAllEffectOnTarget(), ScriptedAI::DoResetThreat(), DoScriptText(), CreatureEventAI::DoScriptText(), ScriptedAI::DoTeleportPlayer(), ScriptedAI::DoTeleportTo(), InstanceData::DoUseDoorOrButton(), SummonList::DoZoneInCombat(), CreatureAI::DoZoneInCombat(), CreatureAI::DoZoneInCombatWithPlayers(), Spell::EffectDummy(), Spell::EffectEnchantItemPerm(), Spell::EffectEnchantItemTmp(), Spell::EffectInebriate(), Spell::EffectInstaKill(), Spell::EffectOpenLock(), Spell::EffectPersistentAA(), Spell::EffectScriptEffect(), Spell::EffectSummonPet(), Spell::EffectSummonType(), guardAI::EnterCombat(), ScriptedAI::EnterEvadeIfOutOfCombatArea(), CreatureAI::EnterEvadeMode(), BattlegroundAV::EventPlayerClickedOnFlag(), npc_escortAI::FillPointMovementListForCreature(), SmartScript::FillScript(), Creature::GetAIName(), WorldSession::getDialogStatus(), Bag::GetItemCount(), Player::GetItemCount(), Player::GetItemOrItemWithGemEquipped(), Creature::GetNameForLocaleIdx(), GameObject::GetNameForLocaleIdx(), Player::GetNextQuest(), Item::GetProto(), Creature::GetScriptId(), Creature::GetTrainerSpells(), Creature::GetVendorItems(), ChatHandler::HandleAddVendorItemCommand(), WorldSession::HandleAuctionSellItem(), Aura::HandleAuraDummy(), WorldSession::HandleBattlegroundHelloOpcode(), WorldSession::HandleBuybackItem(), ChatHandler::HandleCreatePetCommand(), ChatHandler::HandleDelVendorItemCommand(), WorldSession::HandleGetMail(), WorldSession::HandleGossipHelloOpcode(), ChatHandler::HandleGPSCommand(), WorldSession::HandleGuildBankDepositItem(), BattlegroundAV::HandleKillUnit(), ChatHandler::HandleNpcFactionIdCommand(), ChatHandler::HandleNpcFlagCommand(), ChatHandler::HandleNpcInfoCommand(), WorldSession::HandlePetAction(), Unit::HandleProcTriggerSpell(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleSendMail(), WorldSession::HandleTakeItem(), WorldSession::HandleTotemDestroy(), Battleground::HandleTriggerBuff(), WorldSession::HandleUseItemOpcode(), ChatHandler::HandleWpLoadPathCommand(), ChatHandler::HandleWpModifyCommand(), ChatHandler::HandleWpShowCommand(), WorldSession::HandleWrapItemOpcode(), Creature::hasInvolvedQuest(), GameObject::hasInvolvedQuest(), Player::HasItemCount(), Creature::hasQuest(), GameObject::hasQuest(), Pet::InitPetCreateSpells(), Totem::InitStats(), Guardian::InitStatsForLevel(), SmartScript::IsSmart(), SmartScript::IsSmartGO(), Creature::IsTrainerOf(), Creature::LoadCreaturesAddon(), Bag::LoadFromDB(), Pet::LoadPetFromDB(), MailSender::MailSender(), Map::MoveAllCreaturesInMoveList(), MotionMaster::MoveCharge(), MotionMaster::MoveChase(), MotionMaster::MoveConfused(), MotionMaster::MoveDistract(), MotionMaster::MoveFleeing(), MotionMaster::MoveFollow(), WorldSession::moveItems(), Player::MoveItemToInventory(), MotionMaster::MovePoint(), MotionMaster::MoveSeekAssistance(), MotionMaster::MoveSeekAssistanceDistract(), MotionMaster::MoveTargetedHome(), MotionMaster::MoveTaxiFlight(), Player::OnGossipSelect(), CreatureTextBuilder::operator()(), PlayerTextBuilder::operator()(), Oregon::NearestGameObjectEntryInObjectRangeCheck::operator()(), Oregon::NearestCreatureEntryWithLiveStateInObjectRangeCheck::operator()(), Oregon::AllGameObjectsWithEntryInRange::operator()(), Oregon::AllCreaturesOfEntryInRange::operator()(), SmartAI::PausePath(), Player::PrepareGossipMenu(), Player::PrepareQuestMenu(), SmartScript::ProcessAction(), CreatureEventAI::ProcessAction(), SmartScript::ProcessEvent(), CreatureEventAI::ProcessEvent(), Unit::RemoveAllControlled(), Unit::RemoveAllMinionsByEntry(), Map::RemoveFromActive(), Unit::RemoveFromWorld(), Player::RemoveItem(), Player::RemovePet(), Creature::Respawn(), Player::RewardPlayerAndGroupAtKill(), Pet::SavePetToDB(), Item::SaveToDB(), Creature::SaveToDB(), GameObject::SaveToDB(), Map::ScriptsProcess(), Spell::SearchNearbyTarget(), Creature::SelectNearestTargetInAttackDistance(), AuctionHouseMgr::SendAuctionWonMail(), CreatureTextMgr::SendChat(), Spell::SendLoot(), Player::SendLoot(), MailDraft::SendMailTo(), Player::SendNewItem(), Spell::SendSpellCooldown(), WorldSession::SendStablePet(), WorldSession::SendTrainerList(), Unit::SetCharm(), Unit::SetCharmedBy(), ScriptedAI::SetEquipmentSlots(), Creature::SetInCombatWithZone(), SpellCastTargets::setItemTarget(), Unit::SetMinion(), Spell::SetTargetMap(), Creature::SetTextRepeatId(), Player::SetViewpoint(), Player::SetVisibleItemSlot(), Player::SplitItem(), npc_escortAI::Start(), SmartAI::StartPath(), Player::StopCastingCharm(), Spell::SummonClassPet(), WorldObject::SummonCreatureGroup(), Player::SummonPet(), Player::SwapItem(), Player::TeleportTo(), Transport::Update(), TempSummon::Update(), SpellCastTargets::Update(), Pet::Update(), Spell::update(), Creature::Update(), Guardian::UpdateAttackPowerAndDamage(), Guardian::UpdateDamagePhysical(), InstanceData::UpdateDoorState(), Item::UpdateDuration(), Item::UpdateItemSuffixFactor(), Guardian::UpdateMaxHealth(), Guardian::UpdateMaxPower(), Creature::UpdateMovementFlags(), CreatureEventAIHolder::UpdateRepeatTimer(), GameObject::Use(), Player::VisualizeItem(), Bag::~Bag(), and WorldObject::~WorldObject().

const uint32 & GetUInt32Value(uint16 index) const
Definition: Object.h:210
uint64 Object::GetGUID ( ) const
inline

Definition at line 177 of file Object.h.

Referenced by _BuildMovementUpdate(), Player::_LoadArenaTeamInfo(), Pet::_LoadAuras(), Player::_LoadAuras(), Player::_LoadGroup(), Player::_LoadInventory(), Player::_LoadMailedItems(), Pet::_LoadSpellCooldowns(), Pet::_SaveAuras(), Player::_SaveAuras(), Player::_StoreItem(), Player::AddComboPoints(), Battleground::AddCreature(), Creature::AddCreatureSpellCooldown(), Unit::AddDynObject(), Player::AddEnchantmentDuration(), Unit::AddGameObject(), Spell::AddGOTarget(), Player::AddItemToBuyBackSlot(), Group::AddLeaderInvite(), Group::AddMember(), Battleground::AddObject(), BattlegroundAA::AddPlayer(), BattlegroundRL::AddPlayer(), BattlegroundBE::AddPlayer(), BattlegroundNA::AddPlayer(), BattlegroundQueue::AddPlayer(), BattlegroundWS::AddPlayer(), BattlegroundAB::AddPlayer(), BattlegroundEY::AddPlayer(), Battleground::AddPlayer(), BattlegroundAV::AddPlayer(), Battleground::AddSpiritGuide(), Item::AddToUpdateQueueOf(), GameObject::AddUniqueUse(), Spell::AddUnitTarget(), Player::ApplyEquipCooldown(), Player::ApplyEquipSpell(), Pet::ApplyModeFlags(), Unit::Attack(), TotemAI::AttackStart(), Aura::Aura(), Group::BroadcastPacket(), Group::BroadcastReadyCheck(), BuildCreateUpdateBlockForPlayer(), CreatureTextMgr::BuildMonsterChat(), WorldObject::BuildMonsterChat(), BuildMovementUpdateBlock(), BuildOutOfRangeUpdateBlock(), WorldObjectChangeAccumulator::BuildPacket(), WorldSession::BuildPartyMemberStatsChangedPacket(), Player::BuildPlayerChat(), BattlegroundMgr::BuildPlayerJoinedBattlegroundPacket(), BuildValuesUpdateBlockForPlayer(), Player::BuyItemFromVendor(), Spell::CalculateDamageDoneForAllTargets(), Spell::CalculateHitResults(), Creature::CallAssistance(), Player::CanAlwaysSee(), PetAI::CanAttack(), Spell::CanAutoCast(), Item::CanBeTraded(), Spell::cancel(), Creature::CanInteractWithBattleMaster(), Player::CanInteractWithQuestGiver(), GuardAI::CanSeeAlways(), OPvPCapturePointZM_GraveYard::CanTalkTo(), Player::CanUninviteFromGroup(), GameObject::CastSpell(), Group::ChangeMembersGroup(), Player::CharmSpellInitialize(), Spell::CheckItems(), Spell::CheckTarget(), Player::CleanupChannels(), Unit::CleanupsBeforeDelete(), Player::ConvertInstancesToGroup(), Bag::Create(), Corpse::Create(), Item::Create(), Guild::Create(), DynamicObject::CreateDynamicObject(), Unit::DealDamage(), Unit::DealMeleeDamage(), Spell::DelayedChannel(), GameObject::Delete(), Corpse::DeleteBonesFromWorld(), SummonList::Despawn(), WorldObject::DestroyForNearbyPlayers(), DestroyForPlayer(), Oregon::BattlegroundChatBuilder::do_helper(), Spell::DoAllEffectOnTarget(), PetAI::DoAttack(), WorldSession::DoLootRelease(), DoScriptText(), CreatureEventAI::DoScriptText(), Spell::DoSpellHitOnUnit(), ScriptedAI::DoTeleportPlayer(), Player::DuelComplete(), Spell::EffectActivateObject(), Spell::EffectBind(), Spell::EffectDisEnchant(), Spell::EffectDispel(), Spell::EffectDuel(), Spell::EffectDummy(), Spell::EffectInstaKill(), Spell::EffectOpenLock(), Spell::EffectPickPocket(), Spell::EffectProspecting(), Spell::EffectRedirectThreat(), Spell::EffectResurrect(), Spell::EffectResurrectNew(), Spell::EffectScriptEffect(), Spell::EffectSkinning(), Spell::EffectStealBeneficialBuff(), Spell::EffectSummonChangeItem(), Spell::EffectSummonFriend(), Spell::EffectSummonObject(), Spell::EffectSummonObjectWild(), Spell::EffectSummonPlayer(), Spell::EffectSummonType(), Spell::EffectTransmitted(), Map::EnsureGridLoadedForActiveObject(), Player::EnvironmentalDamage(), Player::EquipItem(), BattlegroundEY::EventPlayerCapturedFlag(), BattlegroundWS::EventPlayerClickedOnFlag(), BattlegroundEY::EventPlayerClickedOnFlag(), BattlegroundAV::EventPlayerClickedOnFlag(), BattlegroundWS::EventPlayerDroppedFlag(), BattlegroundEY::EventPlayerDroppedFlag(), Loot::FillLoot(), ChatHandler::FillMessageData(), Spell::FillTargetMap(), FleeingMovementGenerator< Creature >::Finalize(), ConfusedMovementGenerator< T >::Finalize(), Aura::GetCaster(), Player::GetCorpse(), FollowerAI::GetLeaderForFollower(), ChatHandler::GetPlayerGroupAndGUIDByName(), ThreatContainer::getReferenceByTarget(), Bag::GetSlotByItemGUID(), Group::GroupLoot(), WorldSession::HandleAcceptTradeOpcode(), WorldSession::HandleAddFriendOpcodeCallBack(), WorldSession::HandleAddIgnoreOpcodeCallBack(), WorldSession::HandleAreaSpiritHealerQueueOpcode(), BattlegroundWS::HandleAreaTrigger(), BattlegroundEY::HandleAreaTrigger(), WorldSession::HandleArenaTeamDisbandOpcode(), WorldSession::HandleArenaTeamInviteAcceptOpcode(), WorldSession::HandleArenaTeamLeaveOpcode(), WorldSession::HandleArenaTeamPromoteToCaptainOpcode(), WorldSession::HandleArenaTeamRemoveFromTeamOpcode(), Aura::HandleAuraDummy(), WorldSession::HandleAutostoreLootItemOpcode(), ChatHandler::HandleBankCommand(), WorldSession::HandleBattlefieldStatusOpcode(), WorldSession::HandleBattlegroundListOpcode(), WorldSession::HandleBattlegroundPlayerPortOpcode(), WorldSession::HandleBattlegroundPlayerPositionsOpcode(), WorldSession::HandleBuyItemInSlotOpcode(), WorldSession::HandleChannelAnnounce(), WorldSession::HandleChannelBan(), WorldSession::HandleChannelInvite(), WorldSession::HandleChannelKick(), WorldSession::HandleChannelModerate(), WorldSession::HandleChannelModerator(), WorldSession::HandleChannelMute(), WorldSession::HandleChannelOwner(), WorldSession::HandleChannelPassword(), WorldSession::HandleChannelSetOwner(), WorldSession::HandleChannelUnban(), WorldSession::HandleChannelUnmoderator(), WorldSession::HandleChannelUnmute(), ChatHandler::HandleCharacterEraseCommand(), ChatHandler::HandleCreatePetCommand(), ChatHandler::HandleDebugAnimationCommand(), Unit::HandleDummyAuraProc(), WorldSession::HandleDungeonDifficultyOpcode(), Unit::HandleEmoteCommand(), Aura::HandleFeignDeath(), WorldSession::HandleForceSpeedChangeAck(), ChatHandler::HandleGetItemState(), ChatHandler::HandleGetValue(), ChatHandler::HandleGMTicketAssignToCommand(), ChatHandler::HandleGMTicketCloseByIdCommand(), ChatHandler::HandleGMTicketCommentCommand(), WorldSession::HandleGMTicketCreateOpcode(), WorldSession::HandleGossipHelloOpcode(), OPvPCapturePointZM_GraveYard::HandleGossipOption(), WorldSession::HandleGroupAcceptOpcode(), ChatHandler::HandleGroupSummonCommand(), WorldSession::HandleGuildLeaderOpcode(), WorldSession::HandleGuildLeaveOpcode(), WorldSession::HandleGuildSaveEmblemOpcode(), WorldSession::HandleInitiateTradeOpcode(), WorldSession::HandleInspectArenaStatsOpcode(), WorldSession::HandleInspectHonorStatsOpcode(), WorldSession::HandleJoinChannel(), WorldSession::HandleLeaveChannel(), WorldSession::HandleLootMasterGiveOpcode(), WorldSession::HandleLootMoneyOpcode(), WorldSession::HandleMessagechatOpcode(), WorldSession::HandleMinimapPingOpcode(), Aura::HandleModStealth(), WorldSession::HandleMoveKnockBackAck(), WorldSession::HandleMoveTeleportAck(), ChatHandler::HandleObjectStateCommand(), WorldSession::HandleOfferPetitionOpcode(), WorldSession::HandleOpenItemOpcode(), Aura::HandlePeriodicHeal(), WorldSession::HandlePetAbandon(), WorldSession::HandlePetActionHelper(), WorldSession::HandlePetitionDeclineOpcode(), WorldSession::HandlePetitionShowSignOpcode(), WorldSession::HandlePetitionSignOpcode(), WorldSession::HandlePetRename(), WorldSession::HandlePetStopAttack(), WorldSession::HandlePetUnlearnOpcode(), ChatHandler::HandlePInfoCommand(), ChatHandler::HandlePlayAllCommand(), WorldSession::HandlePlayerLogin(), Unit::HandleProcTriggerSpell(), WorldSession::HandleQuestgiverAcceptQuestOpcode(), WorldSession::HandleQuestgiverQuestQueryOpcode(), WorldSession::HandleQuestgiverStatusQueryMultipleOpcode(), WorldSession::HandleQuestPushToParty(), WorldSession::HandleRaidReadyCheckOpcode(), WorldSession::HandleRandomRollOpcode(), WorldSession::HandleReadItem(), WorldSession::HandleRequestPartyMemberStatsOpcode(), WorldSession::HandleResetInstancesOpcode(), WorldSession::HandleSellItemOpcode(), ChatHandler::HandleSendChatMsgCommand(), WorldSession::HandleSendMail(), WorldSession::HandleSetActiveMoverOpcode(), WorldSession::HandleSetTradeItemOpcode(), ChatHandler::HandleSetValue(), ChatHandler::HandleSummonCommand(), WorldSession::HandleTextEmoteOpcode(), WorldSession::HandleTrainerBuySpellOpcode(), WorldSession::HandleTurnInPetitionOpcode(), WorldSession::HandleUseItemOpcode(), WorldSession::HandleWrapItemOpcode(), Player::HaveAtClient(), HostileReference::HostileReference(), Totem::InitStats(), TempSummon::InitStats(), Minion::InitStats(), Totem::InitSummon(), Guardian::InitSummon(), Channel::Invite(), BattlegroundMgr::InvitePlayer(), Spell::IsAliveUnitPresentInTargetList(), Player::isAllowedToLoot(), Unit::IsAlwaysDetectableFor(), GameObject::IsAlwaysVisibleFor(), Unit::IsAlwaysVisibleFor(), Item::IsBindedNotWith(), Unit::IsInCombatWith(), Unit::isPossessing(), Unit::isSpellCrit(), TriggerAI::IsSummonedBy(), Creature::isTappedBy(), Creature::IsTrainerOf(), Channel::KickOrBan(), Unit::Kill(), Player::LeaveBattleground(), Player::LeaveLFGChannel(), Channel::List(), Player::LoadCorpse(), Player::LoadFromDB(), Pet::LoadPetFromDB(), WorldSession::LogoutPlayer(), Group::MasterLoot(), Condition::Meets(), ArenaTeam::MemberLost(), ArenaTeam::MemberWon(), MotionMaster::MoveFleeing(), Player::MoveItemToInventory(), Group::NeedBeforeGreed(), Player::OnGossipSelect(), Oregon::Battleground2ChatBuilder::operator()(), CreatureTextLocalizer< Builder >::operator()(), operator<<(), InstanceMap::PermBindAllPlayers(), Player::PetSpellInitialize(), WorldObject::PlayDistanceSound(), Player::PossessSpellInitialize(), Spell::prepare(), Player::PrepareGossipMenu(), SmartScript::ProcessAction(), CreatureEventAI::ProcessAction(), Player::ProhibitSpellSchool(), DynamicObject::Remove(), Unit::RemoveAllControlled(), Map::RemoveAllObjectsInRemoveList(), Player::RemoveArenaSpellCooldowns(), Unit::RemoveAura(), Unit::RemoveAurasAtChanneledTarget(), Unit::RemoveAurasDueToItemSpell(), Unit::RemoveCharmedBy(), Player::RemovedInsignia(), Item::RemoveFromUpdateQueueOf(), TempSummon::RemoveFromWorld(), Unit::RemoveFromWorld(), Unit::RemoveGameObject(), Player::RemoveItemDependentAurasAndCasts(), Unit::RemoveNotOwnSingleTargetAuras(), Player::RemovePet(), Creature::Respawn(), Player::RewardHonor(), Player::RewardPlayerAndGroupAtEvent(), Player::RewardPlayerAndGroupAtKill(), Player::RewardQuest(), Map::ScriptCommandStart(), Map::ScriptsProcess(), Map::ScriptsStart(), Spell::SelectMagnetTarget(), Creature::SendAIReaction(), WorldSession::SendAuctionOutbiddedMail(), Player::SendAuraDurationsForTarget(), WorldSession::SendBindPoint(), Player::SendBuyError(), Player::SendClearCooldown(), Player::SendCooldownEvent(), Player::SendEnchantmentDurations(), Player::SendEquipError(), Player::SendInitialPacketsAfterAddToMap(), WorldSession::SendLearnNewTaxiNode(), WorldSession::SendLfgResult(), Player::SendLogXPGain(), Spell::SendLoot(), Player::SendLoot(), Group::SendLooter(), Unit::SendMeleeAttackStart(), WorldSession::SendNameQueryOpcode(), Player::SendNewItem(), Player::SendPetSkillWipeConfirm(), Spell::SendPlaySpellVisual(), Player::SendPreparedGossip(), Player::SendPushToPartyResponse(), Player::SendQuestConfirmAccept(), Spell::SendResurrectRequest(), Player::SendSellError(), Unit::SendSpellDamageImmune(), Unit::SendSpellMiss(), WorldSession::SendTaxiMenu(), Item::SendTimeUpdate(), Unit::SetCharm(), Unit::SetCharmedBy(), SpellCastTargets::setCorpseTarget(), Player::SetDrunkValue(), SmartAI::SetFollow(), SpellCastTargets::setGOTarget(), SpellCastTargets::setItemTarget(), Creature::SetLootRecipient(), Unit::SetMinion(), Channel::SetMode(), Channel::SetOwner(), SmartAI::SetScript9(), SmartGameObjectAI::SetScript9(), TempSummon::SetSummoner(), SpellCastTargets::setUnitTarget(), Player::SetViewpoint(), Creature::SetVirtualItem(), Player::SpawnCorpseBones(), Spell::Spell(), Spell::SpellDamageHeal(), Spell::SpellDamageSchoolDmg(), FollowerAI::StartFollow(), Player::StopCastingBindSight(), Bag::StoreItem(), SummonList::Summon(), Player::SummonPet(), Map::SwitchGridContainers(), TempSummon::TempSummon(), Aura::TriggerSpell(), Channel::UnBan(), Totem::UnSummon(), DynamicObject::Update(), OPvPCapturePoint::Update(), WaypointMovementGenerator< T >::Update(), SpellCastTargets::Update(), Pet::Update(), Spell::update(), Aura::Update(), AreaAura::Update(), GameObject::Update(), TotemAI::UpdateAI(), SimpleCharmedAI::UpdateAI(), PetAI::UpdateAllies(), Player::UpdateCharmedAI(), Player::UpdateLocalChannels(), Group::UpdateLooterGuid(), BattlegroundBE::UpdatePlayerScore(), BattlegroundWS::UpdatePlayerScore(), BattlegroundAB::UpdatePlayerScore(), BattlegroundEY::UpdatePlayerScore(), Battleground::UpdatePlayerScore(), BattlegroundAV::UpdatePlayerScore(), Spell::UpdatePointers(), Player::UpdateVisibilityOf(), UpdateVisibilityOf_helper(), GameObject::Use(), Oregon::PlayerRelocationNotifier::Visit(), Player::VisualizeItem(), and WorldObject::~WorldObject().

177 { return GetUInt64Value(0); }
const uint64 & GetUInt64Value(uint16 index) const
Definition: Object.h:216
uint32 Object::GetGUIDHigh ( ) const
inline

Definition at line 180 of file Object.h.

References GUID_HIPART.

Referenced by _BuildMovementUpdate(), and Spell::TakeCastItem().

180 { return GUID_HIPART(GetUInt64Value(0)); }
const uint64 & GetUInt64Value(uint16 index) const
Definition: Object.h:216
#define GUID_HIPART(x)
Definition: ObjectGuid.h:82
uint32 Object::GetGUIDLow ( ) const
inline

Definition at line 178 of file Object.h.

References GUID_LOPART.

Referenced by Player::_ApplyItemMods(), _BuildMovementUpdate(), Map::_GetScriptCreature(), Map::_GetScriptCreatureSourceOrTarget(), Map::_GetScriptPlayer(), Map::_GetScriptPlayerSourceOrTarget(), Map::_GetScriptUnit(), Map::_GetScriptWorldObject(), Player::_LoadBoundInstances(), Player::_LoadDailyQuestStatus(), Player::_LoadHomeBind(), Player::_LoadMail(), Player::_LoadMailedItems(), Player::_LoadQuestStatus(), Player::_LoadSkills(), Player::_LoadSpellCooldowns(), Player::_SaveActions(), Player::_SaveAuras(), Player::_SaveBGData(), Player::_SaveDailyQuestStatus(), Player::_SaveInventory(), Player::_SaveQuestStatus(), Player::_SaveSkills(), Player::_SaveSpellCooldowns(), Player::_SaveSpells(), Map::_ScriptProcessDoor(), PetAI::_stopAttack(), Guild::_StoreItem(), Player::_StoreItem(), Player::addActionButton(), AuctionHouseMgr::AddAItem(), Unit::AddAura(), Player::AddComboPoints(), FormationMgr::AddCreatureToGroup(), MailDraft::AddItem(), CreatureGroup::AddMember(), ArenaTeam::AddMember(), Player::AddMItem(), AuctionHouseBot::addNewAuctionBuyerBotBid(), AuctionHouseBot::addNewAuctions(), WorldObject::AddObjectToRemoveList(), Map::AddPlayerToMap(), InstanceMap::AddPlayerToMap(), Map::AddToActive(), Item::AddToUpdateQueueOf(), GameObject::AddUniqueUse(), Unit::AttackerStateUpdate(), Player::BindToInstance(), SocialMgr::BroadcastToFriendListers(), Guild::BroadcastToGuild(), Guild::BroadcastToOfficers(), AuctionHouseObject::BuildListBidderItems(), AuctionHouseObject::BuildListOwnerItems(), Player::BuildPlayerRepop(), PathInfo::BuildPolyPath(), InstanceMap::CannotEnter(), BattlegroundMap::CannotEnter(), Unit::CastCustomSpell(), Unit::CastSpell(), Player::CheckAreaExploreAndOutdoor(), Map::CheckGridIntegrity(), GameObject::CleanupsBeforeDelete(), Player::ClearComboPoints(), Player::ContinueTaxiFlight(), ObjectAccessor::ConvertCorpseForPlayer(), Pet::CreateBaseAtCreature(), Map::CreatureCellRelocation(), Map::CreatureRelocation(), Map::CreatureRespawnRelocation(), Unit::DelayAura(), Corpse::DeleteBonesFromWorld(), Corpse::DeleteFromDB(), Item::DeleteFromDB(), Item::DeleteFromInventoryDB(), MailDraft::deleteIncludedItems(), Player::DestroyItem(), Player::DestroyItemCount(), Guild::DisplayGuildBankContent(), Guild::DisplayGuildBankContentUpdate(), Spell::DoCreateItem(), ScriptedAI::DoPlaySoundToSet(), DoScriptText(), CreatureEventAI::DoScriptText(), ScriptedAI::DoTeleportTo(), Player::DurabilityRepair(), Spell::EffectAddHonor(), Spell::EffectDuel(), Spell::EffectLearnSpell(), Spell::EffectOpenLock(), Spell::EffectStuck(), Spell::EffectUnlearnSpecialization(), GuardAI::EnterEvadeMode(), BGQueueRemoveEvent::Execute(), Loot::FillFFALoot(), Loot::FillNonQuestNonFFAConditionalLoot(), Loot::FillNotNormalLootFor(), Loot::FillQuestLoot(), Loot::GetMaxSlotInLootFor(), WorldSession::HandleAuctionPlaceBid(), WorldSession::HandleAuctionRemoveItem(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleBattlegroundArenaJoin(), WorldSession::HandleBattlegroundJoinOpcode(), WorldSession::HandleBattlegroundPlayerPortOpcode(), WorldSession::HandleBusyTradeOpcode(), WorldSession::HandleCharCreateOpcode(), ChatHandler::HandleDebugHostilRefList(), ChatHandler::HandleDebugThreatList(), ChatHandler::HandleDelObjectCommand(), WorldSession::HandleDuelAcceptedOpcode(), WorldSession::HandleDungeonDifficultyOpcode(), WorldSession::HandleFarSightOpcode(), ChatHandler::HandleGetItemState(), WorldSession::HandleGetMail(), ChatHandler::HandleGPSCommand(), WorldSession::HandleGuildBankDepositItem(), WorldSession::HandleGuildInviteOpcode(), WorldSession::HandleGuildLeaveOpcode(), WorldSession::HandleIgnoreTradeOpcode(), ChatHandler::HandleMod32Value(), ChatHandler::HandleModifyFactionCommand(), ChatHandler::HandleMovegensCommand(), ChatHandler::HandleMoveObjectCommand(), WorldSession::HandleMoveWorldportAckOpcode(), ChatHandler::HandleNpcSetLinkCommand(), WorldSession::HandleOpenItemOpcode(), WorldSession::HandlePetActionHelper(), WorldSession::HandlePetitionBuyOpcode(), WorldSession::HandlePetitionDeclineOpcode(), WorldSession::HandlePetitionSignOpcode(), WorldSession::HandlePetRename(), WorldSession::HandlePetSetAction(), WorldSession::HandlePetSpellAutocastOpcode(), WorldSession::HandlePetStopAttack(), WorldSession::HandlePetUnlearnOpcode(), OutdoorPvPMgr::HandlePlayerEnterZone(), OutdoorPvPMgr::HandlePlayerLeaveZone(), WorldSession::HandlePlayerLogin(), WorldSession::HandleQuestComplete(), WorldSession::HandleQuestgiverChooseRewardOpcode(), WorldSession::HandleRepairItemOpcode(), PetAI::HandleReturnMovement(), ChatHandler::HandleSendItemsCommand(), WorldSession::HandleSendMail(), ChatHandler::HandleSendMailCommand(), ChatHandler::HandleSendMoneyCommand(), ChatHandler::HandleSetPoiCommand(), WorldSession::HandleStablePet(), WorldSession::HandleStableSwapPet(), WorldSession::HandleTakeItem(), WorldSession::HandleTurnInPetitionOpcode(), ChatHandler::HandleTurnObjectCommand(), WorldSession::HandleUnstablePet(), ChatHandler::HandleUpdate(), ChatHandler::HandleWpModifyCommand(), ChatHandler::HandleWpShowCommand(), ChatHandler::HandleWpUnLoadPathCommand(), WorldSession::HandleWrapItemOpcode(), Loot::hasItemFor(), BattlegroundQueue::InviteGroupToBG(), Creature::IsTrainerOf(), Corpse::LoadCorpseFromDB(), Creature::LoadCreaturesAddon(), Player::LoadFromDB(), Player::LoadPet(), Pet::LoadPetFromDB(), WorldSession::LogoutPlayer(), Loot::LootItemInSlot(), MailReceiver::MailReceiver(), MailSender::MailSender(), Player::ModifyArenaPoints(), Map::MoveAllCreaturesInMoveList(), MotionMaster::MoveCharge(), MotionMaster::MoveChase(), MotionMaster::MoveConfused(), MotionMaster::MoveDistract(), MotionMaster::MoveFleeing(), MotionMaster::MoveFollow(), PetAI::MovementInform(), MotionMaster::MovePath(), MotionMaster::MovePoint(), MotionMaster::MoveRandom(), MotionMaster::MoveSeekAssistance(), MotionMaster::MoveSeekAssistanceDistract(), MotionMaster::MoveTargetedHome(), MotionMaster::MoveTaxiFlight(), Player::OnGossipSelect(), operator<<(), Aura::PeriodicTick(), Player::PrepareGossipMenu(), SmartScript::ProcessAction(), Player::removeActionButton(), Map::RemoveAllObjectsInRemoveList(), Map::RemoveFromActive(), Item::RemoveFromUpdateQueueOf(), GameObject::RemoveFromWorld(), Player::ReportedAfkBy(), Player::ResetSpells(), Player::ResetTalents(), Creature::Respawn(), Player::SaveDataFieldToDB(), Player::SaveGoldToDB(), Corpse::SaveToDB(), ReputationMgr::SaveToDB(), Item::SaveToDB(), Creature::SaveToDB(), GameObject::SaveToDB(), Player::SaveToDB(), Map::ScriptsProcess(), FactorySelector::selectAI(), FactorySelector::SelectGameObjectAI(), Creature::SelectNearestTargetInAttackDistance(), AuctionHouseMgr::SendAuctionExpiredMail(), AuctionHouseMgr::SendAuctionSuccessfulMail(), AuctionHouseMgr::SendAuctionWonMail(), CreatureTextMgr::SendChat(), Player::SendInitialActionButtons(), Player::SendInitialPacketsAfterAddToMap(), Map::SendInitSelf(), MailDraft::SendMailTo(), Unit::SendMeleeAttackStop(), MailDraft::SendReturnToSender(), WorldSession::SendStablePet(), BattlegroundMgr::SendToBattleground(), ArenaTeam::SetCaptain(), Unit::SetCharmedBy(), Player::setDeathState(), Player::SetHomebindToLocation(), Player::SetPosition(), Spell::SetTargetMap(), Creature::SetTextRepeatId(), Player::SummonPet(), Spell::TakeCastItem(), Player::UnbindInstance(), PathInfo::Update(), Pet::Update(), Creature::Update(), Player::Update(), PetAI::UpdateAI(), Player::UpdateHomebindTime(), Player::UpdateVisibilityOf(), ~Object(), and SpellEvent::~SpellEvent().

178 { return GUID_LOPART(GetUInt64Value(0)); }
#define GUID_LOPART(x)
Definition: ObjectGuid.h:110
const uint64 & GetUInt64Value(uint16 index) const
Definition: Object.h:216
uint32 Object::GetGUIDMid ( ) const
inline

Definition at line 179 of file Object.h.

References GUID_ENPART.

179 { return GUID_ENPART(GetUInt64Value(0)); }
const uint64 & GetUInt64Value(uint16 index) const
Definition: Object.h:216
#define GUID_ENPART(x)
Definition: ObjectGuid.h:109
std::string Object::GetGuidStr ( ) const
inline

Definition at line 184 of file Object.h.

184 { return GetObjectGUID().GetString(); }
ObjectGuid const & GetObjectGUID() const
Definition: Object.h:182
std::string GetString() const
Definition: ObjectGuid.cpp:48
ObjectGuid const& Object::GetGuidValue ( uint16  index) const
inline

Definition at line 235 of file Object.h.

236  {
237  return *reinterpret_cast<ObjectGuid const*>(&GetUInt64Value(index));
238  }
const uint64 & GetUInt64Value(uint16 index) const
Definition: Object.h:216
const int32& Object::GetInt32Value ( uint16  index) const
inline

Definition at line 204 of file Object.h.

References ASSERT.

Referenced by ApplyModInt32Value(), CalculatePowerCost(), Unit::GetTotalAttackPowerValue(), ChatHandler::HandleTitlesRemoveCommand(), ChatHandler::HandleTitlesSetMaskCommand(), and Item::SetItemRandomProperties().

205  {
206  ASSERT(index < m_valuesCount || PrintIndexError(index , false));
207  return m_int32Values[ index ];
208  }
int32 * m_int32Values
Definition: Object.h:407
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
ObjectGuid const& Object::GetObjectGUID ( ) const
inline

Definition at line 182 of file Object.h.

References OBJECT_FIELD_GUID.

Referenced by Transport::DoEventIfAny(), WorldSession::HandleGroupSwapSubGroupOpcode(), and Movement::MoveSplineInit::SetFacing().

182 { return GetGuidValue(OBJECT_FIELD_GUID); }
ObjectGuid const & GetGuidValue(uint16 index) const
Definition: Object.h:235
float Object::GetObjectScale ( ) const
inline

Definition at line 189 of file Object.h.

References OBJECT_FIELD_SCALE_X.

Referenced by Aura::HandleAuraModScale().

const float & GetFloatValue(uint16 index) const
Definition: Object.h:222
PackedGuid const& Object::GetPackGUID ( ) const
inline

Definition at line 181 of file Object.h.

Referenced by Unit::BuildHeartBeatMsg(), WorldSession::BuildPartyMemberStatsChangedPacket(), Player::BuildTeleportAckMsg(), Spell::Delayed(), Unit::Dismount(), Spell::EffectDispel(), Spell::EffectKnockBack(), Spell::EffectPlayerPull(), Spell::EffectStealBeneficialBuff(), ChatHandler::HandleAppearCommand(), ChatHandler::HandleFlyModeCommand(), WorldSession::HandleGrantLevel(), WorldSession::HandleInspectOpcode(), WorldSession::HandleLogoutCancelOpcode(), WorldSession::HandleLogoutRequestOpcode(), ChatHandler::HandleModifyMountCommand(), WorldSession::HandleMovementOpcodes(), ChatHandler::HandleRAFGrantLevelCommand(), WorldSession::HandleRequestPartyMemberStatsOpcode(), ChatHandler::HandleSendOpcodeCommand(), ChatHandler::HandleTeleCommand(), Movement::MoveSplineInit::Launch(), Aura::PeriodicTick(), Unit::SendAttackStateUpdate(), WorldSession::SendAttackStop(), Aura::SendAuraDurationForCaster(), Spell::SendCastResult(), Spell::SendChannelStart(), Spell::SendChannelUpdate(), Player::SendComboPoints(), Unit::SendEnergizeSpellLog(), Unit::SendHealSpellLog(), Spell::SendInterrupted(), WorldSession::SendLfgResult(), Spell::SendLogExecute(), Group::SendLooter(), Unit::SendMeleeAttackStop(), Spell::SendSpellGo(), Unit::SendSpellNonMeleeDamageLog(), Spell::SendSpellStart(), Creature::SetCanFly(), Player::SetCanFly(), Player::SetClientControl(), Creature::SetFeatherFall(), Player::SetFeatherFall(), Creature::SetHover(), Player::SetHover(), Creature::SetLevitate(), Unit::SetSpeed(), Creature::SetSwim(), Creature::SetWalk(), Creature::SetWaterWalking(), Player::SetWaterWalking(), Movement::MoveSplineInit::Stop(), Aura::UpdateAuraDuration(), and SpellCastTargets::write().

181 { return m_PackGUID; }
PackedGuid m_PackGUID
Definition: Object.h:421
uint8 Object::GetTypeId ( ) const
inline

Definition at line 192 of file Object.h.

Referenced by ThreatManager::_addThreat(), _BuildMovementUpdate(), _BuildValuesUpdate(), Map::_GetScriptCreature(), Map::_GetScriptCreatureSourceOrTarget(), Map::_GetScriptPlayer(), Map::_GetScriptPlayerSourceOrTarget(), Map::_GetScriptUnit(), Map::_GetScriptWorldObject(), Unit::_IsValidAssistTarget(), Unit::_IsValidAttackTarget(), Aura::_RemoveAura(), Map::_ScriptProcessDoor(), Unit::_UpdateAutoRepeatSpell(), Unit::AddAura(), WorldObject::AddObjectToRemoveList(), Map::AddObjectToSwitchList(), Player::AddQuest(), Player::AddQuestAndCheckCompletion(), Oregon::AnyAoETargetUnitInObjectRangeCheck::AnyAoETargetUnitInObjectRangeCheck(), Unit::ApplyDiminishingToDuration(), Unit::ApplyMaxPowerMod(), Pet::ApplyModeFlags(), Unit::ApplyPowerMod(), AreaAura::AreaAura(), Unit::Attack(), Unit::AttackerStateUpdate(), TotemAI::AttackStart(), PathInfo::BuildPolyPath(), Unit::CalculateDamage(), Unit::CalculateMeleeDamage(), Unit::CalculateSpellDamage(), Unit::CalculateSpellDamageTaken(), Unit::CalculateSpellDuration(), Spell::cancel(), Creature::CanCreatureAttack(), WorldObject::CanDetectStealthOf(), Unit::CanHaveThreatList(), Player::CanInteractWithQuestGiver(), Creature::canStartAttack(), Spell::cast(), Unit::CastCustomSpell(), Pet::CastPetAuras(), Unit::CastSpell(), ChainHealingOrder::ChainHealingHash(), CharmInfo::CharmInfo(), Player::CharmSpellInitialize(), Spell::CheckCast(), Spell::CheckItems(), Pet::CheckLearning(), Spell::CheckRange(), Spell::CheckTarget(), AreaAura::CheckTarget(), Spell::CheckTargetCreatureType(), Unit::CleanupsBeforeDelete(), Unit::CombatStart(), Unit::CombatStop(), PathInfo::createFilter(), MapManager::CreateMap(), CreatureUnitRelocationWorker(), Unit::DealDamage(), Unit::DealMeleeDamage(), Unit::DealSpellDamage(), Spell::DelayedChannel(), WorldObject::DestroyForNearbyPlayers(), Unit::Dismount(), Spell::DoAllEffectOnTarget(), Spell::DoCreateItem(), ScriptedAI::DoPlaySoundToSet(), DoScriptText(), CreatureEventAI::DoScriptText(), Spell::DoSpellHitOnUnit(), ScriptedAI::DoTeleportPlayer(), ScriptedAI::DoTeleportTo(), CreatureAI::DoZoneInCombat(), Spell::EffectAddComboPoints(), Spell::EffectAddFarsight(), Spell::EffectAddHonor(), Spell::EffectApplyAura(), Spell::EffectBind(), Spell::EffectBlock(), Spell::EffectCharge(), Spell::EffectDisEnchant(), Spell::EffectDismissPet(), Spell::EffectDistract(), Spell::EffectDuel(), Spell::EffectDummy(), Spell::EffectDurabilityDamage(), Spell::EffectDurabilityDamagePCT(), Spell::EffectEnchantHeldItem(), Spell::EffectEnchantItemPerm(), Spell::EffectEnchantItemTmp(), Spell::EffectEnvironmentalDMG(), Spell::EffectFeedPet(), Spell::EffectHealPct(), Spell::EffectHealthLeech(), Spell::EffectInebriate(), Spell::EffectInstaKill(), Spell::EffectKillCredit(), Spell::EffectKnockBack(), Spell::EffectLearnPetSpell(), Spell::EffectLearnSkill(), Spell::EffectLearnSpell(), Spell::EffectOpenLock(), Spell::EffectParry(), Spell::EffectPickPocket(), Spell::EffectPlayerPull(), Spell::EffectPowerBurn(), Spell::EffectPowerDrain(), Spell::EffectProficiency(), Spell::EffectProspecting(), Spell::EffectQuestComplete(), Spell::EffectQuestFail(), Spell::EffectReputation(), Spell::EffectResurrect(), Spell::EffectResurrectNew(), Spell::EffectSanctuary(), Spell::EffectScriptEffect(), Spell::EffectSelfResurrect(), Spell::EffectSendEvent(), Spell::EffectSendTaxi(), Spell::EffectSkinning(), Spell::EffectSkinPlayerCorpse(), Spell::EffectStuck(), Spell::EffectSummonChangeItem(), Spell::EffectSummonObjectWild(), Spell::EffectSummonPet(), Spell::EffectSummonPlayer(), Spell::EffectSummonType(), Spell::EffectTameCreature(), Spell::EffectTeleportUnits(), Spell::EffectTradeSkill(), Spell::EffectTransmitted(), Spell::EffectTriggerSpell(), Spell::EffectUnlearnSpecialization(), Spell::FillTargetMap(), FleeingMovementGenerator< Creature >::Finalize(), RotateMovementGenerator::Finalize(), DistractMovementGenerator::Finalize(), EffectMovementGenerator::Finalize(), Spell::finish(), Oregon::XP::Gain(), Creature::GetAggroRange(), Unit::GetCharmerOrOwnerPlayerOrPlayerItself(), Unit::GetCreatePowers(), Unit::GetCreatureType(), Player::GetDefaultGossipMenuForSource(), Unit::GetDefenseSkillValue(), WorldSession::getDialogStatus(), Unit::GetFactionTemplateEntry(), Player::GetGossipTextId(), ObjectAccessor::GetObjectByTypeMask(), Unit::GetPartyMember(), Unit::GetUnitBlockChance(), Unit::GetUnitCriticalChance(), Unit::GetUnitDodgeChance(), Unit::GetUnitParryChance(), Unit::GetWeaponSkillValue(), Spell::handle_immediate(), Aura::HandleAddModifier(), Aura::HandleAuraDummy(), Aura::HandleAuraEmpathy(), Aura::HandleAuraFeatherFall(), Aura::HandleAuraGhost(), Aura::HandleAuraModBaseResistancePCT(), Aura::HandleAuraModBlockPercent(), Aura::HandleAuraModCritPercent(), Aura::HandleAuraModDisarm(), Aura::HandleAuraModDodgePercent(), Aura::HandleAuraModExpertise(), Aura::HandleAuraModIncreaseFlightSpeed(), Aura::HandleAuraModParryPercent(), Aura::HandleAuraModRangedAttackPowerOfStatPercent(), Aura::HandleAuraModRegenInterrupt(), Aura::HandleAuraModResistance(), Aura::HandleAuraModResistanceExclusive(), Aura::HandleAuraModResistenceOfStatPercent(), Aura::HandleAuraModShapeshift(), Aura::HandleAuraModSkill(), Aura::HandleAuraModStat(), Aura::HandleAuraModTotalThreat(), Aura::HandleAuraMounted(), Aura::HandleAuraPeriodicDummy(), Aura::HandleAuraRetainComboPoints(), Aura::HandleAuraTrackCreatures(), Aura::HandleAuraTrackResources(), Aura::HandleAuraTrackStealthed(), Aura::HandleAuraTransform(), Aura::HandleBindSight(), Aura::HandleChannelDeathItem(), ChatHandler::HandleCreatePetCommand(), Unit::HandleDummyAuraProc(), ChatHandler::HandleFlyModeCommand(), Aura::HandleForceMoveForward(), ChatHandler::HandleGPSCommand(), Unit::HandleHasteAuraProc(), OutdoorPvP::HandleKill(), OutdoorPvPHP::HandleKillImpl(), OutdoorPvPZM::HandleKillImpl(), OutdoorPvPNA::HandleKillImpl(), Aura::HandleManaShield(), WorldSession::HandleMirrorImageDataRequest(), Aura::HandleModBaseResistance(), Aura::HandleModDamageDone(), Aura::HandleModDamagePercentDone(), Aura::HandleModHealingDone(), Aura::HandleModHitChance(), ChatHandler::HandleModifyScaleCommand(), Aura::HandleModInvisibility(), Aura::HandleModManaRegen(), Aura::HandleModPercentStat(), Aura::HandleModPossess(), Aura::HandleModPossessPet(), Aura::HandleModPowerRegen(), Aura::HandleModPowerRegenPCT(), Aura::HandleModRating(), Aura::HandleModResistancePercent(), Aura::HandleModSpellCritChance(), Aura::HandleModSpellCritChanceShool(), Aura::HandleModSpellDamagePercentFromAttackPower(), Aura::HandleModSpellDamagePercentFromStat(), Aura::HandleModSpellHealingPercentFromAttackPower(), Aura::HandleModSpellHealingPercentFromStat(), Aura::HandleModSpellHitChance(), Aura::HandleModStealth(), Aura::HandleModTargetResistance(), Aura::HandleModThreat(), Aura::HandleModTotalPercentStat(), ChatHandler::HandleMovegensCommand(), WorldSession::HandleMovementOpcodes(), WorldSession::HandleMoveTeleportAck(), ChatHandler::HandleNpcChangeEntryCommand(), Unit::HandleOverrideClassScriptAuraProc(), Aura::HandlePeriodicDamage(), Aura::HandlePeriodicHeal(), WorldSession::HandlePetAction(), WorldSession::HandlePetActionHelper(), WorldSession::HandlePetCastSpellOpcode(), WorldSession::HandlePetRename(), WorldSession::HandlePetSetAction(), WorldSession::HandlePetSpellAutocastOpcode(), WorldSession::HandlePetUnlearnOpcode(), Unit::HandleProcTriggerSpell(), WorldSession::HandleQuestgiverChooseRewardOpcode(), WorldSession::HandleQuestgiverStatusQueryOpcode(), Aura::HandleRangedAmmoHaste(), ChatHandler::HandleRespawnCommand(), Aura::HandleSchoolAbsorb(), ChatHandler::HandleSendOpcodeCommand(), Aura::HandleShapeshiftBoosts(), Aura::HandleShieldBlockValue(), Aura::HandleSpiritOfRedemption(), WorldSession::HandleTextEmoteOpcode(), ChatHandler::HandleUpdate(), Aura::HandleWaterBreathing(), Unit::haveOffhandWeapon(), CharmInfo::InitCharmCreateSpells(), MotionMaster::InitDefault(), Pet::InitPetCreateSpells(), CharmInfo::InitPossessCreateSpells(), Totem::InitStats(), TempSummon::InitStats(), Guardian::InitStats(), Guardian::InitStatsForLevel(), TempSummon::InitSummon(), Guardian::InitSummon(), Unit::InterruptSpell(), Unit::isAttackableByAOE(), SmartScript::IsCreature(), DisableMgr::IsDisabledFor(), SmartScript::IsGameObject(), Player::isHonorOrXPTarget(), Unit::IsInPartyWith(), Unit::IsInRaidWith(), SmartScript::IsPlayer(), Unit::isSpellBlocked(), Unit::isSpellCrit(), Unit::isTargetableForAttack(), SmartScript::IsUnit(), ThreatCalcHelper::isValidProcess(), WorldObject::IsWithinLOS(), WorldObject::IsWithinLOSInMap(), Unit::Kill(), PossessedAI::KilledUnit(), CreatureEventAI::KilledUnit(), Pet::learnSpell(), Pet::LoadPetFromDB(), WorldSession::LogoutPlayer(), Unit::MagicSpellHitResult(), MailSender::MailSender(), Condition::Meets(), Unit::MeleeDamageBonus(), Unit::MeleeMissChanceCalc(), Unit::MeleeSpellHitResult(), Unit::MeleeSpellMissChance(), Unit::ModifyAuraState(), Pet::ModifyLoyalty(), Unit::ModSpellCastTime(), Unit::ModSpellDurationTime(), Unit::Mount(), MotionMaster::MoveCharge(), MotionMaster::MoveChase(), MotionMaster::MoveConfused(), MotionMaster::MoveDistract(), MotionMaster::MoveFall(), MotionMaster::MoveFleeing(), MotionMaster::MoveFollow(), MotionMaster::MovePath(), MotionMaster::MovePoint(), MotionMaster::MoveRandom(), MotionMaster::MoveSeekAssistance(), MotionMaster::MoveSeekAssistanceDistract(), MotionMaster::MoveTargetedHome(), MotionMaster::MoveTaxiFlight(), Player::OnGossipSelect(), SmartScript::OnInitialize(), Oregon::AnyUnfriendlyNoTotemUnitInObjectRangeCheck::operator()(), Oregon::AnyFriendlyUnitInObjectRangeCheck::operator()(), Oregon::AnyAoETargetUnitInObjectRangeCheck::operator()(), Oregon::NearestHostileUnitCheck::operator()(), Oregon::ObjectTypeIdCheck::operator()(), Aura::PeriodicDummyTick(), Aura::PeriodicTick(), Spell::prepare(), Player::PrepareGossipMenu(), PrintIndexError(), Unit::ProcDamageAndSpellFor(), CreatureEventAI::ProcessAction(), SmartScript::ProcessEvent(), CreatureEventAI::ProcessEvent(), Puppet::Puppet(), SpellCastTargets::read(), Unit::RemoveAllControlled(), Unit::RemoveAllMinionsByEntry(), Map::RemoveAllObjectsInRemoveList(), Unit::RemoveAura(), Unit::RemoveCharmedBy(), Unit::RemoveGameObject(), Player::RewardHonor(), Player::RewardPlayerAndGroupAtEvent(), Player::RewardPlayerAndGroupAtKill(), Player::RewardReputation(), Unit::RollMeleeOutcomeAgainst(), Map::ScriptCommandStart(), Map::ScriptsProcess(), Map::ScriptsStart(), SelectTargetHelper(), Spell::SendCastResult(), CreatureTextMgr::SendChatPacket(), Spell::SendLogExecute(), Unit::SendMeleeAttackStop(), CreatureTextMgr::SendNonChatPacket(), Unit::SendPetActionFeedback(), Unit::SendPetAIReaction(), Unit::SendPetCastFail(), Unit::SendPetClearCooldown(), Unit::SendPetSpellCooldown(), Unit::SendPetTalk(), WorldObject::SendPlaySound(), Spell::SendPlaySpellVisual(), Player::SendPreparedGossip(), Spell::SendSpellCooldown(), WorldObject::setActive(), Unit::SetCharm(), Unit::SetCharmedBy(), Unit::SetDisplayId(), Unit::SetHealth(), Unit::SetInCombatState(), Unit::SetInCombatWith(), Unit::SetLevel(), WorldObject::SetMap(), Unit::SetMaxHealth(), Unit::SetMaxPower(), Unit::SetMinion(), Unit::SetPower(), Unit::setPowerType(), Unit::SetSpeed(), Unit::SetStunned(), Spell::SetTargetMap(), Player::SetViewpoint(), WorldObject::SetVisibilityDistanceOverride(), Spell::Spell(), Unit::SpellBaseDamageBonus(), Unit::SpellBaseHealingBonus(), Unit::SpellDamageBonus(), Spell::SpellDamageSchoolDmg(), Spell::SpellDamageWeaponDmg(), Unit::SpellHealingBonus(), Unit::SpellHitResult(), Player::StopCastingCharm(), Spell::SummonClassPet(), Map::SummonCreature(), WorldObject::SummonCreatureGroup(), WorldObject::SummonGameObject(), Spell::SummonGuardian(), WorldObject::SummonTrigger(), Spell::TakeCastItem(), Spell::TakePower(), Spell::TakeReagents(), Unit::TauntApply(), Unit::TauntFadeOut(), CreatureAI::TriggerAlert(), Aura::TriggerSpell(), Totem::UnSummon(), TempSummon::UnSummon(), SpellCastTargets::Update(), Spell::update(), GameObject::Update(), Unit::Update(), PetAI::UpdateAI(), WorldObject::UpdateAllowedPositionZ(), Guardian::UpdateAttackPowerAndDamage(), Aura::UpdateAuraDuration(), Unit::UpdateAuraForGroup(), Unit::UpdateCharmAI(), Unit::UpdateMeleeAttackingState(), Spell::UpdatePointers(), Unit::UpdateSpeed(), Player::UpdateVisibilityOf(), Player::UpdateWeaponSkill(), GameObject::Use(), Oregon::DynamicObjectUpdater::VisitHelper(), Spell::WriteAmmoToPacket(), ~Object(), SpellEvent::~SpellEvent(), and WorldObject::~WorldObject().

192 { return m_objectTypeId; }
uint8 m_objectTypeId
Definition: Object.h:402
uint16 Object::GetUInt16Value ( uint16  index,
uint8  offset 
) const
inline

Definition at line 240 of file Object.h.

References ASSERT, and value.

Referenced by Player::SaveToDB().

241  {
242  ASSERT(index < m_valuesCount || PrintIndexError(index , false));
243  ASSERT(offset < 2);
244  return *(((uint16*)&m_uint32Values[ index ]) + offset);
245  }
uint32 * m_uint32Values
Definition: Object.h:408
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
ACE_UINT16 uint16
Definition: Define.h:72
const uint32& Object::GetUInt32Value ( uint16  index) const
inline

Definition at line 210 of file Object.h.

References ASSERT.

Referenced by Aura::_AddAura(), Player::_ApplyAmmoBonuses(), _BuildValuesUpdate(), Aura::_RemoveAura(), Player::_SaveDailyQuestStatus(), Player::_SaveSkills(), Player::_SetCreateBits(), Player::AddItemDurations(), Player::AddItemToBuyBackSlot(), Battleground::AddPlayer(), ApplyModUInt32Value(), WorldSession::BuildPartyMemberStatsChangedPacket(), Player::CheckAreaExploreAndOutdoor(), Spell::CheckItems(), Item::CloneItem(), ObjectAccessor::ConvertCorpseForPlayer(), Pet::CreateBaseAtCreature(), Player::CreateCorpse(), Player::DurabilityLoss(), Player::DurabilityPointsLoss(), Player::DurabilityRepair(), Spell::EffectDestroyAllTotems(), Spell::EffectSummonChangeItem(), ForceValuesUpdateAtIndex(), Bag::GetBagSize(), Player::GetBaseSkillValue(), Player::GetExpertiseDodgeOrParryReduction(), Player::GetMaxSkillValue(), Player::GetPureMaxSkillValue(), Player::GetPureSkillValue(), Player::GetRatingBonusValue(), Player::GetSkillTempBonusValue(), Player::GetSkillValue(), Pet::GivePetXP(), Player::GiveXP(), WorldSession::HandleAuctionSellItem(), WorldSession::HandleBuybackItem(), ChatHandler::HandleCharacterTitlesCommand(), WorldSession::HandleGetMail(), ChatHandler::HandleGetValue(), ChatHandler::HandleHideAreaCommand(), WorldSession::HandleInspectHonorStatsOpcode(), ChatHandler::HandleLookupTitleCommand(), ChatHandler::HandleMod32Value(), ChatHandler::HandleModifyFactionCommand(), ChatHandler::HandleNpcInfoCommand(), WorldSession::HandleRequestPartyMemberStatsOpcode(), WorldSession::HandleSelfResOpcode(), WorldSession::HandleSendMail(), Aura::HandleShapeshiftBoosts(), ChatHandler::HandleShowAreaCommand(), ChatHandler::HandleUpdate(), WorldSession::HandleWrapItemOpcode(), Totem::InitStats(), Guardian::InitStatsForLevel(), Unit::Kill(), Item::LoadFromDB(), Player::LoadFromDB(), Player::ModifySkillBonus(), Player::PrepareGossipMenu(), GameObjectModel::Relocate(), Player::RemovePet(), Player::RewardHonor(), Player::SatisfyQuestDay(), Player::SaveDataFieldToDB(), Pet::SavePetToDB(), Corpse::SaveToDB(), Item::SaveToDB(), Creature::SaveToDB(), GameObject::SaveToDB(), Player::SaveToDB(), WorldSession::SendPetNameQuery(), Item::SendTimeUpdate(), WorldSession::SendUpdateTrade(), Player::SetAmmo(), Aura::SetAuraApplication(), Aura::SetAuraFlag(), Aura::SetAuraLevel(), Player::SetDailyQuestStatus(), Player::setDeathState(), Player::SetDrunkValue(), Player::SetRestBonus(), Player::SetSkill(), Spell::SpellDamageWeaponDmg(), Puppet::Update(), Creature::Update(), GameObject::Update(), Player::Update(), Guardian::UpdateAttackPowerAndDamage(), Item::UpdateDuration(), Player::UpdateHonorFields(), Player::UpdateSkill(), Player::UpdateSkillPro(), Player::UpdateSkillsForLevel(), Player::UpdateSkillsToMaxSkillsForLevel(), and Spell::WriteAmmoToPacket().

211  {
212  ASSERT(index < m_valuesCount || PrintIndexError(index , false));
213  return m_uint32Values[ index ];
214  }
uint32 * m_uint32Values
Definition: Object.h:408
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
const uint64& Object::GetUInt64Value ( uint16  index) const
inline
uint16 Object::GetValuesCount ( ) const
inline

Definition at line 349 of file Object.h.

Referenced by ChatHandler::HandleGetValue(), ChatHandler::HandleMod32Value(), ChatHandler::HandleSetValue(), and Map::ScriptsProcess().

350  {
351  return m_valuesCount;
352  }
uint16 m_valuesCount
Definition: Object.h:414
bool Object::HasByteFlag ( uint16  index,
uint8  offset,
uint8  flag 
) const
inline

Definition at line 298 of file Object.h.

References ASSERT.

Referenced by Spell::CheckCast(), and Battleground::GetAlivePlayersCountByTeam().

299  {
300  ASSERT(index < m_valuesCount || PrintIndexError(index , false));
301  ASSERT(offset < 4);
302  return (((uint8*)&m_uint32Values[index])[offset] & flag) != 0;
303  }
uint32 * m_uint32Values
Definition: Object.h:408
ACE_UINT8 uint8
Definition: Define.h:73
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
bool Object::HasFlag ( uint16  index,
uint32  flag 
) const
inline

Definition at line 281 of file Object.h.

References ASSERT.

Referenced by Creature::_IsTargetAcceptable(), Unit::_IsValidAssistTarget(), Unit::_IsValidAttackTarget(), Player::ActivateTaxiPathTo(), Battleground::AddPlayer(), Player::ApplyEquipCooldown(), Unit::Attack(), Unit::AttackerStateUpdate(), Creature::CanAssistTo(), ScriptedAI::CanCast(), CreatureEventAI::CanCast(), Player::CanCastNoReagents(), Creature::canStartAttack(), Unit::CanUseAttackType(), Spell::CheckCast(), Spell::CheckCasterAuras(), Spell::CheckTarget(), Unit::ClearInCombat(), Player::CreateCorpse(), Unit::DealDamage(), Player::DestroyItem(), Spell::DoSpellHitOnUnit(), Spell::EffectDummy(), Spell::EffectStuck(), Unit::GetFactionReactionTo(), Player::GetNPCIfCanInteractWith(), Unit::GetReactionTo(), Player::HandleDrowning(), WorldSession::HandleMirrorImageDataRequest(), ChatHandler::HandleModifyBitCommand(), WorldSession::HandleOpenItemOpcode(), WorldSession::HandlePlayerLogin(), WorldSession::HandleQuestgiverStatusQueryMultipleOpcode(), WorldSession::HandleRepopRequestOpcode(), WorldSession::HandleSendMail(), Player::HasTitle(), Unit::isAttackableByAOE(), Player::IsOutdoorPvPActive(), Unit::isTargetableForAttack(), Player::LoadFromDB(), Unit::ModifyAuraState(), Player::PrepareGossipMenu(), Creature::reachWithSpellAttack(), Creature::reachWithSpellCure(), Item::SaveToDB(), Player::SaveToDB(), ScriptedAI::SelectSpell(), Player::SendPreparedGossip(), Player::SetTitle(), npc_escortAI::Start(), Transport::TeleportTransport(), Player::Update(), and Player::UpdatePvPState().

282  {
283  ASSERT(index < m_valuesCount || PrintIndexError(index , false));
284  return (m_uint32Values[ index ] & flag) != 0;
285  }
uint32 * m_uint32Values
Definition: Object.h:408
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
bool Object::HasFlag64 ( uint16  index,
uint64  flag 
) const
inline

Definition at line 333 of file Object.h.

References ASSERT.

334  {
335  ASSERT(index < m_valuesCount || PrintIndexError(index , false));
336  return (GetUInt64Value(index) & flag) != 0;
337  }
const uint64 & GetUInt64Value(uint16 index) const
Definition: Object.h:216
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
virtual bool Object::hasInvolvedQuest ( uint32  ) const
inlinevirtual
virtual bool Object::hasQuest ( uint32  ) const
inlinevirtual

Reimplemented in GameObject, Creature, and Item.

Definition at line 354 of file Object.h.

Referenced by WorldSession::HandleQuestgiverAcceptQuestOpcode(), and WorldSession::HandleQuestgiverQuestQueryOpcode().

355  {
356  return false;
357  }
const bool& Object::IsInWorld ( ) const
inline

Definition at line 150 of file Object.h.

Referenced by Group::_addMember(), Player::_StoreItem(), DynamicObject::AddToWorld(), Corpse::AddToWorld(), Pet::AddToWorld(), Creature::AddToWorld(), GameObject::AddToWorld(), Unit::AddToWorld(), Unit::Attack(), SocialMgr::BroadcastToFriendListers(), Unit::CalcAbsorbResist(), Spell::CheckCast(), GameObject::CleanupsBeforeDelete(), WorldObject::CleanupsBeforeDelete(), Unit::CleanupsBeforeDelete(), WorldObject::DestroyForNearbyPlayers(), Player::DestroyItem(), Player::DestroyItemCount(), Unit::Dismount(), WorldSession::DoLootRelease(), Spell::EffectAddFarsight(), Spell::EffectPersistentAA(), Spell::EffectResurrect(), Spell::EffectResurrectNew(), Spell::EffectSelfResurrect(), Player::EquipItem(), World::FindPlayerInZone(), Aura::GetCaster(), Player::GetGameObjectIfCanInteractWith(), Player::GetNextQuest(), Player::GetNPCIfCanInteractWith(), ObjectAccessor::GetObjectInWorld(), Player::GetReferFriendXPMultiplier(), WorldSession::HandleAcceptGrantLevel(), Aura::HandleAuraDummy(), ChatHandler::HandleGMTicketAssignToCommand(), ChatHandler::HandleGMTicketGetByIdCommand(), ChatHandler::HandleGMTicketGetByNameCommand(), ChatHandler::HandleGMTicketUnAssignCommand(), WorldSession::HandleGrantLevel(), WorldSession::HandlePetAbandon(), ChatHandler::HandleRAFGrantLevelCommand(), ChatHandler::HandleRAFSummonCommand(), WorldSession::HandleRequestPartyMemberStatsOpcode(), WorldSession::HandleSellItemOpcode(), WorldSession::HandleSpellClick(), WorldObject::IsInMap(), WorldObject::isValid(), WorldObject::IsWithinLOS(), World::KickPlayer(), Player::LearnSpell(), Player::LoadPet(), Group::MasterLoot(), Player::PrepareQuestMenu(), Player::QuickEquipItem(), DynamicObject::Remove(), DynamicObject::RemoveFromWorld(), TempSummon::RemoveFromWorld(), Corpse::RemoveFromWorld(), Minion::RemoveFromWorld(), Puppet::RemoveFromWorld(), Pet::RemoveFromWorld(), Creature::RemoveFromWorld(), GameObject::RemoveFromWorld(), WorldObject::RemoveFromWorld(), Unit::RemoveFromWorld(), Player::RemoveFromWorld(), Player::RemoveItem(), Player::RemovePet(), WorldObject::ResetMap(), Player::ResummonTemporaryUnsummonedPetIfAny(), Player::SaveToDB(), WorldSession::SendLfgResult(), Group::SendUpdate(), WorldObject::setActive(), Unit::setDeathState(), GameObject::SetGoState(), WorldObject::SetMap(), WorldObject::SetPhaseMask(), WorldObject::SetWorldObject(), Spell::Spell(), Player::SplitItem(), WorldObject::SummonGameObject(), Player::SwapItem(), Player::TeleportTo(), TempSummon::UnSummon(), Player::UnsummonPetTemporaryIfAny(), Puppet::Update(), WorldSession::Update(), ObjectAccessor::Update(), Battleground::Update(), Map::Update(), Unit::Update(), Player::Update(), GameObject::UpdateModel(), Group::UpdatePlayerOutOfRange(), Spell::UpdatePointers(), Player::UpdateTriggerVisibility(), Player::UpdateZone(), and ~Object().

151  {
152  return m_inWorld;
153  }
bool m_inWorld
Definition: Object.h:419
bool Object::LoadValues ( const char *  data)

Definition at line 702 of file Object.cpp.

References _InitValues(), atol, m_uint32Values, m_valuesCount, and StrSplit().

Referenced by Player::LoadFromDB().

703 {
704  if (!m_uint32Values) _InitValues();
705 
706  Tokens tokens = StrSplit(data, " ");
707 
708  if (tokens.size() != m_valuesCount)
709  return false;
710 
711  Tokens::iterator iter;
712  int index;
713  for (iter = tokens.begin(), index = 0; index < m_valuesCount; ++iter, ++index)
714  m_uint32Values[index] = atol((*iter).c_str());
715 
716  return true;
717 }
uint32 * m_uint32Values
Definition: Object.h:408
std::vector< std::string > Tokens
Definition: Util.h:26
Tokens StrSplit(const std::string &src, const std::string &sep)
Definition: Util.cpp:58
uint16 m_valuesCount
Definition: Object.h:414
void _InitValues()
Definition: Object.cpp:114
#define atol(a)
Definition: Common.h:162
Object& Object::operator= ( Object const &  )
private
bool Object::PrintIndexError ( uint32  index,
bool  set 
) const
private

Definition at line 1077 of file Object.cpp.

References GetTypeId(), m_objectType, m_valuesCount, and sLog.

Referenced by AddUInt64Value(), RemoveByteFlag(), RemoveFlag(), RemoveUInt64Value(), SetByteFlag(), SetByteValue(), SetFlag(), SetFloatValue(), SetInt32Value(), SetUInt16Value(), SetUInt32Value(), and SetUInt64Value().

1078 {
1079  sLog.outError("Attempt %s invalid value field: %u (count: %u) for object typeid: %u type mask: %u", (set ? "set value to" : "get value from"), index, m_valuesCount, GetTypeId(), m_objectType);
1080 
1081  // assert must fail after function call
1082  return false;
1083 }
#define sLog
Log class singleton.
Definition: Log.h:187
uint16 m_objectType
Definition: Object.h:400
uint8 GetTypeId() const
Definition: Object.h:192
uint16 m_valuesCount
Definition: Object.h:414
void Object::RemoveByteFlag ( uint16  index,
uint8  offset,
uint8  newFlag 
)

Definition at line 1052 of file Object.cpp.

References ObjectAccessor::AddUpdateObject(), ASSERT, Oregon::Singleton< ObjectAccessor, Oregon::ClassLevelLockable< ObjectAccessor, ACE_Thread_Mutex > >::Instance(), m_inWorld, m_objectUpdated, m_uint32Values, m_valuesCount, PrintIndexError(), and sLog.

Referenced by Aura::HandleAuraUntrackable().

1053 {
1054  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
1055 
1056  if (offset > 4)
1057  {
1058  sLog.outError("Object::RemoveByteFlag: wrong offset %u", offset);
1059  return;
1060  }
1061 
1062  if (uint8(m_uint32Values[ index ] >> (offset * 8)) & oldFlag)
1063  {
1064  m_uint32Values[ index ] &= ~uint32(uint32(oldFlag) << (offset * 8));
1065 
1066  if (m_inWorld)
1067  {
1068  if (!m_objectUpdated)
1069  {
1071  m_objectUpdated = true;
1072  }
1073  }
1074  }
1075 }
bool m_objectUpdated
Definition: Object.h:416
bool m_inWorld
Definition: Object.h:419
uint32 * m_uint32Values
Definition: Object.h:408
#define sLog
Log class singleton.
Definition: Log.h:187
ACE_UINT8 uint8
Definition: Define.h:73
void AddUpdateObject(Object *obj)
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
ACE_UINT32 uint32
Definition: Define.h:71
void Object::RemoveFlag ( uint16  index,
uint32  oldFlag 
)

Definition at line 1004 of file Object.cpp.

References ObjectAccessor::AddUpdateObject(), ASSERT, Oregon::Singleton< ObjectAccessor, Oregon::ClassLevelLockable< ObjectAccessor, ACE_Thread_Mutex > >::Instance(), m_inWorld, m_objectUpdated, m_uint32Values, m_valuesCount, and PrintIndexError().

Referenced by Player::BuildPlayerRepop(), GameObject::CastSpell(), Player::CleanupAfterTaxiFlight(), Unit::ClearInCombat(), Unit::ClearInPetCombat(), Unit::Dismount(), WorldSession::DoLootRelease(), Spell::EffectSkinning(), Spell::EffectSummonDeadPet(), FleeingMovementGenerator< Creature >::Finalize(), TimedFleeingMovementGenerator::Finalize(), ConfusedMovementGenerator< T >::Finalize(), FlightPathMovementGenerator::Finalize(), FleeingMovementGenerator< T >::Finalize(), Aura::HandleArenaPreparation(), Aura::HandleAuraCloneCaster(), Aura::HandleAuraDummy(), Aura::HandleAuraGhost(), Aura::HandleAuraModDisarm(), Aura::HandleAuraModPacify(), Aura::HandleAuraModPacifyAndSilence(), Aura::HandleAuraModSilence(), Aura::HandleAuraModStalked(), Aura::HandleComprehendLanguage(), Aura::HandleFeignDeath(), Aura::HandleForceMoveForward(), WorldSession::HandleLogoutCancelOpcode(), ChatHandler::HandleModifyBitCommand(), Aura::HandleModInvisibility(), Aura::HandleModStealth(), ChatHandler::HandleUnFreezeCommand(), Player::InitStatsForLevel(), PossessedAI::JustDied(), PossessedAI::KilledUnit(), Unit::ModifyAuraState(), Unit::RemoveCharmedBy(), Player::RemoveRestFlag(), Player::SaveToDB(), Unit::SetCharm(), Pet::setDeathState(), Creature::setDeathState(), Unit::setDeathState(), Player::SetFFAPvP(), Player::SetGameMaster(), Unit::SetInCombatState(), Creature::SetLootRecipient(), Player::SetTitle(), npc_escortAI::Start(), GameObject::SwitchDoorOrButton(), GameObject::Update(), Creature::UpdateEntry(), and Player::UpdateZone().

1005 {
1006  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
1008 
1009  uint32 oldval = m_uint32Values[ index ];
1010  uint32 newval = oldval & ~oldFlag;
1011 
1012  if (oldval != newval)
1013  {
1014  m_uint32Values[ index ] = newval;
1015 
1016  if (m_inWorld)
1017  {
1018  if (!m_objectUpdated)
1019  {
1021  m_objectUpdated = true;
1022  }
1023  }
1024  }
1025 }
bool m_objectUpdated
Definition: Object.h:416
bool m_inWorld
Definition: Object.h:419
uint32 * m_uint32Values
Definition: Object.h:408
void AddUpdateObject(Object *obj)
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
ACE_UINT32 uint32
Definition: Define.h:71
void Object::RemoveFlag64 ( uint16  index,
uint64  oldFlag 
)
inline

Definition at line 318 of file Object.h.

319  {
320  uint64 oldval = GetUInt64Value(index);
321  uint64 newval = oldval & ~oldFlag;
322  SetUInt64Value(index, newval);
323  }
const uint64 & GetUInt64Value(uint16 index) const
Definition: Object.h:216
void SetUInt64Value(uint16 index, const uint64 &value)
Definition: Object.cpp:796
ACE_UINT64 uint64
Definition: Define.h:70
virtual void Object::RemoveFromWorld ( )
inlinevirtual

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

Definition at line 166 of file Object.h.

Referenced by Guild::_StoreItem(), Player::_StoreItem(), Player::DestroyItem(), Player::EquipItem(), Bag::RemoveFromWorld(), Corpse::RemoveFromWorld(), WorldObject::RemoveFromWorld(), Player::RemoveFromWorld(), and Player::RemoveItemFromBuyBackSlot().

167  {
168  if (!m_inWorld)
169  return;
170 
171  m_inWorld = false;
172 
173  // if we remove from world then sending changes not required
174  ClearUpdateMask(true);
175  }
void ClearUpdateMask(bool remove)
Definition: Object.cpp:676
bool m_inWorld
Definition: Object.h:419
bool Object::RemoveUInt64Value ( uint16  index,
const uint64 value 
)

Definition at line 836 of file Object.cpp.

References ObjectAccessor::AddUpdateObject(), ASSERT, Oregon::Singleton< ObjectAccessor, Oregon::ClassLevelLockable< ObjectAccessor, ACE_Thread_Mutex > >::Instance(), m_inWorld, m_objectUpdated, m_uint32Values, m_valuesCount, and PrintIndexError().

Referenced by Unit::SetCharm(), Unit::SetMinion(), and Player::SetViewpoint().

837 {
838  ASSERT(index + 1 < m_valuesCount || PrintIndexError(index , true));
839  if (value && *((uint64*) & (m_uint32Values[index])) == value)
840  {
841  m_uint32Values[ index ] = 0;
842  m_uint32Values[ index + 1 ] = 0;
843 
844  if (m_inWorld)
845  {
846  if (!m_objectUpdated)
847  {
849  m_objectUpdated = true;
850  }
851  }
852  return true;
853  }
854  return false;
855 }
bool m_objectUpdated
Definition: Object.h:416
bool m_inWorld
Definition: Object.h:419
uint32 * m_uint32Values
Definition: Object.h:408
void AddUpdateObject(Object *obj)
etc mysql my cnf *Then change max_allowed_packet to a bigger value
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
ACE_UINT64 uint64
Definition: Define.h:70
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
void Object::SendUpdateToPlayer ( Player player)

Definition at line 207 of file Object.cpp.

References BuildCreateUpdateBlockForPlayer(), UpdateData::BuildPacket(), Player::GetSession(), and WorldSession::SendPacket().

Referenced by Player::_StoreItem(), Player::DestroyItemCount(), Spell::EffectSummonDeadPet(), Player::EquipItem(), WorldSession::HandlePetActionHelper(), WorldSession::HandleSellItemOpcode(), Player::QuickEquipItem(), Player::RemoveItem(), Player::SplitItem(), Player::SwapItem(), PetAI::UpdateAI(), and Player::UpdateVisibilityOf().

208 {
209  // send create update to player
210  UpdateData upd;
211  WorldPacket packet;
212 
213  BuildCreateUpdateBlockForPlayer(&upd, player);
214  upd.BuildPacket(&packet);
215  player->GetSession()->SendPacket(&packet);
216 }
bool BuildPacket(WorldPacket *packet, bool hasTransport=false)
Definition: UpdateData.cpp:103
void SendPacket(WorldPacket const *packet)
virtual void BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const
Definition: Object.cpp:148
WorldSession * GetSession() const
Definition: Player.h:1947
void Object::SetByteFlag ( uint16  index,
uint8  offset,
uint8  newFlag 
)

Definition at line 1027 of file Object.cpp.

References ObjectAccessor::AddUpdateObject(), ASSERT, Oregon::Singleton< ObjectAccessor, Oregon::ClassLevelLockable< ObjectAccessor, ACE_Thread_Mutex > >::Instance(), m_inWorld, m_objectUpdated, m_uint32Values, m_valuesCount, PrintIndexError(), and sLog.

Referenced by Aura::HandleAuraUntrackable().

1028 {
1029  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
1030 
1031  if (offset > 4)
1032  {
1033  sLog.outError("Object::SetByteFlag: wrong offset %u", offset);
1034  return;
1035  }
1036 
1037  if (!(uint8(m_uint32Values[ index ] >> (offset * 8)) & newFlag))
1038  {
1039  m_uint32Values[ index ] |= uint32(uint32(newFlag) << (offset * 8));
1040 
1041  if (m_inWorld)
1042  {
1043  if (!m_objectUpdated)
1044  {
1046  m_objectUpdated = true;
1047  }
1048  }
1049  }
1050 }
bool m_objectUpdated
Definition: Object.h:416
bool m_inWorld
Definition: Object.h:419
uint32 * m_uint32Values
Definition: Object.h:408
#define sLog
Log class singleton.
Definition: Log.h:187
ACE_UINT8 uint8
Definition: Define.h:73
void AddUpdateObject(Object *obj)
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
ACE_UINT32 uint32
Definition: Define.h:71
void Object::SetByteValue ( uint16  index,
uint8  offset,
uint8  value 
)

Definition at line 876 of file Object.cpp.

References ObjectAccessor::AddUpdateObject(), ASSERT, Oregon::Singleton< ObjectAccessor, Oregon::ClassLevelLockable< ObjectAccessor, ACE_Thread_Mutex > >::Instance(), m_inWorld, m_objectUpdated, m_uint32Values, m_valuesCount, PrintIndexError(), and sLog.

Referenced by Player::BuildPlayerRepop(), Pet::Create(), Player::Create(), Pet::CreateBaseAtCreature(), DynamicObject::CreateDynamicObject(), Aura::HandleAuraModShapeshift(), WorldSession::HandleBuyBankSlotOpcode(), ChatHandler::HandleModifyGenderCommand(), WorldSession::HandlePetRename(), ChatHandler::HandleResetHonorCommand(), WorldSession::HandleSetActionBar(), Creature::InitEntry(), Pet::LoadPetFromDB(), Player::ResurrectPlayer(), Player::SaveToDB(), Unit::SetCharm(), Pet::SetLoyaltyLevel(), Unit::SetMinion(), Unit::setPowerType(), Player::SetRestBonus(), Creature::SetVirtualItem(), and Creature::UpdateEntry().

877 {
878  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
879 
880  if (offset > 4)
881  {
882  sLog.outError("Object::SetByteValue: wrong offset %u", offset);
883  return;
884  }
885 
886  if (uint8(m_uint32Values[ index ] >> (offset * 8)) != value)
887  {
888  m_uint32Values[ index ] &= ~uint32(uint32(0xFF) << (offset * 8));
889  m_uint32Values[ index ] |= uint32(uint32(value) << (offset * 8));
890 
891  if (m_inWorld)
892  {
893  if (!m_objectUpdated)
894  {
896  m_objectUpdated = true;
897  }
898  }
899  }
900 }
bool m_objectUpdated
Definition: Object.h:416
bool m_inWorld
Definition: Object.h:419
uint32 * m_uint32Values
Definition: Object.h:408
#define sLog
Log class singleton.
Definition: Log.h:187
ACE_UINT8 uint8
Definition: Define.h:73
void AddUpdateObject(Object *obj)
etc mysql my cnf *Then change max_allowed_packet to a bigger value
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
ACE_UINT32 uint32
Definition: Define.h:71
void Object::SetFlag ( uint16  index,
uint32  newFlag 
)

Definition at line 983 of file Object.cpp.

References ObjectAccessor::AddUpdateObject(), ASSERT, Oregon::Singleton< ObjectAccessor, Oregon::ClassLevelLockable< ObjectAccessor, ACE_Thread_Mutex > >::Instance(), m_inWorld, m_objectUpdated, m_uint32Values, m_valuesCount, and PrintIndexError().

Referenced by Creature::AllLootRemovedFromCorpse(), GameObject::CastSpell(), Unit::ClearInCombat(), Player::Create(), Unit::DealDamage(), PetAI::DoAttack(), Spell::EffectSkinning(), Spell::EffectSummonType(), npc_escortAI::EnterEvadeMode(), Aura::HandleArenaPreparation(), Aura::HandleAuraCloneCaster(), Aura::HandleAuraDummy(), Aura::HandleAuraGhost(), Aura::HandleAuraModDisarm(), Aura::HandleAuraModPacify(), Aura::HandleAuraModPacifyAndSilence(), Aura::HandleAuraModSilence(), Aura::HandleAuraModStalked(), Aura::HandleComprehendLanguage(), OPvPCapturePointNA::HandleCustomSpell(), ChatHandler::HandleExploreCheatCommand(), Aura::HandleFeignDeath(), Aura::HandleForceMoveForward(), ChatHandler::HandleFreezeCommand(), Battleground::HandleKillPlayer(), WorldSession::HandleLogoutRequestOpcode(), ChatHandler::HandleModifyBitCommand(), Aura::HandleModInvisibility(), Aura::HandleModStealth(), Player::InitStatsForLevel(), Unit::Kill(), GameObject::LoadGameObjectFromDB(), Unit::ModifyAuraState(), Unit::Mount(), Player::RemovedInsignia(), FlightPathMovementGenerator::Reset(), Player::SendInitialPacketsAfterAddToMap(), Player::SendLoot(), Unit::SetCharm(), Unit::SetCharmedBy(), Unit::SetContestedPvP(), Pet::setDeathState(), Player::SetFFAPvP(), Player::SetGameMaster(), Unit::SetInCombatState(), Creature::SetLootRecipient(), Unit::SetMinion(), Player::SetRestFlag(), Player::SetTitle(), Spell::SummonClassPet(), GameObject::SwitchDoorOrButton(), Creature::UpdateEntry(), Player::UpdateZone(), and GameObject::Use().

984 {
985  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
986  uint32 oldval = m_uint32Values[ index ];
987  uint32 newval = oldval | newFlag;
988 
989  if (oldval != newval)
990  {
991  m_uint32Values[ index ] = newval;
992 
993  if (m_inWorld)
994  {
995  if (!m_objectUpdated)
996  {
998  m_objectUpdated = true;
999  }
1000  }
1001  }
1002 }
bool m_objectUpdated
Definition: Object.h:416
bool m_inWorld
Definition: Object.h:419
uint32 * m_uint32Values
Definition: Object.h:408
void AddUpdateObject(Object *obj)
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
ACE_UINT32 uint32
Definition: Define.h:71
void Object::SetFlag64 ( uint16  index,
uint64  newFlag 
)
inline

Definition at line 311 of file Object.h.

312  {
313  uint64 oldval = GetUInt64Value(index);
314  uint64 newval = oldval | newFlag;
315  SetUInt64Value(index, newval);
316  }
const uint64 & GetUInt64Value(uint16 index) const
Definition: Object.h:216
void SetUInt64Value(uint16 index, const uint64 &value)
Definition: Object.cpp:796
ACE_UINT64 uint64
Definition: Define.h:70
void Object::SetFloatValue ( uint16  index,
float  value 
)

Definition at line 857 of file Object.cpp.

References ObjectAccessor::AddUpdateObject(), ASSERT, Oregon::Singleton< ObjectAccessor, Oregon::ClassLevelLockable< ObjectAccessor, ACE_Thread_Mutex > >::Instance(), m_floatValues, m_inWorld, m_objectUpdated, m_valuesCount, PrintIndexError(), and value.

Referenced by Battleground::AddSpiritGuide(), ApplyModPositiveFloatValue(), ApplyModSignedFloatValue(), ApplyPercentModFloatValue(), Player::BuildPlayerRepop(), GameEventMgr::ChangeEquipOrModel(), Corpse::Create(), GameObject::Create(), Player::Create(), DynamicObject::CreateDynamicObject(), ChatHandler::HandleMoveObjectCommand(), ChatHandler::HandleResetHonorCommand(), ChatHandler::HandleSetValue(), Creature::InitEntry(), Guardian::InitStatsForLevel(), Player::InitStatsForLevel(), SetStatFloatValue(), Guardian::UpdateAttackPowerAndDamage(), Creature::UpdateAttackPowerAndDamage(), Player::UpdateAttackPowerAndDamage(), GameObject::UpdateRotationFields(), and Player::UpdateSpellCritChance().

858 {
859  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
860 
861  if (m_floatValues[ index ] != value)
862  {
863  m_floatValues[ index ] = value;
864 
865  if (m_inWorld)
866  {
867  if (!m_objectUpdated)
868  {
870  m_objectUpdated = true;
871  }
872  }
873  }
874 }
bool m_objectUpdated
Definition: Object.h:416
bool m_inWorld
Definition: Object.h:419
void AddUpdateObject(Object *obj)
etc mysql my cnf *Then change max_allowed_packet to a bigger value
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
float * m_floatValues
Definition: Object.h:409
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
void Object::SetInt16Value ( uint16  index,
uint8  offset,
int16  value 
)
inline

Definition at line 253 of file Object.h.

References ByteConverter::apply().

Referenced by Player::SetVisibleItemSlot().

254  {
255  SetUInt16Value(index, offset, (uint16)value);
256  }
void SetUInt16Value(uint16 index, uint8 offset, uint16 value)
Definition: Object.cpp:902
etc mysql my cnf *Then change max_allowed_packet to a bigger value
ACE_UINT16 uint16
Definition: Define.h:72
void Object::SetInt32Value ( uint16  index,
int32  value 
)

Definition at line 758 of file Object.cpp.

References ObjectAccessor::AddUpdateObject(), ASSERT, Oregon::Singleton< ObjectAccessor, Oregon::ClassLevelLockable< ObjectAccessor, ACE_Thread_Mutex > >::Instance(), m_int32Values, m_inWorld, m_objectUpdated, m_valuesCount, PrintIndexError(), and value.

Referenced by ApplyModInt32Value(), Player::Create(), ChatHandler::HandleResetHonorCommand(), Player::InitStatsForLevel(), Item::LoadFromDB(), Player::LoadFromDB(), Item::SetItemRandomProperties(), Guardian::UpdateAttackPowerAndDamage(), Creature::UpdateAttackPowerAndDamage(), and Player::UpdateAttackPowerAndDamage().

759 {
760  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
761 
762  if (m_int32Values[ index ] != value)
763  {
764  m_int32Values[ index ] = value;
765 
766  if (m_inWorld)
767  {
768  if (!m_objectUpdated)
769  {
771  m_objectUpdated = true;
772  }
773  }
774  }
775 }
bool m_objectUpdated
Definition: Object.h:416
bool m_inWorld
Definition: Object.h:419
int32 * m_int32Values
Definition: Object.h:407
void AddUpdateObject(Object *obj)
etc mysql my cnf *Then change max_allowed_packet to a bigger value
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
void Object::SetStatFloatValue ( uint16  index,
float  value 
)

Definition at line 928 of file Object.cpp.

References SetFloatValue().

Referenced by Player::UpdateBlockPercentage(), Player::UpdateCritPercentage(), Guardian::UpdateDamagePhysical(), Unit::UpdateDamagePhysical(), Player::UpdateDodgePercentage(), Player::UpdateManaRegen(), and Player::UpdateParryPercentage().

929 {
930  if (value < 0)
931  value = 0.0f;
932 
933  SetFloatValue(index, value);
934 }
etc mysql my cnf *Then change max_allowed_packet to a bigger value
void SetFloatValue(uint16 index, float value)
Definition: Object.cpp:857
void Object::SetStatInt32Value ( uint16  index,
int32  value 
)

Definition at line 936 of file Object.cpp.

References SetUInt32Value().

Referenced by Unit::SetMaxPower(), Unit::SetPower(), and Player::UpdateSpellDamageAndHealingBonus().

937 {
938  if (value < 0)
939  value = 0;
940 
941  SetUInt32Value(index, uint32(value));
942 }
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:777
etc mysql my cnf *Then change max_allowed_packet to a bigger value
ACE_UINT32 uint32
Definition: Define.h:71
void Object::SetUInt16Value ( uint16  index,
uint8  offset,
uint16  value 
)

Definition at line 902 of file Object.cpp.

References ObjectAccessor::AddUpdateObject(), ASSERT, Oregon::Singleton< ObjectAccessor, Oregon::ClassLevelLockable< ObjectAccessor, ACE_Thread_Mutex > >::Instance(), m_inWorld, m_objectUpdated, m_uint32Values, m_valuesCount, PrintIndexError(), and sLog.

Referenced by Player::LoadFromDB().

903 {
904  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
905 
906  if (offset > 2)
907  {
908  sLog.outError("Object::SetUInt16Value: wrong offset %u", offset);
909  return;
910  }
911 
912  if (uint16(m_uint32Values[ index ] >> (offset * 16)) != value)
913  {
914  m_uint32Values[ index ] &= ~uint32(uint32(0xFFFF) << (offset * 16));
915  m_uint32Values[ index ] |= uint32(uint32(value) << (offset * 16));
916 
917  if (m_inWorld)
918  {
919  if (!m_objectUpdated)
920  {
922  m_objectUpdated = true;
923  }
924  }
925  }
926 }
bool m_objectUpdated
Definition: Object.h:416
bool m_inWorld
Definition: Object.h:419
uint32 * m_uint32Values
Definition: Object.h:408
#define sLog
Log class singleton.
Definition: Log.h:187
void AddUpdateObject(Object *obj)
etc mysql my cnf *Then change max_allowed_packet to a bigger value
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
ACE_UINT16 uint16
Definition: Define.h:72
ACE_UINT32 uint32
Definition: Define.h:71
void Object::SetUInt32Value ( uint16  index,
uint32  value 
)

Definition at line 777 of file Object.cpp.

References ObjectAccessor::AddUpdateObject(), ASSERT, Oregon::Singleton< ObjectAccessor, Oregon::ClassLevelLockable< ObjectAccessor, ACE_Thread_Mutex > >::Instance(), m_inWorld, m_objectUpdated, m_uint32Values, m_valuesCount, PrintIndexError(), and value.

Referenced by _Create(), Pet::_LoadAuras(), Player::_LoadAuras(), Player::_LoadDailyQuestStatus(), Player::_LoadSkills(), Player::AddItemToBuyBackSlot(), Battleground::AddSpiritGuide(), Player::ApplyEnchantment(), ApplyModUInt32Value(), Player::CheckAreaExploreAndOutdoor(), Item::ClearEnchantment(), Unit::ClearInCombat(), Item::CloneItem(), ObjectAccessor::ConvertCorpseForPlayer(), Transport::Create(), Bag::Create(), Item::Create(), GameObject::Create(), Player::Create(), Pet::CreateBaseAtCreature(), Player::CreateCorpse(), DynamicObject::CreateDynamicObject(), Unit::CreateTamedPetFrom(), GameObject::Delete(), Unit::Dismount(), Spell::DoCreateItem(), Player::DuelComplete(), Player::DurabilityPointsLoss(), Player::DurabilityRepair(), Spell::EffectAddFarsight(), Spell::EffectDuel(), Spell::EffectPersistentAA(), Spell::EffectScriptEffect(), Spell::EffectSummonDeadPet(), Spell::EffectSummonPet(), Spell::EffectSummonType(), Spell::EffectTameCreature(), Player::GiveLevel(), Pet::GivePetXP(), Player::GiveXP(), Aura::HandleAuraModIncreaseFlightSpeed(), Aura::HandleAuraTrackCreatures(), Aura::HandleAuraTrackResources(), Aura::HandleAuraTransform(), WorldSession::HandleChooseTitleOpcode(), ChatHandler::HandleCreatePetCommand(), ChatHandler::HandleHideAreaCommand(), ChatHandler::HandleLevelUpCommand(), WorldSession::HandleMailCreateTextItem(), ChatHandler::HandleMod32Value(), ChatHandler::HandleModifyFactionCommand(), ChatHandler::HandleModifyMountCommand(), ChatHandler::HandleNpcFlagCommand(), ChatHandler::HandleNpcFollowCommand(), ChatHandler::HandleNpcPlayEmoteCommand(), WorldSession::HandleOpenItemOpcode(), WorldSession::HandlePetitionBuyOpcode(), WorldSession::HandlePetRename(), ChatHandler::HandleResetHonorCommand(), ChatHandler::HandleResetLevelCommand(), WorldSession::HandleSelfResOpcode(), ChatHandler::HandleSet32Bit(), WorldSession::HandleSetTargetOpcode(), ChatHandler::HandleSetValue(), ChatHandler::HandleShowAreaCommand(), ChatHandler::HandleStandStateCommand(), ChatHandler::HandleTitlesCurrentCommand(), ChatHandler::HandleTitlesRemoveCommand(), ChatHandler::HandleTitlesSetMaskCommand(), ChatHandler::HandleUpdate(), WorldSession::HandleWrapItemOpcode(), Guardian::InitStatsForLevel(), Player::InitStatsForLevel(), WaypointMovementGenerator< T >::InitTraveller(), Unit::Kill(), Player::KillPlayer(), Corpse::LoadCorpseFromDB(), Creature::LoadCreaturesAddon(), Creature::LoadEquipment(), Bag::LoadFromDB(), Item::LoadFromDB(), Player::LoadFromDB(), Pet::LoadPetFromDB(), WorldSession::LogoutPlayer(), Player::ModifyArenaPoints(), Player::ModifyHonorPoints(), Player::ModifySkillBonus(), Unit::Mount(), CreatureEventAI::ProcessAction(), Player::RemoveAmmo(), Player::RemoveItemFromBuyBackSlot(), Player::ResetDailyQuestStatus(), Player::SaveToDB(), Spell::SendChannelStart(), Spell::SendChannelUpdate(), Player::SetAmmo(), Aura::SetAura(), Aura::SetAuraApplication(), Aura::SetAuraFlag(), Aura::SetAuraLevel(), Player::SetDailyQuestStatus(), Pet::setDeathState(), Creature::setDeathState(), Player::setDeathState(), Unit::setDeathState(), GameObject::SetDisplayId(), Player::SetDrunkValue(), Item::SetEnchantment(), Item::SetEnchantmentCharges(), Item::SetEnchantmentDuration(), ScriptedAI::SetEquipmentSlots(), GameObject::SetGoArtKit(), GameObject::SetGoState(), Unit::SetHealth(), Unit::SetLevel(), Unit::SetMaxHealth(), CharmInfo::SetPetNumber(), Player::SetRestBonus(), Player::SetSkill(), SetStatInt32Value(), Pet::SetTP(), Creature::SetVirtualItem(), Creature::SetVirtualItemRaw(), Player::SetVisibleItemSlot(), npc_escortAI::Start(), FollowerAI::StartFollow(), Spell::SummonClassPet(), Map::SummonCreature(), OPvPCapturePointEP::SummonFlightMaster(), Spell::SummonGuardian(), Player::SummonPet(), OPvPCapturePointEP::SummonShrine(), GameObject::Update(), Player::UpdateDuelFlag(), Item::UpdateDuration(), Creature::UpdateEntry(), GameEventMgr::UpdateEventNPCFlags(), Player::UpdateExpertise(), Player::UpdateHonorFields(), Item::UpdateItemSuffixFactor(), Player::UpdateShieldBlockValue(), Player::UpdateSkill(), Player::UpdateSkillPro(), Player::UpdateSkillsForLevel(), and Player::UpdateSkillsToMaxSkillsForLevel().

778 {
779  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
780 
781  if (m_uint32Values[ index ] != value)
782  {
783  m_uint32Values[ index ] = value;
784 
785  if (m_inWorld)
786  {
787  if (!m_objectUpdated)
788  {
790  m_objectUpdated = true;
791  }
792  }
793  }
794 }
bool m_objectUpdated
Definition: Object.h:416
bool m_inWorld
Definition: Object.h:419
uint32 * m_uint32Values
Definition: Object.h:408
void AddUpdateObject(Object *obj)
etc mysql my cnf *Then change max_allowed_packet to a bigger value
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
void Object::SetUInt64Value ( uint16  index,
const uint64 value 
)

Definition at line 796 of file Object.cpp.

References ObjectAccessor::AddUpdateObject(), ASSERT, Oregon::Singleton< ObjectAccessor, Oregon::ClassLevelLockable< ObjectAccessor, ACE_Thread_Mutex > >::Instance(), m_inWorld, m_objectUpdated, m_uint32Values, m_valuesCount, and PrintIndexError().

Referenced by _Create(), Guild::_StoreItem(), Player::_StoreItem(), Player::AddItemToBuyBackSlot(), Battleground::AddSpiritGuide(), ObjectAccessor::ConvertCorpseForPlayer(), Bag::Create(), Corpse::Create(), Item::Create(), Player::Create(), DynamicObject::CreateDynamicObject(), Player::DestroyItem(), Player::DuelComplete(), Spell::EffectDuel(), Spell::EffectSummonType(), Spell::EffectTransmitted(), ConfusedMovementGenerator< T >::Finalize(), Unit::GetCharm(), WorldSession::HandleAcceptTradeOpcode(), ChatHandler::HandleCreatePetCommand(), WorldSession::HandleNpcTextQueryOpcode(), WorldSession::HandleOpenItemOpcode(), ChatHandler::HandleTitlesSetMaskCommand(), WorldSession::HandleWrapItemOpcode(), Corpse::LoadCorpseFromDB(), Bag::LoadFromDB(), Item::LoadFromDB(), Player::LoadFromDB(), Pet::LoadPetFromDB(), WorldSession::LogoutPlayer(), Bag::RemoveItem(), Player::RemoveItem(), Player::RemoveItemFromBuyBackSlot(), Spell::SendChannelStart(), Spell::SendChannelUpdate(), Player::SetVisibleItemSlot(), Bag::StoreItem(), and Player::VisualizeItem().

797 {
798  ASSERT(index + 1 < m_valuesCount || PrintIndexError(index, true));
799  if (*((uint64*) & (m_uint32Values[ index ])) != value)
800  {
801  m_uint32Values[ index ] = *((uint32*)&value);
802  m_uint32Values[ index + 1 ] = *(((uint32*)&value) + 1);
803 
804  if (m_inWorld)
805  {
806  if (!m_objectUpdated)
807  {
809  m_objectUpdated = true;
810  }
811  }
812  }
813 }
bool m_objectUpdated
Definition: Object.h:416
bool m_inWorld
Definition: Object.h:419
uint32 * m_uint32Values
Definition: Object.h:408
void AddUpdateObject(Object *obj)
etc mysql my cnf *Then change max_allowed_packet to a bigger value
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1077
ACE_UINT64 uint64
Definition: Define.h:70
uint16 m_valuesCount
Definition: Object.h:414
#define ASSERT
Definition: Errors.h:29
ACE_UINT32 uint32
Definition: Define.h:71
Corpse* Object::ToCorpse ( )
inline

Definition at line 380 of file Object.h.

References TYPEID_CORPSE.

380 { if (GetTypeId() == TYPEID_CORPSE) return reinterpret_cast<Corpse*>(this); else return NULL; }
Definition: Corpse.h:48
uint8 GetTypeId() const
Definition: Object.h:192
Corpse const* Object::ToCorpse ( ) const
inline

Definition at line 381 of file Object.h.

References TYPEID_CORPSE.

381 { if (GetTypeId() == TYPEID_CORPSE) return reinterpret_cast<Corpse const*>(this); else return NULL; }
Definition: Corpse.h:48
uint8 GetTypeId() const
Definition: Object.h:192
Creature* Object::ToCreature ( )
inline

Definition at line 371 of file Object.h.

References TYPEID_UNIT.

Referenced by _BuildValuesUpdate(), Map::_GetScriptCreature(), Map::_GetScriptCreatureSourceOrTarget(), Unit::_IsValidAssistTarget(), Player::AddQuestAndCheckCompletion(), AreaAura::AreaAura(), Unit::Attack(), Unit::AttackStop(), PathInfo::BuildPolyPath(), Creature::CanCreatureAttack(), WorldObject::CanDetectStealthOf(), Unit::CanHaveThreatList(), CharmInfo::CharmInfo(), Player::CharmSpellInitialize(), Spell::CheckCast(), Spell::CheckDummyCast(), Spell::CheckPetCast(), Unit::ClearInCombat(), Unit::CombatStart(), Unit::DealDamage(), Unit::DealMeleeDamage(), Unit::DealSpellDamage(), WorldObject::DestroyForNearbyPlayers(), Spell::DoAllEffectOnTarget(), Spell::DoSpellHitOnUnit(), CreatureAI::DoZoneInCombat(), Spell::EffectDummy(), Spell::EffectSkinning(), Spell::EffectTameCreature(), Spell::EffectTaunt(), RotateMovementGenerator::Finalize(), TimedFleeingMovementGenerator::Finalize(), AssistanceMovementGenerator::Finalize(), DistractMovementGenerator::Finalize(), EffectMovementGenerator::Finalize(), AssistanceDistractMovementGenerator::Finalize(), Creature::GetAggroRange(), Unit::GetCreatureType(), Player::GetDefaultGossipMenuForSource(), Unit::GetFactionTemplateEntry(), Player::GetGossipTextId(), WorldObject::GetGridActivationRange(), WorldObject::GetSightRange(), Aura::HandleAuraModDisarm(), Aura::HandleChannelDeathItem(), ChatHandler::HandleCreatePetCommand(), Aura::HandleFeignDeath(), ChatHandler::HandleNpcChangeEntryCommand(), WorldSession::HandlePetActionHelper(), WorldSession::HandlePetCastSpellOpcode(), WorldSession::HandleQuestgiverChooseRewardOpcode(), WorldSession::HandleQuestgiverStatusQueryOpcode(), ChatHandler::HandleRespawnCommand(), WorldSession::HandleSpellClick(), CharmInfo::InitCharmCreateSpells(), MotionMaster::InitDefault(), CharmInfo::InitPossessCreateSpells(), TempSummon::InitSummon(), Player::isHonorOrXPTarget(), Unit::isSpellBlocked(), WorldObject::IsWorldObject(), Unit::Kill(), Pet::LoadPetFromDB(), Unit::MagicSpellHitResult(), Condition::Meets(), Unit::MeleeSpellHitResult(), MotionMaster::MoveChase(), MotionMaster::MoveFleeing(), MotionMaster::MoveFollow(), MotionMaster::MoveSeekAssistance(), CreatureAI::OnCharmed(), Player::OnGossipSelect(), SmartScript::OnInitialize(), Aura::PeriodicTick(), Player::PrepareGossipMenu(), SmartScript::ProcessAction(), CreatureEventAI::ProcessEvent(), Map::RemoveAllObjectsInRemoveList(), Player::RewardHonor(), Player::RewardReputation(), Unit::RollMeleeOutcomeAgainst(), Creature::SelectVictim(), Player::SendPreparedGossip(), WorldObject::setActive(), Unit::SetCharm(), Unit::SetInCombatState(), Unit::SpellDamageBonus(), Unit::SpellHitResult(), Player::StopCastingCharm(), Map::SummonCreature(), Player::SummonPet(), Unit::TauntApply(), Unit::TauntFadeOut(), Aura::TriggerSpell(), TempSummon::UnSummon(), TargetedMovementGeneratorMedium< T, D >::Update(), Map::Update(), SimpleCharmedAI::UpdateAI(), Unit::UpdateCharmAI(), Player::UpdateCharmedAI(), HostileReference::updateOnlineStatus(), Unit::UpdateSpeed(), Player::UpdateVisibilityOf(), and CharmInfo::~CharmInfo().

371 { if (GetTypeId() == TYPEID_UNIT) return reinterpret_cast<Creature*>(this); else return NULL; }
uint8 GetTypeId() const
Definition: Object.h:192
Creature const* Object::ToCreature ( ) const
inline

Definition at line 372 of file Object.h.

References TYPEID_UNIT.

372 { if (GetTypeId() == TYPEID_UNIT) return reinterpret_cast<Creature const*>(this); else return NULL; }
uint8 GetTypeId() const
Definition: Object.h:192
DynamicObject* Object::ToDynObject ( )
inline

Definition at line 383 of file Object.h.

References TYPEID_DYNAMICOBJECT.

Referenced by WorldObject::GetGridActivationRange(), WorldObject::GetSightRange(), and Map::Update().

383 { if (GetTypeId() == TYPEID_DYNAMICOBJECT) return reinterpret_cast<DynamicObject*>(this); else return NULL; }
uint8 GetTypeId() const
Definition: Object.h:192
DynamicObject const* Object::ToDynObject ( ) const
inline

Definition at line 384 of file Object.h.

References TYPEID_DYNAMICOBJECT.

384 { if (GetTypeId() == TYPEID_DYNAMICOBJECT) return reinterpret_cast<DynamicObject const*>(this); else return NULL; }
uint8 GetTypeId() const
Definition: Object.h:192
GameObject* Object::ToGameObject ( )
inline
GameObject const* Object::ToGameObject ( ) const
inline

Definition at line 378 of file Object.h.

References TYPEID_GAMEOBJECT.

378 { if (GetTypeId() == TYPEID_GAMEOBJECT) return reinterpret_cast<GameObject const*>(this); else return NULL; }
uint8 GetTypeId() const
Definition: Object.h:192
void Object::ToggleFlag ( uint16  index,
uint32  flag 
)
inline

Definition at line 273 of file Object.h.

Referenced by WorldSession::HandleTogglePvP(), Player::ToggleAFK(), and Player::ToggleDND().

274  {
275  if (HasFlag(index, flag))
276  RemoveFlag(index, flag);
277  else
278  SetFlag(index, flag);
279  }
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:983
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1004
bool HasFlag(uint16 index, uint32 flag) const
Definition: Object.h:281
void Object::ToggleFlag ( uint16  index,
uint8  offset,
uint8  flag 
)
inline

Definition at line 290 of file Object.h.

291  {
292  if (HasByteFlag(index, offset, flag))
293  RemoveByteFlag(index, offset, flag);
294  else
295  SetByteFlag(index, offset, flag);
296  }
bool HasByteFlag(uint16 index, uint8 offset, uint8 flag) const
Definition: Object.h:298
void SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
Definition: Object.cpp:1027
void RemoveByteFlag(uint16 index, uint8 offset, uint8 newFlag)
Definition: Object.cpp:1052
void Object::ToggleFlag64 ( uint16  index,
uint64  flag 
)
inline

Definition at line 325 of file Object.h.

326  {
327  if (HasFlag64(index, flag))
328  RemoveFlag64(index, flag);
329  else
330  SetFlag64(index, flag);
331  }
void SetFlag64(uint16 index, uint64 newFlag)
Definition: Object.h:311
bool HasFlag64(uint16 index, uint64 flag) const
Definition: Object.h:333
void RemoveFlag64(uint16 index, uint64 oldFlag)
Definition: Object.h:318
Player* Object::ToPlayer ( )
inline

Definition at line 368 of file Object.h.

References TYPEID_PLAYER.

Referenced by ThreatManager::_addThreat(), _BuildMovementUpdate(), _BuildValuesUpdate(), Map::_GetScriptPlayer(), Map::_GetScriptPlayerSourceOrTarget(), Spell::_handle_finish_phase(), Unit::_IsValidAssistTarget(), Unit::_IsValidAttackTarget(), Pet::_LoadSpellCooldowns(), Aura::_RemoveAura(), Unit::AddAura(), Player::AddQuest(), Unit::ApplyMaxPowerMod(), Unit::ApplyPowerMod(), Unit::Attack(), TotemAI::AttackStart(), Unit::CalcAbsorbResist(), Unit::CalculateDamage(), Unit::CalculateMeleeDamage(), Unit::CalculateSpellDamage(), Unit::CalculateSpellDamageTaken(), Unit::CalculateSpellDuration(), PetAI::CanAttack(), Spell::cancel(), Player::CanInteractWithQuestGiver(), WorldObject::CanSeeOrDetect(), Spell::cast(), Pet::CastPetAuras(), ChainHealingOrder::ChainHealingHash(), Spell::CheckCast(), Spell::CheckDummyCast(), Spell::CheckItems(), Pet::CheckLearning(), Spell::CheckTarget(), Unit::CombatStart(), Unit::CombatStop(), Unit::DealDamage(), Unit::DealMeleeDamage(), Spell::Delayed(), Spell::DelayedChannel(), Unit::Dismount(), Spell::DoAllEffectOnTarget(), Spell::DoCreateItem(), Spell::DoSpellHitOnUnit(), Spell::EffectAddComboPoints(), Spell::EffectAddHonor(), Spell::EffectApplyAura(), Spell::EffectBlock(), Spell::EffectCharge(), Spell::EffectDisEnchant(), Spell::EffectDismissPet(), Spell::EffectDuel(), Spell::EffectDummy(), Spell::EffectDurabilityDamage(), Spell::EffectDurabilityDamagePCT(), Spell::EffectEnchantHeldItem(), Spell::EffectEnchantItemPerm(), Spell::EffectEnchantItemTmp(), Spell::EffectEnvironmentalDMG(), Spell::EffectFeedPet(), Spell::EffectHealPct(), Spell::EffectInebriate(), Spell::EffectInstaKill(), Spell::EffectKillCredit(), Spell::EffectKnockBack(), Spell::EffectLearnPetSpell(), Spell::EffectLearnSkill(), Spell::EffectLearnSpell(), Spell::EffectOpenLock(), Spell::EffectParry(), Spell::EffectPickPocket(), Spell::EffectPlayerPull(), Spell::EffectPowerBurn(), Spell::EffectPowerDrain(), Spell::EffectProficiency(), Spell::EffectProspecting(), Spell::EffectQuestComplete(), Spell::EffectQuestFail(), Spell::EffectReputation(), Spell::EffectResurrect(), Spell::EffectResurrectNew(), Spell::EffectSanctuary(), Spell::EffectScriptEffect(), Spell::EffectSelfResurrect(), Spell::EffectSendEvent(), Spell::EffectSendTaxi(), Spell::EffectSkinning(), Spell::EffectSkinPlayerCorpse(), Spell::EffectStuck(), Spell::EffectSummonChangeItem(), Spell::EffectSummonDeadPet(), Spell::EffectSummonFriend(), Spell::EffectSummonObjectWild(), Spell::EffectSummonPet(), Spell::EffectSummonPlayer(), Spell::EffectTameCreature(), Spell::EffectTeleportUnits(), Spell::EffectTransmitted(), Spell::EffectTriggerSpell(), Spell::EffectUnlearnSpecialization(), SmartAI::EndPath(), Spell::FillTargetMap(), Spell::finish(), Unit::GetAffectingPlayer(), Unit::GetCreatureType(), Unit::GetDefenseSkillValue(), Unit::GetFactionTemplateEntry(), WorldObject::GetGridActivationRange(), Unit::GetPartyMember(), WorldObject::GetSightRange(), Unit::GetSpellModOwner(), SmartScript::GetTargets(), Unit::GetUnitCriticalChance(), WorldObject::GetVisibilityRange(), Unit::GetWeaponSkillValue(), Aura::HandleAddModifier(), Aura::HandleAuraDummy(), Aura::HandleAuraModBlockPercent(), Aura::HandleAuraModCritPercent(), Aura::HandleAuraModDisarm(), Aura::HandleAuraModDodgePercent(), Aura::HandleAuraModEffectImmunity(), Aura::HandleAuraModExpertise(), Aura::HandleAuraModParryPercent(), Aura::HandleAuraModRangedAttackPowerOfStatPercent(), Aura::HandleAuraModRegenInterrupt(), Aura::HandleAuraModShapeshift(), Aura::HandleAuraModSkill(), Aura::HandleAuraMounted(), Aura::HandleAuraPeriodicDummy(), Aura::HandleAuraReflectSpellSchool(), Aura::HandleAuraRetainComboPoints(), Aura::HandleAuraTransform(), Aura::HandleBindSight(), Aura::HandleChannelDeathItem(), Unit::HandleDummyAuraProc(), Aura::HandleForceReaction(), Unit::HandleHasteAuraProc(), Aura::HandleIncreasePetOutdoorSpeed(), OutdoorPvPHP::HandleKillImpl(), OutdoorPvPZM::HandleKillImpl(), OutdoorPvPNA::HandleKillImpl(), Aura::HandleManaShield(), WorldSession::HandleMirrorImageDataRequest(), Aura::HandleModDamageDone(), Aura::HandleModDamagePercentDone(), Aura::HandleModHealingDone(), Aura::HandleModHitChance(), ChatHandler::HandleModifyScaleCommand(), Aura::HandleModManaRegen(), Aura::HandleModPossessPet(), Aura::HandleModPowerRegen(), Aura::HandleModPowerRegenPCT(), Aura::HandleModRating(), Aura::HandleModSpellCritChance(), Aura::HandleModSpellCritChanceShool(), Aura::HandleModSpellDamagePercentFromAttackPower(), Aura::HandleModSpellDamagePercentFromStat(), Aura::HandleModSpellHealingPercentFromAttackPower(), Aura::HandleModSpellHealingPercentFromStat(), Aura::HandleModSpellHitChance(), WorldSession::HandleMovementOpcodes(), WorldSession::HandleMoveTeleportAck(), Unit::HandleOverrideClassScriptAuraProc(), Aura::HandlePeriodicDamage(), Aura::HandlePeriodicHeal(), WorldSession::HandlePetActionHelper(), WorldSession::HandlePetCastSpellOpcode(), WorldSession::HandlePetRename(), Aura::HandlePhase(), Unit::HandleProcTriggerSpell(), WorldSession::HandleQuestgiverAcceptQuestOpcode(), Aura::HandleSchoolAbsorb(), ChatHandler::HandleSendOpcodeCommand(), Aura::HandleShapeshiftBoosts(), Aura::HandleShieldBlockValue(), Aura::HandleWaterBreathing(), Pet::InitPetCreateSpells(), Totem::InitStats(), Guardian::InitSummon(), Unit::InterruptSpell(), Player::IsAlwaysDetectableFor(), Unit::IsAlwaysVisibleFor(), Unit::isAttackableByAOE(), DisableMgr::IsDisabledFor(), SmartAI::IsEscortInvokerInRange(), Unit::IsInPartyWith(), Unit::IsInRaidWith(), Unit::isSpellCrit(), Unit::isTargetableForAttack(), ThreatCalcHelper::isValidProcess(), Unit::Kill(), Pet::learnSpell(), Pet::LoadPetFromDB(), WorldSession::LogoutPlayer(), Unit::MagicSpellHitResult(), Condition::Meets(), Unit::MeleeDamageBonus(), Unit::MeleeSpellHitResult(), Unit::ModifyAuraState(), Pet::ModifyLoyalty(), Unit::Mount(), Aura::PeriodicDummyTick(), Aura::PeriodicTick(), Spell::prepare(), SmartScript::ProcessAction(), Puppet::Puppet(), Unit::RemoveCharmedBy(), Unit::RemoveGameObject(), Player::RewardHonor(), Unit::RollMeleeOutcomeAgainst(), Map::ScriptsProcess(), Spell::SendCastResult(), CreatureTextMgr::SendChatPacket(), Spell::SendLoot(), CreatureTextMgr::SendNonChatPacket(), Unit::SendPetActionFeedback(), Unit::SendPetAIReaction(), Unit::SendPetCastFail(), Unit::SendPetClearCooldown(), Unit::SendPetSpellCooldown(), Unit::SendPetTalk(), WorldObject::SendPlaySound(), Spell::SendPlaySpellVisual(), Spell::SendSpellCooldown(), Unit::SetCharm(), Unit::SetCharmedBy(), Unit::SetDisplayId(), Unit::SetHealth(), Unit::SetInCombatWith(), Unit::SetLevel(), Unit::SetMaxHealth(), Unit::SetMaxPower(), Unit::SetMinion(), Unit::SetPower(), Unit::setPowerType(), Unit::SetSpeed(), Unit::SetStunned(), Spell::SetTargetMap(), Spell::Spell(), Unit::SpellDamageBonus(), Spell::SpellDamageSchoolDmg(), Spell::SpellDamageWeaponDmg(), Spell::SummonClassPet(), Map::SummonCreature(), Spell::SummonGuardian(), Spell::TakeCastItem(), Spell::TakePower(), Spell::TakeReagents(), Unit::TauntApply(), Unit::TauntFadeOut(), Aura::TriggerSpell(), Totem::UnSummon(), SpellCastTargets::Update(), Spell::update(), GameObject::Update(), PetAI::UpdateAI(), PetAI::UpdateAllies(), Aura::UpdateAuraDuration(), Unit::UpdateAuraForGroup(), Spell::UpdatePointers(), GameObject::Use(), Oregon::VisibleChangesNotifier::Visit(), Oregon::MessageDistDeliverer::Visit(), and Spell::WriteAmmoToPacket().

368 { if (GetTypeId() == TYPEID_PLAYER) return reinterpret_cast<Player*>(this); else return NULL; }
uint8 GetTypeId() const
Definition: Object.h:192
Definition: Player.h:923
Player const* Object::ToPlayer ( ) const
inline

Definition at line 369 of file Object.h.

References TYPEID_PLAYER.

369 { if (GetTypeId() == TYPEID_PLAYER) return reinterpret_cast<Player const*>(this); else return NULL; }
uint8 GetTypeId() const
Definition: Object.h:192
Definition: Player.h:923
Unit const* Object::ToUnit ( ) const
inline

Definition at line 375 of file Object.h.

References TYPEMASK_UNIT.

375 { if (isType(TYPEMASK_UNIT)) return reinterpret_cast<Unit const*>(this); else return NULL; }
bool isType(uint16 mask) const
Definition: Object.h:193
Definition: Unit.h:908

Member Data Documentation

union { ... }
float* Object::m_floatValues

Definition at line 409 of file Object.h.

Referenced by _BuildValuesUpdate(), and SetFloatValue().

int32* Object::m_int32Values

Definition at line 407 of file Object.h.

Referenced by SetInt32Value().

PackedGuid Object::m_PackGUID
private

Definition at line 421 of file Object.h.

Referenced by _Create().

uint32* Object::m_uint32Values_mirror
protected

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