[Zones] Convert SaveZoneCFG to Repositories (#3950)

* [Zones] Convert SaveZoneCFG to Repositories

# Notes
- Convert `SaveZoneCFG()` to repositories.

* Comment

* safe_heading

* Update zone_data.cpp
This commit is contained in:
Alex King
2024-01-13 00:28:16 -05:00
committed by GitHub
parent d59531b16f
commit f1d5e3eedf
7 changed files with 67 additions and 59 deletions
+4 -3
View File
@@ -357,9 +357,10 @@ void SetZoneData(Client *c, const Seperator *sep)
database.QueryDatabase(query);
}
zone->newzone_data.safe_x = x;
zone->newzone_data.safe_y = y;
zone->newzone_data.safe_z = z;
zone->newzone_data.safe_x = x;
zone->newzone_data.safe_y = y;
zone->newzone_data.safe_z = z;
zone->newzone_data.safe_heading = heading;
auto outapp = new EQApplicationPacket(OP_NewZone, sizeof(NewZone_Struct));
memcpy(outapp->pBuffer, &zone->newzone_data, outapp->size);
+3 -2
View File
@@ -100,10 +100,11 @@ void ShowZoneData(Client *c, const Seperator *sep)
DialogueWindow::TableCell("Safe Coordinates") +
DialogueWindow::TableCell(
fmt::format(
"{:.2f}, {:.2f}, {:.2f}",
"{:.2f}, {:.2f}, {:.2f} Heading: {:.2f}",
zone->newzone_data.safe_x,
zone->newzone_data.safe_y,
zone->newzone_data.safe_z
zone->newzone_data.safe_z,
zone->newzone_data.safe_heading
)
)
);