diff options
| author | maximius <none@none> | 2009-10-27 23:35:44 -0700 |
|---|---|---|
| committer | maximius <none@none> | 2009-10-27 23:35:44 -0700 |
| commit | 6f097c724cc5e135db92879a48d385000c755d7a (patch) | |
| tree | a54b84f5d7d56d954999ea78e55c24a55ee5c991 /src/game | |
| parent | b243cf3228ddbbd15fe2bb8f5434bd45ce7c303e (diff) | |
*Fix build
--HG--
branch : trunk
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/GameEventMgr.cpp | 10 | ||||
| -rw-r--r-- | src/game/GameEventMgr.h | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/game/GameEventMgr.cpp b/src/game/GameEventMgr.cpp index 640442bf052..3d19b8197cb 100644 --- a/src/game/GameEventMgr.cpp +++ b/src/game/GameEventMgr.cpp @@ -1645,14 +1645,20 @@ void GameEventMgr::SendWorldStateUpdate(Player * plr, uint16 event_id) } } -TRINITY_DLL_SPEC bool IsHolidayActive( HolidayIds id ) +TRINITY_DLL_SPEC bool IsHolidayActive(HolidayIds id) { GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap(); GameEventMgr::ActiveEvents const& ae = gameeventmgr.GetActiveEventList(); for (GameEventMgr::ActiveEvents::const_iterator itr = ae.begin(); itr != ae.end(); ++itr) - if(events[*itr].holiday_id==id) + if(events[*itr].holiday_id == id) return true; return false; } + +TRINITY_DLL_SPEC bool IsEventActive(uint16 event_id) +{ + GameEventMgr::ActiveEvents const& ae = gameeventmgr.GetActiveEventList(); + return ae.find(event_id) != ae.end(); +} diff --git a/src/game/GameEventMgr.h b/src/game/GameEventMgr.h index 89f962a785b..7f5e92b723d 100644 --- a/src/game/GameEventMgr.h +++ b/src/game/GameEventMgr.h @@ -103,7 +103,7 @@ class GameEventMgr uint32 NextCheck(uint16 entry) const; void LoadFromDB(); uint32 Update(); - bool IsActiveEvent(uint16 event_id) { return ( m_ActiveEvents.find(event_id)!=m_ActiveEvents.end()); } + bool IsActiveEvent(uint16 event_id) { return ( m_ActiveEvents.find(event_id) != m_ActiveEvents.end()); } uint32 Initialize(); void StartInternalEvent(uint16 event_id); bool StartEvent(uint16 event_id, bool overwrite = false); @@ -173,6 +173,7 @@ class GameEventMgr #define gameeventmgr Trinity::Singleton<GameEventMgr>::Instance() TRINITY_DLL_SPEC bool IsHolidayActive(HolidayIds id); +TRINITY_DLL_SPEC bool IsEventActive(uint16 event_id); #endif |
