diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-06-12 01:29:18 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2020-06-12 01:29:18 +0200 |
commit | c7306439e7004288fb85890d6a5f730cf1761d71 (patch) | |
tree | a1b6fd4af385923f321ff24ef4d66d09374397b9 /src/server/game/AI/CreatureAIImpl.h | |
parent | 1cdd1d0249ad49c860e117e1e39d451e1a3fbe43 (diff) |
Core/Spells: Implement using different difficulty data from all spell related db2s, not just SpellEffect and SpellPower
Diffstat (limited to 'src/server/game/AI/CreatureAIImpl.h')
-rw-r--r-- | src/server/game/AI/CreatureAIImpl.h | 31 |
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); |