mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 14:46:24 +00:00
feat(Core/Instance): Add instance validation for creature scripts (#4596)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user