[Code Cleanup] Zone Data Loading Refactor (#2388)

* [Code Cleanup] Zone data loading refactor

* Update client_packet.cpp

* strcpy adjustments

* Ensure safe points get reloaded properly

* Simplify GetPEQZone and getZoneShutDownDelay

* Bring in zone_store where needed

* Update client.cpp

* Signature

* Signature

* Convert helpers to using pointers

* PR comment

* Update worlddb.cpp

* Fix loading for instances

* Fix zoning with fallback as well

* Another place for instance fallback
This commit is contained in:
Chris Miles
2022-09-01 18:48:28 -05:00
committed by GitHub
parent c613dbb2f7
commit 89fdd842e1
81 changed files with 753 additions and 1130 deletions
+6 -10
View File
@@ -6638,17 +6638,13 @@ void Client::Handle_OP_GMZoneRequest(const EQApplicationPacket *app)
strcpy(target_zone, zone_short_name);
// this both loads the safe points and does a sanity check on zone name
if (!content_db.GetSafePoints(
target_zone,
0,
&target_x,
&target_y,
&target_z,
&target_heading,
&min_status,
&min_level
)) {
auto z = GetZone(target_zone, 0);
if (z) {
target_zone[0] = 0;
target_x = z->safe_x;
target_y = z->safe_y;
target_z = z->safe_z;
target_heading = z->safe_heading;
}
auto outapp = new EQApplicationPacket(OP_GMZoneRequest, sizeof(GMZoneRequest_Struct));