mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 07:38:36 +00:00
[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:
+6
-10
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user