17#ifndef CREATUREAIIMPL_H
18#define CREATUREAIIMPL_H
27template<
typename First,
typename Second,
typename... Rest>
30 std::reference_wrapper<typename std::add_const<First>::type>
const pack[] = { first, second, rest... };
31 return pack[
urand(0,
sizeof...(rest) + 1)].get();
51#define AI_DEFAULT_COOLDOWN 5000
93template <
class AI,
class T>
TC_GAME_API bool InstanceHasScript(WorldObject const *obj, char const *scriptName)
#define AI_DEFAULT_COOLDOWN
First const & RAND(First const &first, Second const &second, Rest const &... rest)
AI * GetInstanceAI(T *obj, char const *scriptName)
@ SELECT_TARGET_ANY_FRIEND
@ SELECT_TARGET_AOE_FRIEND
@ SELECT_TARGET_ANY_ENEMY
@ SELECT_TARGET_SINGLE_FRIEND
@ SELECT_TARGET_SINGLE_ENEMY
@ SELECT_TARGET_AOE_ENEMY
AISpellInfoType * GetAISpellInfo(uint32 spellId, Difficulty difficulty)
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
uint32 urand(uint32 min, uint32 max)
Milliseconds realCooldown