diff options
author | megamage <none@none> | 2009-01-03 11:18:19 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-01-03 11:18:19 -0600 |
commit | 9dfcd5ba5e0b801f39a2a4c1b71154d9724f7935 (patch) | |
tree | 627370d0f5859d4635026f731a8c38244d054411 /src/game/ObjectMgr.cpp | |
parent | 9438625a19c070ec20d392fa57f1de6a61b7b985 (diff) | |
parent | 59f85167ab387a8e8b69aaf1d65f9b6994de9ca0 (diff) |
*Merge with Trinity 768.
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r-- | src/game/ObjectMgr.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 3ec944f7f22..a2445a3e1cb 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -7655,3 +7655,39 @@ ObjectMgr::ScriptNameMap & GetScriptNames() { return objmgr.GetScriptNames(); } + +void ObjectMgr::LoadTransportEvents() +{ + + QueryResult *result = WorldDatabase.Query("SELECT entry, waypoint_id, event_id FROM transport_events"); + + if( !result ) + { + barGoLink bar1( 1 ); + bar1.step(); + sLog.outString( "\n>> Transport events table is empty \n" ); + return; + } + + barGoLink bar1( result->GetRowCount() ); + + do + { + bar1.step(); + + Field *fields = result->Fetch(); + + //Load event values + uint32 entry = fields[0].GetUInt32(); + uint32 waypoint_id = fields[1].GetUInt32(); + uint32 event_id = fields[2].GetUInt32(); + + uint32 event_count = (entry*100)+waypoint_id; + TransportEventMap[event_count] = event_id; + } + while(result->NextRow()); + + sLog.outString( "\n>> Loaded %u transport events \n", result->GetRowCount() ); + + delete result; +}
\ No newline at end of file |