TrinityCore
Loading...
Searching...
No Matches
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 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 {
  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

◆ CONTACT_DISTANCE

#define CONTACT_DISTANCE   0.5f

◆ DEFAULT_PLAYER_BOUNDING_RADIUS

#define DEFAULT_PLAYER_BOUNDING_RADIUS   0.388999998569489f

◆ DEFAULT_PLAYER_COMBAT_REACH

#define DEFAULT_PLAYER_COMBAT_REACH   1.5f

◆ DEFAULT_VISIBILITY_BGARENAS

#define DEFAULT_VISIBILITY_BGARENAS   533.0f

◆ DEFAULT_VISIBILITY_DISTANCE

#define DEFAULT_VISIBILITY_DISTANCE   VISIBILITY_DISTANCE_NORMAL

◆ DEFAULT_VISIBILITY_INSTANCE

#define DEFAULT_VISIBILITY_INSTANCE   170.0f

◆ EXTRA_CELL_SEARCH_RADIUS

#define EXTRA_CELL_SEARCH_RADIUS   40.0f

◆ INSPECT_DISTANCE

#define INSPECT_DISTANCE   28.0f

◆ INTERACTION_DISTANCE

#define INTERACTION_DISTANCE   5.0f

◆ MAX_VISIBILITY_DISTANCE

#define MAX_VISIBILITY_DISTANCE   SIZE_OF_GRIDS

◆ MELEE_RANGE

#define MELEE_RANGE   (NOMINAL_MELEE_RANGE - MIN_MELEE_REACH * 2)

◆ MIN_MELEE_REACH

#define MIN_MELEE_REACH   2.0f

◆ NOMINAL_MELEE_RANGE

#define NOMINAL_MELEE_RANGE   5.0f

◆ SIGHT_RANGE_UNIT

#define SIGHT_RANGE_UNIT   50.0f

◆ TRADE_DISTANCE

#define TRADE_DISTANCE   11.11f

◆ VISIBILITY_DISTANCE_GIGANTIC

#define VISIBILITY_DISTANCE_GIGANTIC   400.0f

◆ VISIBILITY_DISTANCE_LARGE

#define VISIBILITY_DISTANCE_LARGE   200.0f

◆ VISIBILITY_DISTANCE_NORMAL

#define VISIBILITY_DISTANCE_NORMAL   100.0f

◆ VISIBILITY_DISTANCE_SMALL

#define VISIBILITY_DISTANCE_SMALL   50.0f

◆ VISIBILITY_DISTANCE_TINY

#define VISIBILITY_DISTANCE_TINY   25.0f

Enumeration Type Documentation

◆ GOSummonType

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

◆ NotifyFlags

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

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

◆ VisibilityDistanceType

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

Function Documentation

◆ MAKE_PAIR16()

uint16 MAKE_PAIR16 ( uint8  l,
uint8  h 
)
inline
101{
102 return uint16(l | (uint16(h) << 8));
103}
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
106{
107 return uint32(l | (uint32(h) << 16));
108}
uint32_t uint32
Definition: Define.h:143

◆ MAKE_PAIR64()

uint64 MAKE_PAIR64 ( uint32  l,
uint32  h 
)
inline
86{
87 return uint64(l | (uint64(h) << 32));
88}
uint64_t uint64
Definition: Define.h:142
+ Here is the caller graph for this function:

◆ PAIR32_HIPART()

uint16 PAIR32_HIPART ( uint32  x)
inline
111{
112 return (uint16)((x >> 16) & 0x0000FFFF);
113}

◆ PAIR32_LOPART()

uint16 PAIR32_LOPART ( uint32  x)
inline
116{
117 return (uint16)(x & 0x0000FFFF);
118}

◆ PAIR64_HIPART()

uint32 PAIR64_HIPART ( uint64  x)
inline
91{
92 return (uint32)((x >> 32) & UI64LIT(0x00000000FFFFFFFF));
93}
#define UI64LIT(N)
Definition: Define.h:128

◆ PAIR64_LOPART()

uint32 PAIR64_LOPART ( uint64  x)
inline
96{
97 return (uint32)(x & UI64LIT(0x00000000FFFFFFFF));
98}