mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-02 02:23:49 +00:00
feat(Core/Instance): Add instance validation for creature scripts (#4596)
This commit is contained in:
@@ -327,7 +327,7 @@ public:
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetInstanceAI<boss_alarAI>(creature);
|
||||
return GetTheEyeAI<boss_alarAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ public:
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetInstanceAI<boss_high_astromancer_solarianAI>(creature);
|
||||
return GetTheEyeAI<boss_high_astromancer_solarianAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -706,7 +706,7 @@ public:
|
||||
};
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetInstanceAI<boss_kaelthasAI>(creature);
|
||||
return GetTheEyeAI<boss_kaelthasAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetInstanceAI<boss_void_reaverAI>(creature);
|
||||
return GetTheEyeAI<boss_void_reaverAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -5,11 +5,14 @@
|
||||
#ifndef DEF_THE_EYE_H
|
||||
#define DEF_THE_EYE_H
|
||||
|
||||
#include "CreatureAIImpl.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "Player.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
#define TheEyeScriptName "instance_the_eye"
|
||||
|
||||
enum EyeData
|
||||
{
|
||||
DATA_ALAR = 0,
|
||||
@@ -41,4 +44,10 @@ enum EyeGOs
|
||||
GO_KAEL_STATUE_LEFT = 184597
|
||||
};
|
||||
|
||||
template <class AI, class T>
|
||||
inline AI* GetTheEyeAI(T* obj)
|
||||
{
|
||||
return GetInstanceAI<AI>(obj, TheEyeScriptName);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user