Convert zone points from old style linked list to std

This commit is contained in:
KimLS
2022-02-14 00:53:56 -08:00
parent 1d4438ae1f
commit 296d48993e
6 changed files with 26 additions and 52 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
void command_reloadzps(Client *c, const Seperator *sep)
{
content_db.LoadStaticZonePoints(&zone->zone_point_list, zone->GetShortName(), zone->GetInstanceVersion());
content_db.LoadStaticZonePoints(zone->zone_point_list, zone->GetShortName(), zone->GetInstanceVersion());
c->Message(Chat::White, "Reloading server zone_points.");
}
+1 -6
View File
@@ -108,10 +108,7 @@ void command_showzonepoints(Client *c, const Seperator *sep)
found_zone_points++;
}
LinkedListIterator<ZonePoint *> iterator(zone->zone_point_list);
iterator.Reset();
while (iterator.MoreElements()) {
ZonePoint *zone_point = iterator.GetData();
for (auto& zone_point : zone->zone_point_list) {
std::string zone_long_name = ZoneLongName(zone_point->target_zone_id);
std::string node_name = fmt::format("ZonePoint To [{}]", zone_long_name);
@@ -142,8 +139,6 @@ void command_showzonepoints(Client *c, const Seperator *sep)
).c_str()
);
iterator.Advance();
found_zone_points++;
}