feat(Core/Instance): Add instance validation for creature scripts (#4596)

This commit is contained in:
Kitzunu
2021-04-05 15:34:26 +02:00
committed by GitHub
parent 60f865fce6
commit f9d708b450
371 changed files with 1315 additions and 767 deletions

View File

@@ -212,7 +212,7 @@ public:
CreatureAI* GetAI(Creature* creature) const override
{
return GetInstanceAI<boss_kirtonos_the_heraldAI>(creature);
return GetScholomanceAI<boss_kirtonos_the_heraldAI>(creature);
}
};

View File

@@ -13,7 +13,7 @@
class instance_scholomance : public InstanceMapScript
{
public:
instance_scholomance() : InstanceMapScript("instance_scholomance", 289) { }
instance_scholomance() : InstanceMapScript(ScholomanceScriptName, 289) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{

View File

@@ -5,6 +5,10 @@
#ifndef DEF_SCHOLOMANCE_H
#define DEF_SCHOLOMANCE_H
#include "CreatureAIImpl.h"
#define ScholomanceScriptName "instance_scholomance"
enum DataTypes
{
DATA_KIRTONOS_THE_HERALD = 0,
@@ -58,4 +62,10 @@ enum SpellIds
SPELL_SHADOW_PORTAL_VAULTOFTHERAVENIAN = 17948
};
template <class AI, class T>
inline AI* GetScholomanceAI(T* obj)
{
return GetInstanceAI<AI>(obj, ScholomanceScriptName);
}
#endif