Skip to content

Commit

Permalink
Add game event hooks and update eluna version
Browse files Browse the repository at this point in the history
  • Loading branch information
Rochet2 authored and billy1arm committed Sep 30, 2017
1 parent d77090b commit 852b676
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/game/WorldHandlers/GameEventMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "BattleGround/BattleGroundMgr.h"
#include "MassMailMgr.h"
#include "Policies/Singleton.h"
#include "LuaEngine.h"

INSTANTIATE_SINGLETON_1(GameEventMgr);

Expand Down Expand Up @@ -82,6 +83,8 @@ 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; }
}
if (IsActiveEvent(event_id))
sEluna->OnGameEventStart(event_id);
}

void GameEventMgr::StopEvent(uint16 event_id, bool overwrite)
Expand All @@ -93,6 +96,8 @@ 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; }
}
if (!IsActiveEvent(event_id))
sEluna->OnGameEventStop(event_id);
}

void GameEventMgr::LoadFromDB()
Expand Down

0 comments on commit 852b676

Please sign in to comment.