TrinityCore
CreatureAIImpl.h File Reference
#include "Random.h"
#include <type_traits>
#include <functional>
+ Include dependency graph for CreatureAIImpl.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  AISpellInfoType
 

Macros

#define AI_DEFAULT_COOLDOWN   5000
 

Enumerations

enum  AITarget {
  AITARGET_SELF , AITARGET_VICTIM , AITARGET_ENEMY , AITARGET_ALLY ,
  AITARGET_BUFF , AITARGET_DEBUFF
}
 
enum  AICondition { AICOND_AGGRO , AICOND_COMBAT , AICOND_DIE }
 
enum  SelectTargetType : uint8 {
  SELECT_TARGET_DONTCARE = 0 , SELECT_TARGET_SELF , SELECT_TARGET_SINGLE_ENEMY , SELECT_TARGET_AOE_ENEMY ,
  SELECT_TARGET_ANY_ENEMY , SELECT_TARGET_SINGLE_FRIEND , SELECT_TARGET_AOE_FRIEND , SELECT_TARGET_ANY_FRIEND
}
 
enum  SelectEffect : uint8 { SELECT_EFFECT_DONTCARE = 0 , SELECT_EFFECT_DAMAGE , SELECT_EFFECT_HEALING , SELECT_EFFECT_AURA }
 

Functions

template<typename First , typename Second , typename... Rest>
First const & RAND (First const &first, Second const &second, Rest const &... rest)
 
AISpellInfoTypeGetAISpellInfo (uint32 spellId, Difficulty difficulty)
 
TC_GAME_API bool InstanceHasScript (WorldObject const *obj, char const *scriptName)
 
template<class AI , class T >
AI * GetInstanceAI (T *obj, char const *scriptName)
 

Macro Definition Documentation

◆ AI_DEFAULT_COOLDOWN

#define AI_DEFAULT_COOLDOWN   5000

Definition at line 51 of file CreatureAIImpl.h.

Enumeration Type Documentation

◆ AICondition

Enumerator
AICOND_AGGRO 
AICOND_COMBAT 
AICOND_DIE 

Definition at line 44 of file CreatureAIImpl.h.

◆ AITarget

enum AITarget
Enumerator
AITARGET_SELF 
AITARGET_VICTIM 
AITARGET_ENEMY 
AITARGET_ALLY 
AITARGET_BUFF 
AITARGET_DEBUFF 

Definition at line 34 of file CreatureAIImpl.h.

◆ SelectEffect

Enumerator
SELECT_EFFECT_DONTCARE 
SELECT_EFFECT_DAMAGE 
SELECT_EFFECT_HEALING 
SELECT_EFFECT_AURA 

Definition at line 67 of file CreatureAIImpl.h.

◆ SelectTargetType

Enumerator
SELECT_TARGET_DONTCARE 
SELECT_TARGET_SELF 
SELECT_TARGET_SINGLE_ENEMY 
SELECT_TARGET_AOE_ENEMY 
SELECT_TARGET_ANY_ENEMY 
SELECT_TARGET_SINGLE_FRIEND 
SELECT_TARGET_AOE_FRIEND 
SELECT_TARGET_ANY_FRIEND 

Definition at line 54 of file CreatureAIImpl.h.

Function Documentation

◆ GetAISpellInfo()

AISpellInfoType * GetAISpellInfo ( uint32  spellId,
Difficulty  difficulty 
)

Definition at line 40 of file CreatureAI.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetInstanceAI()

template<class AI , class T >
AI * GetInstanceAI ( T *  obj,
char const *  scriptName 
)

Definition at line 94 of file CreatureAIImpl.h.

+ Here is the call graph for this function:

◆ InstanceHasScript()

TC_GAME_API bool InstanceHasScript ( WorldObject const *  obj,
char const *  scriptName 
)

Definition at line 1006 of file InstanceScript.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RAND()

template<typename First , typename Second , typename... Rest>
First const & RAND ( First const &  first,
Second const &  second,
Rest const &...  rest 
)
inline

Definition at line 28 of file CreatureAIImpl.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: