17 #ifndef CREATUREAIIMPL_H
18 #define CREATUREAIIMPL_H
27 #include <type_traits>
29 template<
typename First,
typename Second,
typename... Rest>
30 static inline First
const&
RAND(First
const& first, Second
const& second, Rest
const&... rest)
32 std::reference_wrapper<typename std::add_const<First>::type>
const pack[] = { first, second, rest... };
33 return pack[
urand(0,
sizeof...(rest) + 1)].get();
53 #define AI_DEFAULT_COOLDOWN 5000
float maxRange
Definition: CreatureAIImpl.h:63
uint32 realCooldown
Definition: CreatureAIImpl.h:62
AICondition
Definition: CreatureAIImpl.h:46
Definition: CreatureAIImpl.h:43
Definition: CreatureAIImpl.h:40
AICondition condition
Definition: CreatureAIImpl.h:60
Definition: CreatureAIImpl.h:48
Definition: CreatureAIImpl.h:42
static First const & RAND(First const &first, Second const &second, Rest const &...rest)
Definition: CreatureAIImpl.h:30
#define AI_DEFAULT_COOLDOWN
Definition: CreatureAIImpl.h:53
AISpellInfoType * GetAISpellInfo(uint32 i)
Definition: CreatureAI.cpp:40
Definition: CreatureAIImpl.h:41
Definition: CreatureAIImpl.h:50
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
AISpellInfoType()
Definition: CreatureAIImpl.h:57
uint32_t uint32
Definition: Define.h:150
Definition: CreatureAIImpl.h:38
AITarget target
Definition: CreatureAIImpl.h:59
uint32 cooldown
Definition: CreatureAIImpl.h:61
Definition: CreatureAIImpl.h:49
Definition: CreatureAIImpl.h:39
AITarget
Definition: CreatureAIImpl.h:36
Definition: CreatureAIImpl.h:55