diff options
| author | click <none@none> | 2010-04-22 16:22:39 +0200 | 
|---|---|---|
| committer | click <none@none> | 2010-04-22 16:22:39 +0200 | 
| commit | ab396beb56b74bc18922055d89230f0b3b19312b (patch) | |
| tree | a7a7313538648fa69f070bde266d7f0cb047ccd7 /src/game/GameEventMgr.cpp | |
| parent | ca2b52af0d4ca8d2c2d3615bac2db67778af07e7 (diff) | |
Add support for season-dependant gameevents
Patch by Liberate
--HG--
branch : trunk
Diffstat (limited to 'src/game/GameEventMgr.cpp')
| -rw-r--r-- | src/game/GameEventMgr.cpp | 18 | 
1 files changed, 18 insertions, 0 deletions
diff --git a/src/game/GameEventMgr.cpp b/src/game/GameEventMgr.cpp index e66c1a6e27d..965651ae2f6 100644 --- a/src/game/GameEventMgr.cpp +++ b/src/game/GameEventMgr.cpp @@ -1068,6 +1068,24 @@ uint32 GameEventMgr::Initialize()                           // return the next e      return delay;  } +void GameEventMgr::StartArenaSeason() +{ +    QueryResult_AutoPtr result = WorldDatabase.PQuery("SELECT event FROM season_linked_event WHERE season = '%i'",sWorld.getConfig(CONFIG_ARENA_SEASON_ID)); + +    if (!result) +    { +        sLog.outError("ArenaSeason (%i) must be an existant Arena Season",sWorld.getConfig(CONFIG_ARENA_SEASON_ID)); +        return; +    } + +    Field *fields = result->Fetch(); + +    uint16 eventId = fields[0].GetUInt16(); + +    StartEvent(eventId,true); +    sLog.outString("Arena Season %i started...",sWorld.getConfig(CONFIG_ARENA_SEASON_ID)); +} +  uint32 GameEventMgr::Update()                               // return the next event delay in ms  {      time_t currenttime = time(NULL);  | 
