mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 19:10:25 +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:
+9
-10
@@ -46,7 +46,7 @@ extern volatile bool RunLoops;
|
||||
#include "position.h"
|
||||
#include "worldserver.h"
|
||||
#include "zonedb.h"
|
||||
#include "zone_store.h"
|
||||
#include "../common/zone_store.h"
|
||||
#include "petitions.h"
|
||||
#include "command.h"
|
||||
#include "water_map.h"
|
||||
@@ -5371,14 +5371,13 @@ void Client::SetStartZone(uint32 zoneid, float x, float y, float z, float headin
|
||||
}
|
||||
|
||||
if (x == 0 && y == 0 && z == 0) {
|
||||
content_db.GetSafePoints(
|
||||
ZoneName(m_pp.binds[4].zone_id),
|
||||
0,
|
||||
&m_pp.binds[4].x,
|
||||
&m_pp.binds[4].y,
|
||||
&m_pp.binds[4].z,
|
||||
&m_pp.binds[4].heading
|
||||
);
|
||||
auto zd = GetZone(m_pp.binds[4].zone_id);
|
||||
if (zd) {
|
||||
m_pp.binds[4].x = zd->safe_x;
|
||||
m_pp.binds[4].y = zd->safe_y;
|
||||
m_pp.binds[4].z = zd->safe_z;
|
||||
m_pp.binds[4].heading = zd->safe_heading;
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_pp.binds[4].x = x;
|
||||
@@ -9427,7 +9426,7 @@ bool Client::GotoPlayerRaid(const std::string& player_name)
|
||||
if (!GetRaid()) {
|
||||
return GotoPlayer(player_name);
|
||||
}
|
||||
|
||||
|
||||
for (auto &m: GetRaid()->members) {
|
||||
if (m.member && m.member->IsClient()) {
|
||||
auto c = m.member->CastToClient();
|
||||
|
||||
Reference in New Issue
Block a user