aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/CreatureAIImpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/AI/CreatureAIImpl.h')
-rw-r--r--src/server/game/AI/CreatureAIImpl.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/server/game/AI/CreatureAIImpl.h b/src/server/game/AI/CreatureAIImpl.h
index a14446bf457..cbc7c5912a0 100644
--- a/src/server/game/AI/CreatureAIImpl.h
+++ b/src/server/game/AI/CreatureAIImpl.h
@@ -22,6 +22,7 @@
#include <functional>
class WorldObject;
+enum Difficulty : uint8;
template<typename First, typename Second, typename... Rest>
inline First const& RAND(First const& first, Second const& second, Rest const&... rest)
@@ -49,6 +50,31 @@ enum AICondition
#define AI_DEFAULT_COOLDOWN 5000
+//Spell targets used by SelectSpell
+enum SelectTargetType : uint8
+{
+ SELECT_TARGET_DONTCARE = 0, //All target types allowed
+
+ SELECT_TARGET_SELF, //Only Self casting
+
+ SELECT_TARGET_SINGLE_ENEMY, //Only Single Enemy
+ SELECT_TARGET_AOE_ENEMY, //Only AoE Enemy
+ SELECT_TARGET_ANY_ENEMY, //AoE or Single Enemy
+
+ SELECT_TARGET_SINGLE_FRIEND, //Only Single Friend
+ SELECT_TARGET_AOE_FRIEND, //Only AoE Friend
+ SELECT_TARGET_ANY_FRIEND //AoE or Single Friend
+};
+
+//Spell Effects used by SelectSpell
+enum SelectEffect : uint8
+{
+ SELECT_EFFECT_DONTCARE = 0, //All spell effects allowed
+ SELECT_EFFECT_DAMAGE, //Spell does damage
+ SELECT_EFFECT_HEALING, //Spell does healing
+ SELECT_EFFECT_AURA //Spell applies an aura
+};
+
struct AISpellInfoType
{
AISpellInfoType() : target(AITARGET_SELF), condition(AICOND_COMBAT)
@@ -58,9 +84,12 @@ struct AISpellInfoType
uint32 cooldown;
uint32 realCooldown;
float maxRange;
+
+ uint8 Targets; // set of enum SelectTarget
+ uint8 Effects; // set of enum SelectEffect
};
-AISpellInfoType* GetAISpellInfo(uint32 i);
+AISpellInfoType* GetAISpellInfo(uint32 spellId, Difficulty difficulty);
TC_GAME_API bool InstanceHasScript(WorldObject const* obj, char const* scriptName);