mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
Zone point logging
This commit is contained in:
parent
cfe3b2b071
commit
2ec9a2addd
@ -116,6 +116,7 @@ namespace Logs {
|
|||||||
Aura,
|
Aura,
|
||||||
HotReload,
|
HotReload,
|
||||||
Merchants,
|
Merchants,
|
||||||
|
ZonePoints,
|
||||||
MaxCategoryID /* Don't Remove this */
|
MaxCategoryID /* Don't Remove this */
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -191,6 +192,7 @@ namespace Logs {
|
|||||||
"Aura",
|
"Aura",
|
||||||
"HotReload",
|
"HotReload",
|
||||||
"Merchants",
|
"Merchants",
|
||||||
|
"ZonePoints"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -581,6 +581,16 @@
|
|||||||
OutF(LogSys, Logs::Detail, Logs::Merchants, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
OutF(LogSys, Logs::Detail, Logs::Merchants, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
#define LogZonePoints(message, ...) do {\
|
||||||
|
if (LogSys.log_settings[Logs::ZonePoints].is_category_enabled == 1)\
|
||||||
|
OutF(LogSys, Logs::General, Logs::ZonePoints, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define LogZonePointsDetail(message, ...) do {\
|
||||||
|
if (LogSys.log_settings[Logs::ZonePoints].is_category_enabled == 1)\
|
||||||
|
OutF(LogSys, Logs::Detail, Logs::ZonePoints, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#define Log(debug_level, log_category, message, ...) do {\
|
#define Log(debug_level, log_category, message, ...) do {\
|
||||||
if (LogSys.log_settings[log_category].is_category_enabled == 1)\
|
if (LogSys.log_settings[log_category].is_category_enabled == 1)\
|
||||||
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||||
@ -926,6 +936,12 @@
|
|||||||
#define LogMerchantsDetail(message, ...) do {\
|
#define LogMerchantsDetail(message, ...) do {\
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
#define LogZonePoints(message, ...) do {\
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define LogZonePointsDetail(message, ...) do {\
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#define Log(debug_level, log_category, message, ...) do {\
|
#define Log(debug_level, log_category, message, ...) do {\
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
@ -933,4 +949,4 @@
|
|||||||
} while (0)
|
} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif //EQEMU_EQEMU_LOGSYS_LOG_ALIASES_H
|
#endif //EQEMU_EQEMU_LOGSYS_LOG_ALIASES_H
|
||||||
|
|||||||
@ -6124,16 +6124,16 @@ void Client::MarkSingleCompassLoc(float in_x, float in_y, float in_z, uint8 coun
|
|||||||
|
|
||||||
void Client::SendZonePoints()
|
void Client::SendZonePoints()
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
LinkedListIterator<ZonePoint*> iterator(zone->zone_point_list);
|
LinkedListIterator<ZonePoint *> iterator(zone->zone_point_list);
|
||||||
iterator.Reset();
|
iterator.Reset();
|
||||||
while(iterator.MoreElements())
|
while (iterator.MoreElements()) {
|
||||||
{
|
ZonePoint *data = iterator.GetData();
|
||||||
ZonePoint* data = iterator.GetData();
|
|
||||||
if(ClientVersionBit() & data->client_version_mask)
|
if (ClientVersionBit() & data->client_version_mask) {
|
||||||
{
|
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator.Advance();
|
iterator.Advance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6147,6 +6147,17 @@ void Client::SendZonePoints()
|
|||||||
while(iterator.MoreElements())
|
while(iterator.MoreElements())
|
||||||
{
|
{
|
||||||
ZonePoint* data = iterator.GetData();
|
ZonePoint* data = iterator.GetData();
|
||||||
|
|
||||||
|
LogZonePoints(
|
||||||
|
"Sending zone point to client [{}] mask [{}] x [{}] y [{}] z [{}] number [{}]",
|
||||||
|
GetCleanName(),
|
||||||
|
ClientVersionBit() & data->client_version_mask ? "true" : "false",
|
||||||
|
data->x,
|
||||||
|
data->y,
|
||||||
|
data->z,
|
||||||
|
data->number
|
||||||
|
);
|
||||||
|
|
||||||
if(ClientVersionBit() & data->client_version_mask)
|
if(ClientVersionBit() & data->client_version_mask)
|
||||||
{
|
{
|
||||||
zp->zpe[i].iterator = data->number;
|
zp->zpe[i].iterator = data->number;
|
||||||
@ -6160,6 +6171,7 @@ void Client::SendZonePoints()
|
|||||||
}
|
}
|
||||||
iterator.Advance();
|
iterator.Advance();
|
||||||
}
|
}
|
||||||
|
|
||||||
FastQueuePacket(&outapp);
|
FastQueuePacket(&outapp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1310,7 +1310,14 @@ bool Zone::LoadZoneCFG(const char* filename, uint16 instance_id)
|
|||||||
strcpy(newzone_data.zone_long_name, GetLongName());
|
strcpy(newzone_data.zone_long_name, GetLongName());
|
||||||
strcpy(newzone_data.zone_short_name2, GetShortName());
|
strcpy(newzone_data.zone_short_name2, GetShortName());
|
||||||
|
|
||||||
LogInfo("Successfully loaded Zone Config");
|
LogInfo(
|
||||||
|
"Successfully loaded Zone Config for Zone [{}] ({}) Version [{}] Instance ID [{}]",
|
||||||
|
GetShortName(),
|
||||||
|
GetLongName(),
|
||||||
|
GetInstanceVersion(),
|
||||||
|
instance_id
|
||||||
|
);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1864,8 +1871,7 @@ ZonePoint* Zone::GetClosestZonePoint(const glm::vec3& location, uint32 to, Clien
|
|||||||
{
|
{
|
||||||
ZonePoint* zp = iterator.GetData();
|
ZonePoint* zp = iterator.GetData();
|
||||||
uint32 mask_test = client->ClientVersionBit();
|
uint32 mask_test = client->ClientVersionBit();
|
||||||
if(!(zp->client_version_mask & mask_test))
|
if (!(zp->client_version_mask & mask_test)) {
|
||||||
{
|
|
||||||
iterator.Advance();
|
iterator.Advance();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user