From 346d88dd5ea4267b5257fa544ded354d16d60cea Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Mon, 15 Jan 2018 22:19:17 +0200 Subject: [PATCH] Eluna fix mangos compilation --- ElunaIncludes.h | 2 ++ GlobalMethods.h | 14 ++++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ElunaIncludes.h b/ElunaIncludes.h index 773dfef..2181ede 100644 --- a/ElunaIncludes.h +++ b/ElunaIncludes.h @@ -15,6 +15,7 @@ #include "Chat.h" #include "Channel.h" #include "DBCStores.h" +#include "GameEventMgr.h" #include "GossipDef.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" @@ -117,6 +118,7 @@ typedef Opcodes OpcodesList; #define eObjectMgr (&sObjectMgr) #define eAccountMgr (&sAccountMgr) #define eAuctionMgr (&sAuctionMgr) +#define eGameEventMgr (&sGameEventMgr) #define eObjectAccessor() sObjectAccessor. #define SERVER_MSG_STRING SERVER_MSG_CUSTOM #define TOTAL_LOCALES MAX_LOCALE diff --git a/GlobalMethods.h b/GlobalMethods.h index 2409ffd..e41dfb2 100644 --- a/GlobalMethods.h +++ b/GlobalMethods.h @@ -468,7 +468,6 @@ namespace LuaGlobalFunctions return 1; } -#ifdef TRINITY /** * Returns the currently active game events. * @@ -479,7 +478,7 @@ namespace LuaGlobalFunctions lua_newtable(L); int tbl = lua_gettop(L); uint32 counter = 1; - GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr->GetActiveEventList(); + GameEventMgr::ActiveEvents const& activeEvents = eGameEventMgr->GetActiveEventList(); for (GameEventMgr::ActiveEvents::const_iterator i = activeEvents.begin(); i != activeEvents.end(); ++i) { @@ -492,7 +491,6 @@ namespace LuaGlobalFunctions lua_settop(L, tbl); return 1; } -#endif static int RegisterEntryHelper(lua_State* L, int regtype) { @@ -2383,7 +2381,6 @@ namespace LuaGlobalFunctions return 1; } -#ifdef TRINITY /** * Returns `true` if the event is currently active, otherwise `false`. * @@ -2394,10 +2391,9 @@ namespace LuaGlobalFunctions { uint16 eventId = Eluna::CHECKVAL(L, 1); - Eluna::Push(L, sGameEventMgr->IsActiveEvent(eventId)); + Eluna::Push(L, eGameEventMgr->IsActiveEvent(eventId)); return 1; } -#endif /** * Returns the server's current time. @@ -2469,7 +2465,6 @@ namespace LuaGlobalFunctions return 0; } -#ifdef TRINITY /** * Starts the event by eventId, if force is set, the event will force start regardless of previous event state. * @@ -2481,7 +2476,7 @@ namespace LuaGlobalFunctions uint16 eventId = Eluna::CHECKVAL(L, 1); bool force = Eluna::CHECKVAL(L, 2, false); - sGameEventMgr->StartEvent(eventId, force); + eGameEventMgr->StartEvent(eventId, force); return 0; } @@ -2496,10 +2491,9 @@ namespace LuaGlobalFunctions uint16 eventId = Eluna::CHECKVAL(L, 1); bool force = Eluna::CHECKVAL(L, 2, false); - sGameEventMgr->StopEvent(eventId, force); + eGameEventMgr->StopEvent(eventId, force); return 0; } -#endif /** * Returns an object representing a `long long` (64-bit) value.