[Eluna] Add conditionals around code

This commit is contained in:
Antz 2018-01-05 05:33:45 +00:00
parent 36d3537f6e
commit ef8af71d36

View File

@ -34,7 +34,10 @@
#include "BattleGround/BattleGroundMgr.h"
#include "MassMailMgr.h"
#include "Policies/Singleton.h"
#ifdef ENABLE_ELUNA
#include "LuaEngine.h"
#endif /* ENABLE_ELUNA */
INSTANTIATE_SINGLETON_1(GameEventMgr);
@ -83,8 +86,10 @@ void GameEventMgr::StartEvent(uint16 event_id, bool overwrite /*=false*/, bool r
if (mGameEvent[event_id].end <= mGameEvent[event_id].start)
{ mGameEvent[event_id].end = mGameEvent[event_id].start + mGameEvent[event_id].length; }
}
#ifdef ENABLE_ELUNA
if (IsActiveEvent(event_id))
sEluna->OnGameEventStart(event_id);
#endif /* ENABLE_ELUNA */
}
void GameEventMgr::StopEvent(uint16 event_id, bool overwrite)
@ -96,8 +101,10 @@ void GameEventMgr::StopEvent(uint16 event_id, bool overwrite)
if (mGameEvent[event_id].end <= mGameEvent[event_id].start)
{ mGameEvent[event_id].end = mGameEvent[event_id].start + mGameEvent[event_id].length; }
}
#ifdef ENABLE_ELUNA
if (!IsActiveEvent(event_id))
sEluna->OnGameEventStop(event_id);
#endif /* ENABLE_ELUNA */
}
void GameEventMgr::LoadFromDB()