diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 4e62e5477..e867e071a 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -1483,6 +1483,16 @@ public: }; #define RegisterBattlegroundMapScript(script_name, mapId) new GenericBattlegroundMapScript(#script_name, mapId) +template +class GenericInstanceMapScript : public InstanceMapScript +{ +public: + GenericInstanceMapScript(char const* name, uint32 mapId) noexcept : InstanceMapScript(name, mapId) {} + + InstanceScript* GetInstanceScript(InstanceMap* map) const override { return new Script(map); } +}; +#define RegisterInstanceMapScript(script_name, mapId) new GenericInstanceMapScript(#script_name, mapId) + #define sScriptMgr ScriptMgr::instance() #endif