TrinityCore
ObjectDefines.h File Reference
#include "Define.h"
+ Include dependency graph for ObjectDefines.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CONTACT_DISTANCE   0.5f
 
#define INTERACTION_DISTANCE   5.0f
 
#define ATTACK_DISTANCE   5.0f
 
#define INSPECT_DISTANCE   28.0f
 
#define TRADE_DISTANCE   11.11f
 
#define MAX_VISIBILITY_DISTANCE   SIZE_OF_GRIDS
 
#define SIGHT_RANGE_UNIT   50.0f
 
#define VISIBILITY_DISTANCE_GIGANTIC   400.0f
 
#define VISIBILITY_DISTANCE_LARGE   200.0f
 
#define VISIBILITY_DISTANCE_NORMAL   100.0f
 
#define VISIBILITY_DISTANCE_SMALL   50.0f
 
#define VISIBILITY_DISTANCE_TINY   25.0f
 
#define DEFAULT_VISIBILITY_DISTANCE   VISIBILITY_DISTANCE_NORMAL
 
#define DEFAULT_VISIBILITY_INSTANCE   170.0f
 
#define DEFAULT_VISIBILITY_BGARENAS   533.0f
 
#define DEFAULT_PLAYER_BOUNDING_RADIUS   0.388999998569489f
 
#define DEFAULT_PLAYER_COMBAT_REACH   1.5f
 
#define DEFAULT_PLAYER_DISPLAY_SCALE   1.0f
 
#define DEFAULT_PLAYER_HOVER_HEIGHT   1.0f
 
#define MIN_MELEE_REACH   2.0f
 
#define NOMINAL_MELEE_RANGE   5.0f
 
#define MELEE_RANGE   (NOMINAL_MELEE_RANGE - MIN_MELEE_REACH * 2)
 
#define EXTRA_CELL_SEARCH_RADIUS   40.0f
 

Enumerations

enum class  VisibilityDistanceType : uint8 {
  Normal = 0 , Tiny = 1 , Small = 2 , Large = 3 ,
  Gigantic = 4 , Infinite = 5 , Max
}
 
enum  TempSummonType : uint8 {
  TEMPSUMMON_TIMED_OR_DEAD_DESPAWN = 1 , TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN = 2 , TEMPSUMMON_TIMED_DESPAWN = 3 , TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT = 4 ,
  TEMPSUMMON_CORPSE_DESPAWN = 5 , TEMPSUMMON_CORPSE_TIMED_DESPAWN = 6 , TEMPSUMMON_DEAD_DESPAWN = 7 , TEMPSUMMON_MANUAL_DESPAWN = 8
}
 
enum  NotifyFlags { NOTIFY_NONE = 0x00 , NOTIFY_AI_RELOCATION = 0x01 , NOTIFY_VISIBILITY_CHANGED = 0x02 , NOTIFY_ALL = 0xFF }
 
enum  GOSummonType { GO_SUMMON_TIMED_OR_CORPSE_DESPAWN = 0 , GO_SUMMON_TIMED_DESPAWN = 1 }
 

Functions

uint64 MAKE_PAIR64 (uint32 l, uint32 h)
 
uint32 PAIR64_HIPART (uint64 x)
 
uint32 PAIR64_LOPART (uint64 x)
 
uint16 MAKE_PAIR16 (uint8 l, uint8 h)
 
uint32 MAKE_PAIR32 (uint16 l, uint16 h)
 
uint16 PAIR32_HIPART (uint32 x)
 
uint16 PAIR32_LOPART (uint32 x)
 

Macro Definition Documentation

◆ ATTACK_DISTANCE

#define ATTACK_DISTANCE   5.0f

Definition at line 25 of file ObjectDefines.h.

◆ CONTACT_DISTANCE

#define CONTACT_DISTANCE   0.5f

Definition at line 23 of file ObjectDefines.h.

◆ DEFAULT_PLAYER_BOUNDING_RADIUS

#define DEFAULT_PLAYER_BOUNDING_RADIUS   0.388999998569489f

Definition at line 39 of file ObjectDefines.h.

◆ DEFAULT_PLAYER_COMBAT_REACH

#define DEFAULT_PLAYER_COMBAT_REACH   1.5f

Definition at line 40 of file ObjectDefines.h.

◆ DEFAULT_PLAYER_DISPLAY_SCALE

#define DEFAULT_PLAYER_DISPLAY_SCALE   1.0f

Definition at line 41 of file ObjectDefines.h.

◆ DEFAULT_PLAYER_HOVER_HEIGHT

#define DEFAULT_PLAYER_HOVER_HEIGHT   1.0f

Definition at line 42 of file ObjectDefines.h.

◆ DEFAULT_VISIBILITY_BGARENAS

#define DEFAULT_VISIBILITY_BGARENAS   533.0f

Definition at line 37 of file ObjectDefines.h.

◆ DEFAULT_VISIBILITY_DISTANCE

#define DEFAULT_VISIBILITY_DISTANCE   VISIBILITY_DISTANCE_NORMAL

Definition at line 35 of file ObjectDefines.h.

◆ DEFAULT_VISIBILITY_INSTANCE

#define DEFAULT_VISIBILITY_INSTANCE   170.0f

Definition at line 36 of file ObjectDefines.h.

◆ EXTRA_CELL_SEARCH_RADIUS

#define EXTRA_CELL_SEARCH_RADIUS   40.0f

Definition at line 47 of file ObjectDefines.h.

◆ INSPECT_DISTANCE

#define INSPECT_DISTANCE   28.0f

Definition at line 26 of file ObjectDefines.h.

◆ INTERACTION_DISTANCE

#define INTERACTION_DISTANCE   5.0f

Definition at line 24 of file ObjectDefines.h.

◆ MAX_VISIBILITY_DISTANCE

#define MAX_VISIBILITY_DISTANCE   SIZE_OF_GRIDS

Definition at line 28 of file ObjectDefines.h.

◆ MELEE_RANGE

#define MELEE_RANGE   (NOMINAL_MELEE_RANGE - MIN_MELEE_REACH * 2)

Definition at line 45 of file ObjectDefines.h.

◆ MIN_MELEE_REACH

#define MIN_MELEE_REACH   2.0f

Definition at line 43 of file ObjectDefines.h.

◆ NOMINAL_MELEE_RANGE

#define NOMINAL_MELEE_RANGE   5.0f

Definition at line 44 of file ObjectDefines.h.

◆ SIGHT_RANGE_UNIT

#define SIGHT_RANGE_UNIT   50.0f

Definition at line 29 of file ObjectDefines.h.

◆ TRADE_DISTANCE

#define TRADE_DISTANCE   11.11f

Definition at line 27 of file ObjectDefines.h.

◆ VISIBILITY_DISTANCE_GIGANTIC

#define VISIBILITY_DISTANCE_GIGANTIC   400.0f

Definition at line 30 of file ObjectDefines.h.

◆ VISIBILITY_DISTANCE_LARGE

#define VISIBILITY_DISTANCE_LARGE   200.0f

Definition at line 31 of file ObjectDefines.h.

◆ VISIBILITY_DISTANCE_NORMAL

#define VISIBILITY_DISTANCE_NORMAL   100.0f

Definition at line 32 of file ObjectDefines.h.

◆ VISIBILITY_DISTANCE_SMALL

#define VISIBILITY_DISTANCE_SMALL   50.0f

Definition at line 33 of file ObjectDefines.h.

◆ VISIBILITY_DISTANCE_TINY

#define VISIBILITY_DISTANCE_TINY   25.0f

Definition at line 34 of file ObjectDefines.h.

Enumeration Type Documentation

◆ GOSummonType

Enumerator
GO_SUMMON_TIMED_OR_CORPSE_DESPAWN 
GO_SUMMON_TIMED_DESPAWN 

Definition at line 81 of file ObjectDefines.h.

82{
83 GO_SUMMON_TIMED_OR_CORPSE_DESPAWN = 0, // despawns after a specified time OR when the summoner dies
84 GO_SUMMON_TIMED_DESPAWN = 1 // despawns after a specified time
85};
@ GO_SUMMON_TIMED_DESPAWN
Definition: ObjectDefines.h:84
@ GO_SUMMON_TIMED_OR_CORPSE_DESPAWN
Definition: ObjectDefines.h:83

◆ NotifyFlags

Enumerator
NOTIFY_NONE 
NOTIFY_AI_RELOCATION 
NOTIFY_VISIBILITY_CHANGED 
NOTIFY_ALL 

Definition at line 73 of file ObjectDefines.h.

74{
75 NOTIFY_NONE = 0x00,
78 NOTIFY_ALL = 0xFF
79};
@ NOTIFY_ALL
Definition: ObjectDefines.h:78
@ NOTIFY_NONE
Definition: ObjectDefines.h:75
@ NOTIFY_AI_RELOCATION
Definition: ObjectDefines.h:76
@ NOTIFY_VISIBILITY_CHANGED
Definition: ObjectDefines.h:77

◆ TempSummonType

Enumerator
TEMPSUMMON_TIMED_OR_DEAD_DESPAWN 
TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN 
TEMPSUMMON_TIMED_DESPAWN 
TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT 
TEMPSUMMON_CORPSE_DESPAWN 
TEMPSUMMON_CORPSE_TIMED_DESPAWN 
TEMPSUMMON_DEAD_DESPAWN 
TEMPSUMMON_MANUAL_DESPAWN 

Definition at line 61 of file ObjectDefines.h.

62{
63 TEMPSUMMON_TIMED_OR_DEAD_DESPAWN = 1, // despawns after a specified time OR when the creature disappears
64 TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN = 2, // despawns after a specified time OR when the creature dies
65 TEMPSUMMON_TIMED_DESPAWN = 3, // despawns after a specified time
66 TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT = 4, // despawns after a specified time after the creature is out of combat
67 TEMPSUMMON_CORPSE_DESPAWN = 5, // despawns instantly after death
68 TEMPSUMMON_CORPSE_TIMED_DESPAWN = 6, // despawns after a specified time after death
69 TEMPSUMMON_DEAD_DESPAWN = 7, // despawns when the creature disappears
70 TEMPSUMMON_MANUAL_DESPAWN = 8 // despawns when UnSummon() is called
71};
@ TEMPSUMMON_DEAD_DESPAWN
Definition: ObjectDefines.h:69
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: ObjectDefines.h:70
@ TEMPSUMMON_TIMED_DESPAWN
Definition: ObjectDefines.h:65
@ TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT
Definition: ObjectDefines.h:66
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition: ObjectDefines.h:63
@ TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN
Definition: ObjectDefines.h:64
@ TEMPSUMMON_CORPSE_DESPAWN
Definition: ObjectDefines.h:67
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition: ObjectDefines.h:68

◆ VisibilityDistanceType

enum class VisibilityDistanceType : uint8
strong
Enumerator
Normal 
Tiny 
Small 
Large 
Gigantic 
Infinite 
Max 

Definition at line 49 of file ObjectDefines.h.

Function Documentation

◆ MAKE_PAIR16()

uint16 MAKE_PAIR16 ( uint8  l,
uint8  h 
)
inline

Definition at line 102 of file ObjectDefines.h.

103{
104 return uint16(l | (uint16(h) << 8));
105}
uint16_t uint16
Definition: Define.h:144
+ Here is the caller graph for this function:

◆ MAKE_PAIR32()

uint32 MAKE_PAIR32 ( uint16  l,
uint16  h 
)
inline

Definition at line 107 of file ObjectDefines.h.

108{
109 return uint32(l | (uint32(h) << 16));
110}
uint32_t uint32
Definition: Define.h:143

◆ MAKE_PAIR64()

uint64 MAKE_PAIR64 ( uint32  l,
uint32  h 
)
inline

Definition at line 87 of file ObjectDefines.h.

88{
89 return uint64(l | (uint64(h) << 32));
90}
uint64_t uint64
Definition: Define.h:142
+ Here is the caller graph for this function:

◆ PAIR32_HIPART()

uint16 PAIR32_HIPART ( uint32  x)
inline

Definition at line 112 of file ObjectDefines.h.

113{
114 return (uint16)((x >> 16) & 0x0000FFFF);
115}

◆ PAIR32_LOPART()

uint16 PAIR32_LOPART ( uint32  x)
inline

Definition at line 117 of file ObjectDefines.h.

118{
119 return (uint16)(x & 0x0000FFFF);
120}

◆ PAIR64_HIPART()

uint32 PAIR64_HIPART ( uint64  x)
inline

Definition at line 92 of file ObjectDefines.h.

93{
94 return (uint32)((x >> 32) & UI64LIT(0x00000000FFFFFFFF));
95}
#define UI64LIT(N)
Definition: Define.h:128

◆ PAIR64_LOPART()

uint32 PAIR64_LOPART ( uint64  x)
inline

Definition at line 97 of file ObjectDefines.h.

98{
99 return (uint32)(x & UI64LIT(0x00000000FFFFFFFF));
100}