OregonCore  revision 3611e8a-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 ()
 
const uint64GetGUID () 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 124 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:434
uint32 * m_uint32Values
Definition: Object.h:426
#define sLog
Log class singleton.
Definition: Log.h:187
uint32 GetGUIDLow() const
Definition: Object.h:160
uint8 GetTypeId() const
Definition: Object.h:204
const bool & IsInWorld() const
Definition: Object.h:129
uint32 * m_uint32Values_mirror
Definition: Object.h:430
#define ASSERT
Definition: Errors.h:33
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:434
bool m_inWorld
Definition: Object.h:437
uint32 * m_uint32Values
Definition: Object.h:426
uint16 m_objectType
Definition: Object.h:418
uint8 m_objectTypeId
Definition: Object.h:420
uint32 * m_uint32Values_mirror
Definition: Object.h:430
uint16 m_valuesCount
Definition: Object.h:432
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:458
float GetTransOffsetZ() const
Definition: Player.h:2420
uint32 GetUnitMovementFlags() const
Definition: Unit.h:2015
MovementInfo m_movementInfo
Definition: Object.h:915
uint32 getMSTime()
Definition: Timer.h:32
Transport * GetTransport() const
Definition: Player.h:2403
uint32 GetGUIDLow() const
Definition: Object.h:160
float GetTransOffsetX() const
Definition: Player.h:2412
Player * ToPlayer()
Definition: Object.h:386
uint8 GetTypeId() const
Definition: Object.h:204
ACE_UINT8 uint8
Definition: Define.h:73
float GetTransOffsetO() const
Definition: Player.h:2424
float GetTransOffsetY() const
Definition: Player.h:2416
ACE_UINT64 uint64
Definition: Define.h:70
Definition: Unit.h:461
static void WriteCreate(const MoveSpline &mov, ByteBuffer &data)
uint32 GetGUIDHigh() const
Definition: Object.h:168
uint32 GetFallTime() const
Definition: Object.h:533
uint32 GetTransTime() const
Definition: Player.h:2428
ACE_UINT32 uint32
Definition: Define.h:71
Definition: Unit.h:884
Unit * ToUnit()
Definition: Object.h:392
const uint64 & GetGUID() const
Definition: Object.h:156
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(), Unit::isDead(), 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, and UPDATETYPE_CREATE_OBJECT2.

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  Creature const* creature = ToCreature();
536 
537  if (creature)
538  {
539  if (!creature->isDead())
540  {
541  //sLog.outError("MOB ALIVE!");
542  if (creature->isTappedBy(target))
543  *data << (m_uint32Values[index] & ~UNIT_DYNFLAG_OTHER_TAGGER);
544  else
545  *data << (m_uint32Values[index] | UNIT_DYNFLAG_OTHER_TAGGER);
546  }
547  else
548  {
549  //sLog.outError("MOB DEAD!");
550  if (!target->isAllowedToLoot(creature))
551  *data << (m_uint32Values[index] & ~UNIT_DYNFLAG_LOOTABLE);
552  else
553  *data << (m_uint32Values[index] | UNIT_DYNFLAG_LOOTABLE);
554  }
555  }
556 
557  }
558 
559  // hide RAF menu to non-RAF linked friends
560  else if (index == UNIT_DYNAMIC_FLAGS && GetTypeId() == TYPEID_PLAYER)
561  {
562  if (sObjectMgr.GetRAFLinkStatus(target->ToPlayer(), this->ToPlayer()) != RAF_LINK_NONE)
563  *data << (m_uint32Values[ index ]);
564  else
565  *data << (m_uint32Values[ index ] & ~UNIT_DYNFLAG_REFER_A_FRIEND);
566  }
567  // FG: pretend that OTHER players in own group are friendly ("blue")
568  else if (index == UNIT_FIELD_BYTES_2 || index == UNIT_FIELD_FACTIONTEMPLATE)
569  {
570  bool ch = false;
571  if (target->GetTypeId() == TYPEID_PLAYER && GetTypeId() == TYPEID_PLAYER && target != this)
572  {
573  if (target->IsInSameGroupWith(ToPlayer()) || target->IsInSameRaidWith(ToPlayer()))
574  {
575  if (index == UNIT_FIELD_BYTES_2)
576  {
577  DEBUG_LOG("-- VALUES_UPDATE: Sending '%s' the blue-group-fix from '%s' (flag)", target->GetName(), ToPlayer()->GetName());
578  *data << (m_uint32Values[ index ] & ((UNIT_BYTE2_FLAG_SANCTUARY | UNIT_BYTE2_FLAG_AURAS | UNIT_BYTE2_FLAG_UNK5) << 8)); // this flag is at uint8 offset 1 !!
579 
580  ch = true;
581  }
582  else if (index == UNIT_FIELD_FACTIONTEMPLATE)
583  {
584  FactionTemplateEntry const* ft1, *ft2;
586  ft2 = target->ToPlayer()->GetFactionTemplateEntry();
587  if (ft1 && ft2 && !ft1->IsFriendlyTo(*ft2))
588  {
589  uint32 faction = target->ToPlayer()->getFaction(); // pretend that all other HOSTILE players have own faction, to allow follow, heal, rezz (trade wont work)
590  DEBUG_LOG("-- VALUES_UPDATE: Sending '%s' the blue-group-fix from '%s' (faction %u)", target->GetName(), ToPlayer()->GetName(), faction);
591  *data << uint32(faction);
592  ch = true;
593  }
594  }
595  }
596  }
597  if (!ch)
598  *data << m_uint32Values[ index ];
599  }
600  else if (index == UNIT_FIELD_HEALTH)
601  {
602  if (GetTypeId() == TYPEID_UNIT || GetTypeId() == TYPEID_PLAYER)
603  {
604  const Unit* me = reinterpret_cast<const Unit*>(this);
605  if (me->ShouldRevealHealthTo(target))
606  *data << m_uint32Values[ index ];
607  else
608  *data << uint32(std::ceil(me->GetHealthPct()));
609  }
610  else
611  *data << m_uint32Values[ index ];
612  }
613  else if (index == UNIT_FIELD_MAXHEALTH)
614  {
615  if (GetTypeId() == TYPEID_UNIT || GetTypeId() == TYPEID_PLAYER)
616  {
617  const Unit* me = reinterpret_cast<const Unit*>(this);
618  if (me->ShouldRevealHealthTo(target))
619  *data << m_uint32Values[ index ];
620  else
621  *data << uint32(100);
622  }
623  else
624  *data << m_uint32Values[ index ];
625  }
626  else
627  {
628  // send in current format (float as float, uint32 as uint32)
629  *data << m_uint32Values[ index ];
630  }
631  }
632  }
633  }
634  else if (isType(TYPEMASK_GAMEOBJECT)) // gameobject case
635  {
636  for (uint16 index = 0; index < m_valuesCount; ++index)
637  {
638  if (updateMask->GetBit(index))
639  {
640  // send in current format (float as float, uint32 as uint32)
641  if (index == GAMEOBJECT_DYN_FLAGS)
642  {
643  if (IsActivateToQuest)
644  {
645  switch (((GameObject*)this)->GetGoType())
646  {
650  *data << uint16(-1);
651  break;
652  default:
653  *data << uint32(0); // unknown, not happen.
654  break;
655  }
656  }
657  else
658  *data << uint32(0); // disable quest object
659  }
660  else
661  *data << m_uint32Values[ index ]; // other cases
662  }
663  }
664  }
665  else // other objects case (no special index checks)
666  {
667  for (uint16 index = 0; index < m_valuesCount; ++index)
668  {
669  if (updateMask->GetBit(index))
670  {
671  // send in current format (float as float, uint32 as uint32)
672  *data << m_uint32Values[ index ];
673  }
674  }
675  }
676 }
bool GetBit(uint32 index)
Definition: UpdateMask.h:49
const uint32 & GetUInt32Value(uint16 index) const
Definition: Object.h:228
uint32 * m_uint32Values
Definition: Object.h:426
uint32 getFaction() const
Definition: Unit.h:1111
bool isType(uint16 mask) const
Definition: Object.h:208
bool IsGameMaster() const
Definition: Player.h:1009
uint32 modelid1
Definition: Creature.h:134
#define sObjectMgr
Definition: ObjectMgr.h:1285
Player * ToPlayer()
Definition: Object.h:386
uint32 flags_extra
Definition: Creature.h:197
bool ShouldRevealHealthTo(Player *player) const
Definition: Unit.cpp:10887
uint8 * GetMask()
Definition: UpdateMask.h:66
uint8 GetTypeId() const
Definition: Object.h:204
ACE_UINT8 uint8
Definition: Define.h:73
bool IsFriendlyTo(FactionTemplateEntry const &entry) const
Definition: DBCStructure.h:314
#define DEBUG_LOG(...)
Definition: Log.h:194
const char * GetName() const
Definition: Object.h:692
bool IsInSameRaidWith(Player const *p) const
Definition: Player.h:1816
bool isAllowedToLoot(const Creature *creature)
Definition: Player.cpp:15042
void append(const std::string &str)
Definition: ByteBuffer.h:358
bool isDead() const
Definition: Unit.h:1441
CreatureInfo const * GetCreatureTemplate() const
Definition: Creature.h:598
uint32 GetLength()
Definition: UpdateMask.h:58
Creature * ToCreature()
Definition: Object.h:389
float * m_floatValues
Definition: Object.h:427
uint16 m_valuesCount
Definition: Object.h:432
bool isTappedBy(Player const *player) const
Definition: Creature.cpp:1032
#define ASSERT
Definition: Errors.h:33
ACE_UINT16 uint16
Definition: Define.h:72
FactionTemplateEntry const * GetFactionTemplateEntry() const
Definition: Unit.cpp:7132
ACE_UINT32 uint32
Definition: Define.h:71
uint32 GetCount()
Definition: UpdateMask.h:62
void SetBit(uint32 index)
Definition: UpdateMask.h:39
Definition: Unit.h:884
bool IsInSameGroupWith(Player const *p) const
Definition: Player.cpp:2388
uint32 GetBlockCount()
Definition: UpdateMask.h:54
float GetHealthPct() const
Definition: Unit.h:1062
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:426
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:779
uint16 m_objectType
Definition: Object.h:418
PackedGuid m_PackGUID
Definition: Object.h:439
#define MAKE_NEW_GUID(l, e, h)
Definition: ObjectGuid.h:80
void SetUInt64Value(uint16 index, const uint64 &value)
Definition: Object.cpp:798
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:434
uint32 * m_uint32Values
Definition: Object.h:426
uint32 * m_uint32Values_mirror
Definition: Object.h:430
uint16 m_valuesCount
Definition: Object.h:432
ACE_UINT32 uint32
Definition: Define.h:71
void Object::_LoadIntoDataField ( const char *  data,
uint32  startOffset,
uint32  count 
)
protected

Definition at line 721 of file Object.cpp.

References atol, m_uint32Values, and StrSplit().

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

722 {
723  if (!data)
724  return;
725 
726  Tokens tokens = StrSplit(data, " ");
727 
728  if (tokens.size() != count)
729  return;
730 
731  Tokens::iterator iter;
732  uint32 index;
733  for (iter = tokens.begin(), index = 0; index < count; ++iter, ++index)
734  m_uint32Values[startOffset + index] = atol((*iter).c_str());
735 }
uint32 * m_uint32Values
Definition: Object.h:426
std::vector< std::string > Tokens
Definition: Util.h:26
Tokens StrSplit(const std::string &src, const std::string &sep)
Definition: Util.cpp:97
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 749 of file Object.cpp.

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

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

750 {
752 
753  for (uint16 index = 0; index < m_valuesCount; ++index, ++value)
754  {
755  if (*value)
756  updateMask->SetBit(index);
757  }
758 }
uint32 * m_uint32Values
Definition: Object.h:426
etc mysql my cnf *Then change max_allowed_packet to a bigger value
uint16 m_valuesCount
Definition: Object.h:432
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 737 of file Object.cpp.

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

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

738 {
740  uint32* mirror = m_uint32Values_mirror;
741 
742  for (uint16 index = 0; index < m_valuesCount; ++index, ++value, ++mirror)
743  {
744  if (*mirror != *value)
745  updateMask->SetBit(index);
746  }
747 }
uint32 * m_uint32Values
Definition: Object.h:426
uint32 * m_uint32Values_mirror
Definition: Object.h:430
etc mysql my cnf *Then change max_allowed_packet to a bigger value
uint16 m_valuesCount
Definition: Object.h:432
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 133 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().

134  {
135  if (m_inWorld)
136  return;
137 
139 
140  m_inWorld = true;
141 
142  // synchronize values mirror with values array (changes will send in updatecreate opcode any way
143  ClearUpdateMask(true);
144  }
void ClearUpdateMask(bool remove)
Definition: Object.cpp:678
bool m_inWorld
Definition: Object.h:437
uint32 * m_uint32Values
Definition: Object.h:426
#define ASSERT
Definition: Errors.h:33
bool Object::AddUInt64Value ( uint16  index,
const uint64 value 
)

Definition at line 817 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().

818 {
819  ASSERT(index + 1 < m_valuesCount || PrintIndexError(index , true));
820  if (value && !*((uint64*) & (m_uint32Values[index])))
821  {
822  m_uint32Values[ index ] = *((uint32*)&value);
823  m_uint32Values[ index + 1 ] = *(((uint32*)&value) + 1);
824 
825  if (m_inWorld)
826  {
827  if (!m_objectUpdated)
828  {
830  m_objectUpdated = true;
831  }
832  }
833  return true;
834  }
835  return false;
836 }
bool m_objectUpdated
Definition: Object.h:434
bool m_inWorld
Definition: Object.h:437
uint32 * m_uint32Values
Definition: Object.h:426
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:1079
ACE_UINT64 uint64
Definition: Define.h:70
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
ACE_UINT32 uint32
Definition: Define.h:71
void Object::ApplyModFlag ( uint16  index,
uint32  flag,
bool  apply 
)
inline

Definition at line 323 of file Object.h.

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

324  {
325  if (apply) SetFlag(index, flag);
326  else RemoveFlag(index, flag);
327  }
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:985
void apply(T *val)
Definition: ByteConverter.h:41
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1006
void Object::ApplyModFlag64 ( uint16  index,
uint64  flag,
bool  apply 
)
inline

Definition at line 357 of file Object.h.

358  {
359  if (apply) SetFlag64(index, flag);
360  else RemoveFlag64(index, flag);
361  }
void apply(T *val)
Definition: ByteConverter.h:41
void SetFlag64(uint16 index, uint64 newFlag)
Definition: Object.h:329
void RemoveFlag64(uint16 index, uint64 oldFlag)
Definition: Object.h:336
void Object::ApplyModInt32Value ( uint16  index,
int32  val,
bool  apply 
)

Definition at line 955 of file Object.cpp.

References GetInt32Value(), and SetInt32Value().

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

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

Definition at line 976 of file Object.cpp.

References GetFloatValue(), and SetFloatValue().

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

Definition at line 962 of file Object.cpp.

References GetFloatValue(), and SetFloatValue().

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

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

Definition at line 946 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().

947 {
948  int32 cur = GetUInt32Value(index);
949  cur += (apply ? val : -val);
950  if (cur < 0)
951  cur = 0;
952  SetUInt32Value(index, cur);
953 }
const uint32 & GetUInt32Value(uint16 index) const
Definition: Object.h:228
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:779
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 969 of file Object.cpp.

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

970 {
971  float value = GetFloatValue(index);
972  ApplyPercentModFloatVar(value, val, apply);
973  SetFloatValue(index, value);
974 }
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:94
void SetFloatValue(uint16 index, float value)
Definition: Object.cpp:859
const float & GetFloatValue(uint16 index) const
Definition: Object.h:240
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:208
uint8 m_objectTypeId
Definition: Object.h:420
ACE_UINT8 uint8
Definition: Define.h:73
uint8 m_updateFlag
Definition: Object.h:421
uint64 GetPetGUID() const
Definition: Unit.h:1487
void AddUpdateBlock(const ByteBuffer &block)
Definition: UpdateData.cpp:41
virtual void _SetCreateBits(UpdateMask *updateMask, Player *target) const
Definition: Object.cpp:749
void SetCount(uint32 valuesCount)
Definition: UpdateMask.h:71
uint16 m_valuesCount
Definition: Object.h:432
const uint64 & GetGUID() const
Definition: Object.h:156
void Object::BuildFieldsUpdate ( Player pl,
UpdateDataMapType data_map 
) const

Definition at line 690 of file Object.cpp.

References ASSERT, and BuildValuesUpdateBlockForPlayer().

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

691 {
692  UpdateDataMapType::iterator iter = data_map.find(pl);
693 
694  if (iter == data_map.end())
695  {
696  std::pair<UpdateDataMapType::iterator, bool> p = data_map.insert(UpdateDataMapType::value_type(pl, UpdateData()));
697  ASSERT(p.second);
698  iter = p.first;
699  }
700 
701  BuildValuesUpdateBlockForPlayer(&iter->second, iter->first);
702 }
void BuildValuesUpdateBlockForPlayer(UpdateData *data, Player *target) const
Definition: Object.cpp:218
#define ASSERT
Definition: Errors.h:33
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
ACE_UINT8 uint8
Definition: Define.h:73
void AddUpdateBlock(const ByteBuffer &block)
Definition: UpdateData.cpp:41
const uint64 & GetGUID() const
Definition: Object.h:156
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
const uint64 & GetGUID() const
Definition: Object.h:156
virtual void Object::BuildUpdate ( UpdateDataMapType )
inlinevirtual

Reimplemented in WorldObject, and Item.

Definition at line 380 of file Object.h.

Referenced by ObjectAccessor::Update().

380 {}
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:737
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:432
const uint64 & GetGUID() const
Definition: Object.h:156
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)
ACE_UINT8 uint8
Definition: Define.h:73
ACE_UINT64 uint64
Definition: Define.h:70
#define ASSERT
Definition: Errors.h:33
WorldSession * GetSession() const
Definition: Player.h:1959
const uint64 & GetGUID() const
Definition: Object.h:156
void Object::ForceValuesUpdateAtIndex ( uint32  i)

Definition at line 1797 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().

1798 {
1799  m_uint32Values_mirror[i] = GetUInt32Value(i) + 1; // makes server think the field changed
1800  if (m_inWorld)
1801  {
1802  if (!m_objectUpdated)
1803  {
1805  m_objectUpdated = true;
1806  }
1807  }
1808 }
bool m_objectUpdated
Definition: Object.h:434
const uint32 & GetUInt32Value(uint16 index) const
Definition: Object.h:228
bool m_inWorld
Definition: Object.h:437
uint32 * m_uint32Values_mirror
Definition: Object.h:430
void AddUpdateObject(Object *obj)
uint8 Object::GetByteValue ( uint16  index,
uint8  offset 
) const
inline

Definition at line 246 of file Object.h.

References ASSERT.

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

247  {
248  ASSERT(index < m_valuesCount || PrintIndexError(index , false));
249  ASSERT(offset < 4);
250  return *(((uint8*)&m_uint32Values[ index ]) + offset);
251  }
uint32 * m_uint32Values
Definition: Object.h:426
ACE_UINT8 uint8
Definition: Define.h:73
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
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(), 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::CheckCast(), 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(), GameObject::GetNameForLocaleIdx(), Creature::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(), GameObject::SaveToDB(), Creature::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().

187  {
189  }
const uint32 & GetUInt32Value(uint16 index) const
Definition: Object.h:228
const uint64& Object::GetGUID ( ) const
inline

Definition at line 156 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::HandleChannelJoin(), WorldSession::HandleChannelKick(), WorldSession::HandleChannelLeave(), 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::HandleGroupgoCommand(), WorldSession::HandleGuildLeaderOpcode(), WorldSession::HandleGuildLeaveOpcode(), WorldSession::HandleGuildSaveEmblemOpcode(), WorldSession::HandleInitiateTradeOpcode(), WorldSession::HandleInspectArenaStatsOpcode(), WorldSession::HandleInspectHonorStatsOpcode(), WorldSession::HandleLootMasterGiveOpcode(), WorldSession::HandleLootMoneyOpcode(), WorldSession::HandleMessagechatOpcode(), WorldSession::HandleMinimapPingOpcode(), WorldSession::HandleMoveKnockBackAck(), WorldSession::HandleMoveTeleportAck(), ChatHandler::HandleNamegoCommand(), ChatHandler::HandleObjectStateCommand(), WorldSession::HandleOfferPetitionOpcode(), WorldSession::HandleOpenItemOpcode(), Aura::HandlePeriodicHeal(), WorldSession::HandlePetAbandon(), WorldSession::HandlePetActionHelper(), WorldSession::HandlePetitionDeclineOpcode(), WorldSession::HandlePetitionShowSignOpcode(), WorldSession::HandlePetitionSignOpcode(), WorldSession::HandlePetRename(), 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(), 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(), 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().

157  {
158  return GetUInt64Value(0);
159  }
const uint64 & GetUInt64Value(uint16 index) const
Definition: Object.h:234
uint32 Object::GetGUIDHigh ( ) const
inline

Definition at line 168 of file Object.h.

References GUID_HIPART.

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

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

Definition at line 160 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(), Player::GetGameObjectIfCanInteractWith(), 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::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(), GameObject::SaveToDB(), Creature::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().

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

Definition at line 164 of file Object.h.

References GUID_ENPART.

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

Definition at line 181 of file Object.h.

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

Definition at line 253 of file Object.h.

254  {
255  return *reinterpret_cast<ObjectGuid const*>(&GetUInt64Value(index));
256  }
const uint64 & GetUInt64Value(uint16 index) const
Definition: Object.h:234
const int32& Object::GetInt32Value ( uint16  index) const
inline

Definition at line 222 of file Object.h.

References ASSERT.

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

223  {
224  ASSERT(index < m_valuesCount || PrintIndexError(index , false));
225  return m_int32Values[ index ];
226  }
int32 * m_int32Values
Definition: Object.h:425
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
ObjectGuid const& Object::GetObjectGUID ( ) const
inline

Definition at line 176 of file Object.h.

References OBJECT_FIELD_GUID.

Referenced by Transport::DoEventIfAny(), Spell::SendInterrupted(), and Movement::MoveSplineInit::SetFacing().

177  {
179  }
ObjectGuid const & GetGuidValue(uint16 index) const
Definition: Object.h:253
float Object::GetObjectScale ( ) const
inline

Definition at line 195 of file Object.h.

References OBJECT_FIELD_SCALE_X.

Referenced by Aura::HandleAuraModScale().

196  {
198  }
const float & GetFloatValue(uint16 index) const
Definition: Object.h:240
PackedGuid const& Object::GetPackGUID ( ) const
inline

Definition at line 172 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::HandleFlyModeCommand(), ChatHandler::HandleGonameCommand(), 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(), 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().

173  {
174  return m_PackGUID;
175  }
PackedGuid m_PackGUID
Definition: Object.h:439
uint8 Object::GetTypeId ( ) const
inline

Definition at line 204 of file Object.h.

Referenced by ThreatManager::_addThreat(), _BuildMovementUpdate(), _BuildValuesUpdate(), Map::_GetScriptCreature(), Map::_GetScriptCreatureSourceOrTarget(), Map::_GetScriptPlayer(), Map::_GetScriptPlayerSourceOrTarget(), Map::_GetScriptUnit(), Map::_GetScriptWorldObject(), Creature::_IsTargetAcceptable(), Unit::_IsValidAssistTarget(), Unit::_IsValidAttackTarget(), Aura::_RemoveAura(), Map::_ScriptProcessDoor(), Unit::_UpdateAutoRepeatSpell(), Unit::AddAura(), WorldObject::AddObjectToRemoveList(), Map::AddObjectToSwitchList(), Player::AddQuest(), 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::EffectDualWield(), 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::HandleQuestgiverAcceptQuestOpcode(), 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(), 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(), Spell::UpdatePointers(), Unit::UpdateSpeed(), Player::UpdateVisibilityOf(), Player::UpdateWeaponSkill(), GameObject::Use(), Oregon::DynamicObjectUpdater::VisitHelper(), Spell::WriteAmmoToPacket(), ~Object(), SpellEvent::~SpellEvent(), and WorldObject::~WorldObject().

205  {
206  return m_objectTypeId;
207  }
uint8 m_objectTypeId
Definition: Object.h:420
uint16 Object::GetUInt16Value ( uint16  index,
uint8  offset 
) const
inline

Definition at line 258 of file Object.h.

References ASSERT, and value.

Referenced by Player::SaveToDB().

259  {
260  ASSERT(index < m_valuesCount || PrintIndexError(index , false));
261  ASSERT(offset < 2);
262  return *(((uint16*)&m_uint32Values[ index ]) + offset);
263  }
uint32 * m_uint32Values
Definition: Object.h:426
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
ACE_UINT16 uint16
Definition: Define.h:72
const uint32& Object::GetUInt32Value ( uint16  index) const
inline

Definition at line 228 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(), 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().

229  {
230  ASSERT(index < m_valuesCount || PrintIndexError(index , false));
231  return m_uint32Values[ index ];
232  }
uint32 * m_uint32Values
Definition: Object.h:426
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
const uint64& Object::GetUInt64Value ( uint16  index) const
inline
uint16 Object::GetValuesCount ( ) const
inline

Definition at line 367 of file Object.h.

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

368  {
369  return m_valuesCount;
370  }
uint16 m_valuesCount
Definition: Object.h:432
bool Object::HasByteFlag ( uint16  index,
uint8  offset,
uint8  flag 
) const
inline

Definition at line 316 of file Object.h.

References ASSERT.

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

317  {
318  ASSERT(index < m_valuesCount || PrintIndexError(index , false));
319  ASSERT(offset < 4);
320  return (((uint8*)&m_uint32Values[index])[offset] & flag) != 0;
321  }
uint32 * m_uint32Values
Definition: Object.h:426
ACE_UINT8 uint8
Definition: Define.h:73
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
bool Object::HasFlag ( uint16  index,
uint32  flag 
) const
inline

Definition at line 299 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(), Creature::UpdateDamagePhysical(), and Player::UpdatePvPState().

300  {
301  ASSERT(index < m_valuesCount || PrintIndexError(index , false));
302  return (m_uint32Values[ index ] & flag) != 0;
303  }
uint32 * m_uint32Values
Definition: Object.h:426
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
bool Object::HasFlag64 ( uint16  index,
uint64  flag 
) const
inline

Definition at line 351 of file Object.h.

References ASSERT.

352  {
353  ASSERT(index < m_valuesCount || PrintIndexError(index , false));
354  return (GetUInt64Value(index) & flag) != 0;
355  }
const uint64 & GetUInt64Value(uint16 index) const
Definition: Object.h:234
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
virtual bool Object::hasInvolvedQuest ( uint32  ) const
inlinevirtual
virtual bool Object::hasQuest ( uint32  ) const
inlinevirtual

Reimplemented in GameObject, Creature, and Item.

Definition at line 372 of file Object.h.

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

373  {
374  return false;
375  }
const bool& Object::IsInWorld ( ) const
inline

Definition at line 129 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::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::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(), and ~Object().

130  {
131  return m_inWorld;
132  }
bool m_inWorld
Definition: Object.h:437
bool Object::LoadValues ( const char *  data)

Definition at line 704 of file Object.cpp.

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

Referenced by Player::LoadFromDB().

705 {
706  if (!m_uint32Values) _InitValues();
707 
708  Tokens tokens = StrSplit(data, " ");
709 
710  if (tokens.size() != m_valuesCount)
711  return false;
712 
713  Tokens::iterator iter;
714  int index;
715  for (iter = tokens.begin(), index = 0; index < m_valuesCount; ++iter, ++index)
716  m_uint32Values[index] = atol((*iter).c_str());
717 
718  return true;
719 }
uint32 * m_uint32Values
Definition: Object.h:426
std::vector< std::string > Tokens
Definition: Util.h:26
Tokens StrSplit(const std::string &src, const std::string &sep)
Definition: Util.cpp:97
uint16 m_valuesCount
Definition: Object.h:432
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 1079 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().

1080 {
1081  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);
1082 
1083  // assert must fail after function call
1084  return false;
1085 }
#define sLog
Log class singleton.
Definition: Log.h:187
uint16 m_objectType
Definition: Object.h:418
uint8 GetTypeId() const
Definition: Object.h:204
uint16 m_valuesCount
Definition: Object.h:432
void Object::RemoveByteFlag ( uint16  index,
uint8  offset,
uint8  newFlag 
)

Definition at line 1054 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().

1055 {
1056  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
1057 
1058  if (offset > 4)
1059  {
1060  sLog.outError("Object::RemoveByteFlag: wrong offset %u", offset);
1061  return;
1062  }
1063 
1064  if (uint8(m_uint32Values[ index ] >> (offset * 8)) & oldFlag)
1065  {
1066  m_uint32Values[ index ] &= ~uint32(uint32(oldFlag) << (offset * 8));
1067 
1068  if (m_inWorld)
1069  {
1070  if (!m_objectUpdated)
1071  {
1073  m_objectUpdated = true;
1074  }
1075  }
1076  }
1077 }
bool m_objectUpdated
Definition: Object.h:434
bool m_inWorld
Definition: Object.h:437
uint32 * m_uint32Values
Definition: Object.h:426
#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:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
ACE_UINT32 uint32
Definition: Define.h:71
void Object::RemoveFlag ( uint16  index,
uint32  oldFlag 
)

Definition at line 1006 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().

1007 {
1008  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
1010 
1011  uint32 oldval = m_uint32Values[ index ];
1012  uint32 newval = oldval & ~oldFlag;
1013 
1014  if (oldval != newval)
1015  {
1016  m_uint32Values[ index ] = newval;
1017 
1018  if (m_inWorld)
1019  {
1020  if (!m_objectUpdated)
1021  {
1023  m_objectUpdated = true;
1024  }
1025  }
1026  }
1027 }
bool m_objectUpdated
Definition: Object.h:434
bool m_inWorld
Definition: Object.h:437
uint32 * m_uint32Values
Definition: Object.h:426
void AddUpdateObject(Object *obj)
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
ACE_UINT32 uint32
Definition: Define.h:71
void Object::RemoveFlag64 ( uint16  index,
uint64  oldFlag 
)
inline

Definition at line 336 of file Object.h.

337  {
338  uint64 oldval = GetUInt64Value(index);
339  uint64 newval = oldval & ~oldFlag;
340  SetUInt64Value(index, newval);
341  }
const uint64 & GetUInt64Value(uint16 index) const
Definition: Object.h:234
void SetUInt64Value(uint16 index, const uint64 &value)
Definition: Object.cpp:798
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 145 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().

146  {
147  if (!m_inWorld)
148  return;
149 
150  m_inWorld = false;
151 
152  // if we remove from world then sending changes not required
153  ClearUpdateMask(true);
154  }
void ClearUpdateMask(bool remove)
Definition: Object.cpp:678
bool m_inWorld
Definition: Object.h:437
bool Object::RemoveUInt64Value ( uint16  index,
const uint64 value 
)

Definition at line 838 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().

839 {
840  ASSERT(index + 1 < m_valuesCount || PrintIndexError(index , true));
841  if (value && *((uint64*) & (m_uint32Values[index])) == value)
842  {
843  m_uint32Values[ index ] = 0;
844  m_uint32Values[ index + 1 ] = 0;
845 
846  if (m_inWorld)
847  {
848  if (!m_objectUpdated)
849  {
851  m_objectUpdated = true;
852  }
853  }
854  return true;
855  }
856  return false;
857 }
bool m_objectUpdated
Definition: Object.h:434
bool m_inWorld
Definition: Object.h:437
uint32 * m_uint32Values
Definition: Object.h:426
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:1079
ACE_UINT64 uint64
Definition: Define.h:70
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
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:1959
void Object::SetByteFlag ( uint16  index,
uint8  offset,
uint8  newFlag 
)

Definition at line 1029 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().

1030 {
1031  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
1032 
1033  if (offset > 4)
1034  {
1035  sLog.outError("Object::SetByteFlag: wrong offset %u", offset);
1036  return;
1037  }
1038 
1039  if (!(uint8(m_uint32Values[ index ] >> (offset * 8)) & newFlag))
1040  {
1041  m_uint32Values[ index ] |= uint32(uint32(newFlag) << (offset * 8));
1042 
1043  if (m_inWorld)
1044  {
1045  if (!m_objectUpdated)
1046  {
1048  m_objectUpdated = true;
1049  }
1050  }
1051  }
1052 }
bool m_objectUpdated
Definition: Object.h:434
bool m_inWorld
Definition: Object.h:437
uint32 * m_uint32Values
Definition: Object.h:426
#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:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
ACE_UINT32 uint32
Definition: Define.h:71
void Object::SetByteValue ( uint16  index,
uint8  offset,
uint8  value 
)

Definition at line 878 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().

879 {
880  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
881 
882  if (offset > 4)
883  {
884  sLog.outError("Object::SetByteValue: wrong offset %u", offset);
885  return;
886  }
887 
888  if (uint8(m_uint32Values[ index ] >> (offset * 8)) != value)
889  {
890  m_uint32Values[ index ] &= ~uint32(uint32(0xFF) << (offset * 8));
891  m_uint32Values[ index ] |= uint32(uint32(value) << (offset * 8));
892 
893  if (m_inWorld)
894  {
895  if (!m_objectUpdated)
896  {
898  m_objectUpdated = true;
899  }
900  }
901  }
902 }
bool m_objectUpdated
Definition: Object.h:434
bool m_inWorld
Definition: Object.h:437
uint32 * m_uint32Values
Definition: Object.h:426
#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:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
ACE_UINT32 uint32
Definition: Define.h:71
void Object::SetFlag ( uint16  index,
uint32  newFlag 
)

Definition at line 985 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().

986 {
987  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
988  uint32 oldval = m_uint32Values[ index ];
989  uint32 newval = oldval | newFlag;
990 
991  if (oldval != newval)
992  {
993  m_uint32Values[ index ] = newval;
994 
995  if (m_inWorld)
996  {
997  if (!m_objectUpdated)
998  {
1000  m_objectUpdated = true;
1001  }
1002  }
1003  }
1004 }
bool m_objectUpdated
Definition: Object.h:434
bool m_inWorld
Definition: Object.h:437
uint32 * m_uint32Values
Definition: Object.h:426
void AddUpdateObject(Object *obj)
bool PrintIndexError(uint32 index, bool set) const
Definition: Object.cpp:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
ACE_UINT32 uint32
Definition: Define.h:71
void Object::SetFlag64 ( uint16  index,
uint64  newFlag 
)
inline

Definition at line 329 of file Object.h.

330  {
331  uint64 oldval = GetUInt64Value(index);
332  uint64 newval = oldval | newFlag;
333  SetUInt64Value(index, newval);
334  }
const uint64 & GetUInt64Value(uint16 index) const
Definition: Object.h:234
void SetUInt64Value(uint16 index, const uint64 &value)
Definition: Object.cpp:798
ACE_UINT64 uint64
Definition: Define.h:70
void Object::SetFloatValue ( uint16  index,
float  value 
)

Definition at line 859 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().

860 {
861  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
862 
863  if (m_floatValues[ index ] != value)
864  {
865  m_floatValues[ index ] = value;
866 
867  if (m_inWorld)
868  {
869  if (!m_objectUpdated)
870  {
872  m_objectUpdated = true;
873  }
874  }
875  }
876 }
bool m_objectUpdated
Definition: Object.h:434
bool m_inWorld
Definition: Object.h:437
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:1079
float * m_floatValues
Definition: Object.h:427
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
void Object::SetInt16Value ( uint16  index,
uint8  offset,
int16  value 
)
inline

Definition at line 271 of file Object.h.

References ByteConverter::apply().

Referenced by Player::SetVisibleItemSlot().

272  {
273  SetUInt16Value(index, offset, (uint16)value);
274  }
void SetUInt16Value(uint16 index, uint8 offset, uint16 value)
Definition: Object.cpp:904
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 760 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().

761 {
762  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
763 
764  if (m_int32Values[ index ] != value)
765  {
766  m_int32Values[ index ] = value;
767 
768  if (m_inWorld)
769  {
770  if (!m_objectUpdated)
771  {
773  m_objectUpdated = true;
774  }
775  }
776  }
777 }
bool m_objectUpdated
Definition: Object.h:434
bool m_inWorld
Definition: Object.h:437
int32 * m_int32Values
Definition: Object.h:425
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:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
void Object::SetStatFloatValue ( uint16  index,
float  value 
)

Definition at line 930 of file Object.cpp.

References SetFloatValue().

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

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

Definition at line 938 of file Object.cpp.

References SetUInt32Value().

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

939 {
940  if (value < 0)
941  value = 0;
942 
943  SetUInt32Value(index, uint32(value));
944 }
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:779
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 904 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().

905 {
906  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
907 
908  if (offset > 2)
909  {
910  sLog.outError("Object::SetUInt16Value: wrong offset %u", offset);
911  return;
912  }
913 
914  if (uint16(m_uint32Values[ index ] >> (offset * 16)) != value)
915  {
916  m_uint32Values[ index ] &= ~uint32(uint32(0xFFFF) << (offset * 16));
917  m_uint32Values[ index ] |= uint32(uint32(value) << (offset * 16));
918 
919  if (m_inWorld)
920  {
921  if (!m_objectUpdated)
922  {
924  m_objectUpdated = true;
925  }
926  }
927  }
928 }
bool m_objectUpdated
Definition: Object.h:434
bool m_inWorld
Definition: Object.h:437
uint32 * m_uint32Values
Definition: Object.h:426
#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:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
ACE_UINT16 uint16
Definition: Define.h:72
ACE_UINT32 uint32
Definition: Define.h:71
void Object::SetUInt32Value ( uint16  index,
uint32  value 
)

Definition at line 779 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().

780 {
781  ASSERT(index < m_valuesCount || PrintIndexError(index, true));
782 
783  if (m_uint32Values[ index ] != value)
784  {
785  m_uint32Values[ index ] = value;
786 
787  if (m_inWorld)
788  {
789  if (!m_objectUpdated)
790  {
792  m_objectUpdated = true;
793  }
794  }
795  }
796 }
bool m_objectUpdated
Definition: Object.h:434
bool m_inWorld
Definition: Object.h:437
uint32 * m_uint32Values
Definition: Object.h:426
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:1079
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
void Object::SetUInt64Value ( uint16  index,
const uint64 value 
)

Definition at line 798 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().

799 {
800  ASSERT(index + 1 < m_valuesCount || PrintIndexError(index, true));
801  if (*((uint64*) & (m_uint32Values[ index ])) != value)
802  {
803  m_uint32Values[ index ] = *((uint32*)&value);
804  m_uint32Values[ index + 1 ] = *(((uint32*)&value) + 1);
805 
806  if (m_inWorld)
807  {
808  if (!m_objectUpdated)
809  {
811  m_objectUpdated = true;
812  }
813  }
814  }
815 }
bool m_objectUpdated
Definition: Object.h:434
bool m_inWorld
Definition: Object.h:437
uint32 * m_uint32Values
Definition: Object.h:426
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:1079
ACE_UINT64 uint64
Definition: Define.h:70
uint16 m_valuesCount
Definition: Object.h:432
#define ASSERT
Definition: Errors.h:33
ACE_UINT32 uint32
Definition: Define.h:71
Corpse* Object::ToCorpse ( )
inline

Definition at line 398 of file Object.h.

References TYPEID_CORPSE.

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

Definition at line 399 of file Object.h.

References TYPEID_CORPSE.

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

Definition at line 389 of file Object.h.

References TYPEID_UNIT.

Referenced by _BuildValuesUpdate(), Map::_GetScriptCreature(), Map::_GetScriptCreatureSourceOrTarget(), Unit::_IsValidAssistTarget(), 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::EffectDualWield(), 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::HandleQuestgiverAcceptQuestOpcode(), 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(), Unit::Update(), SimpleCharmedAI::UpdateAI(), Unit::UpdateCharmAI(), Player::UpdateCharmedAI(), HostileReference::updateOnlineStatus(), Unit::UpdateSpeed(), Player::UpdateVisibilityOf(), and CharmInfo::~CharmInfo().

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

Definition at line 390 of file Object.h.

References TYPEID_UNIT.

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

Definition at line 401 of file Object.h.

References TYPEID_DYNAMICOBJECT.

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

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

Definition at line 402 of file Object.h.

References TYPEID_DYNAMICOBJECT.

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

Definition at line 396 of file Object.h.

References TYPEID_GAMEOBJECT.

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

Definition at line 291 of file Object.h.

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

292  {
293  if (HasFlag(index, flag))
294  RemoveFlag(index, flag);
295  else
296  SetFlag(index, flag);
297  }
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:985
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1006
bool HasFlag(uint16 index, uint32 flag) const
Definition: Object.h:299
void Object::ToggleFlag ( uint16  index,
uint8  offset,
uint8  flag 
)
inline

Definition at line 308 of file Object.h.

309  {
310  if (HasByteFlag(index, offset, flag))
311  RemoveByteFlag(index, offset, flag);
312  else
313  SetByteFlag(index, offset, flag);
314  }
bool HasByteFlag(uint16 index, uint8 offset, uint8 flag) const
Definition: Object.h:316
void SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
Definition: Object.cpp:1029
void RemoveByteFlag(uint16 index, uint8 offset, uint8 newFlag)
Definition: Object.cpp:1054
void Object::ToggleFlag64 ( uint16  index,
uint64  flag 
)
inline

Definition at line 343 of file Object.h.

344  {
345  if (HasFlag64(index, flag))
346  RemoveFlag64(index, flag);
347  else
348  SetFlag64(index, flag);
349  }
void SetFlag64(uint16 index, uint64 newFlag)
Definition: Object.h:329
bool HasFlag64(uint16 index, uint64 flag) const
Definition: Object.h:351
void RemoveFlag64(uint16 index, uint64 oldFlag)
Definition: Object.h:336
Player* Object::ToPlayer ( )
inline

Definition at line 386 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::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(), Unit::HandleProcTriggerSpell(), WorldSession::HandleQuestgiverAcceptQuestOpcode(), Aura::HandleSchoolAbsorb(), ChatHandler::HandleSendOpcodeCommand(), Aura::HandleShapeshiftBoosts(), Aura::HandleShieldBlockValue(), Aura::HandleWaterBreathing(), Unit::haveOffhandWeapon(), 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::MessageDistDeliverer::Visit(), and Spell::WriteAmmoToPacket().

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

Definition at line 387 of file Object.h.

References TYPEID_PLAYER.

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

Definition at line 393 of file Object.h.

References TYPEMASK_UNIT.

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

Member Data Documentation

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

Definition at line 427 of file Object.h.

Referenced by _BuildValuesUpdate(), and SetFloatValue().

int32* Object::m_int32Values

Definition at line 425 of file Object.h.

Referenced by SetInt32Value().

PackedGuid Object::m_PackGUID
private

Definition at line 439 of file Object.h.

Referenced by _Create().

uint32* Object::m_uint32Values_mirror
protected

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