1212#include " AI/BaseAI/CreatureAI.h"
1313#endif
1414
15- #if defined ELUNA_TRINITY
15+ #if defined ELUNA_TRINITY || defined ELUNA_AZEROTHCORE
1616struct ScriptedAI ;
1717typedef ScriptedAI NativeScriptedAI;
1818#elif defined ELUNA_CMANGOS || ELUNA_MANGOS
@@ -29,7 +29,7 @@ struct ElunaCreatureAI : NativeScriptedAI
2929 bool justSpawned;
3030 // used to delay movementinform hook (WP hook)
3131 std::vector< std::pair<uint32, uint32> > movepoints;
32- #if !defined ELUNA_TRINITY
32+ #if !defined ELUNA_TRINITY && !defined ELUNA_AZEROTHCORE
3333#define me m_creature
3434#endif
3535 ElunaCreatureAI (Creature* creature) : NativeScriptedAI(creature), justSpawned(true )
@@ -73,7 +73,7 @@ struct ElunaCreatureAI : NativeScriptedAI
7373 }
7474 }
7575
76- #if defined ELUNA_TRINITY
76+ #if defined ELUNA_TRINITY || defined ELUNA_AZEROTHCORE
7777 // Called for reaction when initially engaged - this will always happen _after_ JustEnteredCombat
7878 // Called at creature aggro either by MoveInLOS or Attack Start
7979 void JustEngagedWith (Unit* target) override
@@ -94,6 +94,8 @@ struct ElunaCreatureAI : NativeScriptedAI
9494 // Called at any Damage from any attacker (before damage apply)
9595#if defined ELUNA_TRINITY || defined ELUNA_CMANGOS
9696 void DamageTaken (Unit* attacker, uint32& damage, DamageEffectType damageType, SpellInfo const * spellInfo) override
97+ #elif defined ELUNA_AZEROTHCORE
98+ void DamageTaken (Unit* attacker, uint32& damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
9799#else
98100 void DamageTaken (Unit* attacker, uint32& damage) override
99101#endif
@@ -102,6 +104,8 @@ struct ElunaCreatureAI : NativeScriptedAI
102104 {
103105#if defined ELUNA_TRINITY || defined ELUNA_CMANGOS
104106 NativeScriptedAI::DamageTaken (attacker, damage, damageType, spellInfo);
107+ #elif defined ELUNA_AZEROTHCORE
108+ NativeScriptedAI::DamageTaken (attacker, damage, damagetype, damageSchoolMask);
105109#else
106110 NativeScriptedAI::DamageTaken (attacker, damage);
107111#endif
@@ -151,7 +155,7 @@ struct ElunaCreatureAI : NativeScriptedAI
151155 NativeScriptedAI::AttackStart (target);
152156 }
153157
154- #if defined ELUNA_TRINITY
158+ #if defined ELUNA_TRINITY || defined ELUNA_AZEROTHCORE
155159 // Called for reaction at stopping attack at no attackers or targets
156160 void EnterEvadeMode (EvadeReason /* why*/ ) override
157161#else
@@ -199,7 +203,7 @@ struct ElunaCreatureAI : NativeScriptedAI
199203 NativeScriptedAI::CorpseRemoved (respawnDelay);
200204 }
201205
202- #if !defined ELUNA_TRINITY && !defined ELUNA_VMANGOS
206+ #if !defined ELUNA_TRINITY && !defined ELUNA_VMANGOS && !defined ELUNA_AZEROTHCORE
203207 // Enables use of MoveInLineOfSight
204208 bool IsVisible (Unit* who) const override
205209 {
@@ -237,7 +241,7 @@ struct ElunaCreatureAI : NativeScriptedAI
237241 NativeScriptedAI::SpellHitTarget (target, spell);
238242 }
239243
240- #if defined ELUNA_TRINITY
244+ #if defined ELUNA_TRINITY || defined ELUNA_AZEROTHCORE
241245 // Called when the creature is summoned successfully by other creature
242246 void IsSummonedBy (WorldObject* summoner) override
243247 {
@@ -266,7 +270,7 @@ struct ElunaCreatureAI : NativeScriptedAI
266270 }
267271#endif
268272
269- #if !defined ELUNA_TRINITY
273+ #if !defined ELUNA_TRINITY && !defined ELUNA_AZEROTHCORE
270274#undef me
271275#endif
272276};
0 commit comments