mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/ChatCommands: Fix .wp reload crash
This commit is contained in:
@@ -85,10 +85,6 @@ WaypointMgr* WaypointMgr::instance()
|
||||
|
||||
void WaypointMgr::ReloadPath(uint32 id)
|
||||
{
|
||||
auto itr = _waypointStore.find(id);
|
||||
if (itr != _waypointStore.end())
|
||||
_waypointStore.erase(itr);
|
||||
|
||||
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_DATA_BY_ID);
|
||||
|
||||
stmt->setUInt32(0, id);
|
||||
@@ -132,7 +128,9 @@ void WaypointMgr::ReloadPath(uint32 id)
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
_waypointStore[id] = WaypointPath(id, std::move(values));
|
||||
WaypointPath& path = _waypointStore[id];
|
||||
path.id = id;
|
||||
path.nodes = std::move(values);
|
||||
}
|
||||
|
||||
WaypointPath const* WaypointMgr::GetPath(uint32 id) const
|
||||
|
||||
Reference in New Issue
Block a user