mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
debug: log outgoing heartbeat coords and chat, fix BG filter for SAY type
Heartbeat: log canonical + wire coords every 30th heartbeat to detect if we're sending wrong position (causing server to teleport us). Chat: log outgoing messages at WARNING level to confirm packets are sent. BG filter: announcer uses SAY (type=0) with color codes, not SYSTEM. Match "BG Queue Announcer" in message body regardless of chat type.
This commit is contained in:
parent
91c6eef967
commit
f74b79f1f8
2 changed files with 12 additions and 6 deletions
|
|
@ -120,7 +120,7 @@ void ChatHandler::sendChatMessage(ChatType type, const std::string& message, con
|
|||
return;
|
||||
}
|
||||
|
||||
LOG_INFO("Sending chat message: [", getChatTypeString(type), "] ", message);
|
||||
LOG_WARNING("OUTGOING CHAT: type=", static_cast<int>(type), " msg='", message.substr(0, 60), "'");
|
||||
|
||||
// Use the player's faction language. AzerothCore rejects wrong language.
|
||||
// Alliance races: Human(1), Dwarf(3), NightElf(4), Gnome(7), Draenei(11) → COMMON (7)
|
||||
|
|
@ -205,12 +205,11 @@ void ChatHandler::handleMessageChat(network::Packet& packet) {
|
|||
}
|
||||
|
||||
// Filter BG queue announcer spam (server-side module on ChromieCraft/AzerothCore).
|
||||
// Only filter SYSTEM messages to avoid suppressing player chat.
|
||||
if (data.type == ChatType::SYSTEM) {
|
||||
// Arrives as SAY (type=0) with color codes: |cffff0000[BG Queue Announcer]:|r ...
|
||||
{
|
||||
const auto& msg = data.message;
|
||||
if (msg.find("Queue status") != std::string::npos ||
|
||||
msg.find("BG Queue") != std::string::npos ||
|
||||
msg.find("BGAnnouncer") != std::string::npos) {
|
||||
if (msg.find("BG Queue Announcer") != std::string::npos ||
|
||||
msg.find("Queue status") != std::string::npos) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -654,6 +654,13 @@ void MovementHandler::sendMovement(Opcode opcode) {
|
|||
wireInfo.y = serverPos.y;
|
||||
wireInfo.z = serverPos.z;
|
||||
|
||||
// Log outgoing position periodically to detect coordinate bugs
|
||||
static int heartbeatLogCounter = 0;
|
||||
if (opcode == Opcode::MSG_MOVE_HEARTBEAT && ++heartbeatLogCounter % 30 == 0) {
|
||||
LOG_WARNING("HEARTBEAT pos canonical=(", movementInfo.x, ",", movementInfo.y, ",", movementInfo.z,
|
||||
") wire=(", wireInfo.x, ",", wireInfo.y, ",", wireInfo.z, ")");
|
||||
}
|
||||
|
||||
wireInfo.orientation = core::coords::canonicalToServerYaw(wireInfo.orientation);
|
||||
|
||||
if (includeTransportInWire) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue