diff options
Diffstat (limited to 'src/game/WaypointManager.h')
-rw-r--r-- | src/game/WaypointManager.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/game/WaypointManager.h b/src/game/WaypointManager.h index 1c41617fff7..a8f2d5746e9 100644 --- a/src/game/WaypointManager.h +++ b/src/game/WaypointManager.h @@ -1,7 +1,7 @@ /* - * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> + * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * - * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,7 +34,9 @@ struct WaypointData }; typedef std::vector<WaypointData*> WaypointPath; -extern UNORDERED_MAP<uint32, WaypointPath*> waypoint_map; +typedef UNORDERED_MAP<uint32, WaypointPath*> WaypointPathMap; + +extern WaypointPathMap WaypointPathHolder; class WaypointStore { @@ -48,9 +50,10 @@ class WaypointStore WaypointPath* GetPath(uint32 id) { - if(waypoint_map.find(id) != waypoint_map.end()) - return waypoint_map[id]; - else return 0; + WaypointPathMap::iterator itr = WaypointPathHolder.find(id); + if(itr != WaypointPathHolder.end()) + return itr->second; + return NULL; } inline uint32 GetRecordsCount() { return records; } |