Files
mod-mythic-plus/src/AllMapScript.cpp
Ben Carter 2c8b67ef07 Changed MythicPlus and MpDataStore to pure singletons and updated current
calling scripts to not get the instance just call via defined macro
2024-08-31 23:17:52 -04:00

55 lines
1.1 KiB
C++

#include "Chat.h"
#include "Log.h"
#include "MapMgr.h"
#include "MpLogger.h"
#include "MpDataStore.h"
#include "MythicPlus.h"
#include "Player.h"
#include "ScriptMgr.h"
class MythicPlus_AllMapScript : public AllMapScript
{
public:
MythicPlus_AllMapScript() : AllMapScript("MythicPlus_AllMapScript")
{
}
void OnCreateMap(Map* map)
{
MpLogger::debug("AllMapScript::OnCreateMap(): {}", map->GetMapName());
if (!sMythicPlus->IsMapEligible(map)) {
return;
}
}
void OnPlayerEnterAll(Map* map, Player* player)
{
MpLogger::debug("AllMapScript::OnPlayerEnterAll(): {}", map->GetMapName());
if (!sMythicPlus->IsMapEligible(map)) {
return;
}
}
void OnPlayerLeaveAll(Map* map, Player* player)
{
MpLogger::debug("AllMapScript::OnPlayerLeaveAll(): {}", map->GetMapName());
if (!sMythicPlus->IsMapEligible(map)) {
return;
}
}
};
void Add_MP_AllMapScripts()
{
MpLogger::debug("Add_MP_AllMapScripts()");
new MythicPlus_AllMapScript();
}