AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
UnitAI.h File Reference
#include "Containers.h"
#include "Define.h"
#include "Unit.h"
#include <list>

Go to the source code of this file.

Classes

struct  DefaultTargetSelector
 
struct  SpellTargetSelector
 
struct  NonTankTargetSelector
 
struct  PowerUsersSelector
 
struct  FarthestTargetSelector
 
class  UnitAI
 
class  PlayerAI
 
class  SimpleCharmedAI
 

Macros

#define CAST_AI(a, b)   (dynamic_cast<a*>(b))
 
#define ENSURE_AI(a, b)   (EnsureAI<a>(b))
 

Enumerations

enum class  SelectTargetMethod {
  Random ,
  MaxThreat ,
  MinThreat ,
  MaxDistance ,
  MinDistance
}
 

Functions

template<class T , class U >
T * EnsureAI (U *ai)
 

Macro Definition Documentation

◆ CAST_AI

#define CAST_AI (   a,
 
)    (dynamic_cast<a*>(b))

◆ ENSURE_AI

#define ENSURE_AI (   a,
 
)    (EnsureAI<a>(b))

Enumeration Type Documentation

◆ SelectTargetMethod

enum class SelectTargetMethod
strong
Enumerator
Random 
MaxThreat 
MinThreat 
MaxDistance 
MinDistance 
44{
45 Random, // just pick a random target
46 MaxThreat, // prefer targets higher in the threat list
47 MinThreat, // prefer targets lower in the threat list
48 MaxDistance, // prefer targets further from us
49 MinDistance // prefer targets closer to us
50};

Function Documentation

◆ EnsureAI()

template<class T , class U >
T * EnsureAI ( U *  ai)
31{
32 T* cast_ai = dynamic_cast<T*>(ai);
33 ASSERT(cast_ai);
34 return cast_ai;
35}
#define ASSERT
Definition: Errors.h:68

References ASSERT.