mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Logging] Add detailed zoning logging (#3555)
* WIP: Add zoning logging * Update zoning.cpp
This commit is contained in:
+52
-7
@@ -795,11 +795,29 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
client = client_list.FindCharacter(ztz->name);
|
||||
}
|
||||
|
||||
LogInfo("ZoneToZone request for [{}] current zone [{}] req zone [{}]", ztz->name, ztz->current_zone_id, ztz->requested_zone_id);
|
||||
LogZoning(
|
||||
"ZoneToZone request for client [{}] guild_id [{}] requested_zone [{}] requested_zone_id [{}] requested_instance_id [{}] current_zone [{}] current_zone_id [{}] current_instance_id [{}] response [{}] admin [{}] ignorerestrictions [{}]",
|
||||
ztz->name,
|
||||
ztz->guild_id,
|
||||
ZoneName(ztz->requested_zone_id),
|
||||
ztz->requested_zone_id,
|
||||
ztz->requested_instance_id,
|
||||
ZoneName(ztz->current_zone_id),
|
||||
ztz->current_zone_id,
|
||||
ztz->current_instance_id,
|
||||
ztz->response,
|
||||
ztz->admin,
|
||||
ztz->ignorerestrictions
|
||||
);
|
||||
|
||||
/* This is a request from the egress zone */
|
||||
if (GetZoneID() == ztz->current_zone_id && GetInstanceID() == ztz->current_instance_id) {
|
||||
LogInfo("Processing ZTZ for egress from zone for client [{}]", ztz->name);
|
||||
LogZoning(
|
||||
"ZoneToZone request for client [{}] for egress from zone [{}]",
|
||||
ztz->name,
|
||||
ZoneName(ztz->current_zone_id),
|
||||
ztz->current_zone_id
|
||||
);
|
||||
|
||||
if (
|
||||
ztz->admin < AccountStatus::QuestTroupe &&
|
||||
@@ -807,6 +825,14 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
zoneserver_list.IsZoneLocked(ztz->requested_zone_id)
|
||||
) {
|
||||
ztz->response = 0;
|
||||
|
||||
LogZoning(
|
||||
"ZoneToZone request for client [{}] for egress from zone [{}] denied, zone is locked",
|
||||
ztz->name,
|
||||
ZoneName(ztz->current_zone_id),
|
||||
ztz->current_zone_id
|
||||
);
|
||||
|
||||
SendPacket(pack);
|
||||
break;
|
||||
}
|
||||
@@ -818,12 +844,25 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
);
|
||||
|
||||
if (ingress_server) {
|
||||
LogInfo("Found a zone already booted for [{}]", ztz->name);
|
||||
LogZoning(
|
||||
"Found a zone already booted for ZoneToZone for client [{}] for ingress_server from zone [{}] found booted zone",
|
||||
ztz->name,
|
||||
ZoneName(ztz->current_zone_id),
|
||||
ztz->current_zone_id
|
||||
);
|
||||
|
||||
ztz->response = 1;
|
||||
} else {
|
||||
int server_id;
|
||||
if ((server_id = zoneserver_list.TriggerBootup(ztz->requested_zone_id, ztz->requested_instance_id))) {
|
||||
LogInfo("Successfully booted a zone for [{}]", ztz->name);
|
||||
LogZoning(
|
||||
"ZoneToZone successfully booted a zone for character [{}] zone [{}] ({}) instance [{}] ({})",
|
||||
ztz->name,
|
||||
ZoneName(ztz->requested_zone_id),
|
||||
ztz->requested_zone_id,
|
||||
ztz->requested_instance_id,
|
||||
server_id
|
||||
);
|
||||
ztz->response = 1;
|
||||
ingress_server = zoneserver_list.FindByID(server_id);
|
||||
} else {
|
||||
@@ -841,8 +880,8 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
ingress_server->SendPacket(pack); // inform target server
|
||||
}
|
||||
} else {
|
||||
LogInfo(
|
||||
"Processing ZTZ for ingress to zone for client [{}] instance_id [{}] zone_id [{}]",
|
||||
LogZoning(
|
||||
"Processing ZTZ for egress to zone for client [{}] instance_id [{}] zone_id [{}]",
|
||||
ztz->name,
|
||||
ztz->current_instance_id,
|
||||
ztz->current_zone_id
|
||||
@@ -854,7 +893,13 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
);
|
||||
|
||||
if (egress_server) {
|
||||
LogInfo("Found egress server, forwarding client");
|
||||
LogZoning(
|
||||
"Found egress server_id [{}] zone_id [{}] zone_name [{}] instance_id [{}], forwarding client",
|
||||
egress_server->GetID(),
|
||||
egress_server->GetZoneID(),
|
||||
egress_server->GetZoneName(),
|
||||
egress_server->GetInstanceID()
|
||||
);
|
||||
egress_server->SendPacket(pack);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user