mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 01:23:47 +00:00
feat(Core/Instance): Add instance validation for creature scripts (#4596)
This commit is contained in:
@@ -91,7 +91,7 @@ public:
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new boss_gatewatcher_gyrokillAI(creature);
|
||||
return GetMechanarAI<boss_gatewatcher_gyrokillAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new boss_gatewatcher_iron_handAI(creature);
|
||||
return GetMechanarAI<boss_gatewatcher_iron_handAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new boss_mechano_lord_capacitusAI(creature);
|
||||
return GetMechanarAI<boss_mechano_lord_capacitusAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new boss_nethermancer_sepethreaAI(creature);
|
||||
return GetMechanarAI<boss_nethermancer_sepethreaAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -179,7 +179,7 @@ public:
|
||||
};
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_ragin_flamesAI(creature);
|
||||
return GetMechanarAI<npc_ragin_flamesAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new boss_pathaleon_the_calculatorAI(creature);
|
||||
return GetMechanarAI<boss_pathaleon_the_calculatorAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -6,10 +6,13 @@
|
||||
#define DEF_MECHANAR_H
|
||||
|
||||
#include "CreatureAI.h"
|
||||
#include "CreatureAIImpl.h"
|
||||
#include "Player.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
#define MechanarScriptName "instance_mechanar"
|
||||
|
||||
enum DataTypes
|
||||
{
|
||||
DATA_GATEWATCHER_GYROKILL = 0,
|
||||
@@ -52,4 +55,10 @@ enum SpellIds
|
||||
SPELL_TELEPORT_VISUAL = 35517
|
||||
};
|
||||
|
||||
template <class AI, class T>
|
||||
inline AI* GetMechanarAI(T* obj)
|
||||
{
|
||||
return GetInstanceAI<AI>(obj, MechanarScriptName);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user