Add mailbox system and fix logging performance stutter

Implement full mail send/receive: SMSG_SHOW_MAILBOX, CMSG_GET_MAIL_LIST,
SMSG_MAIL_LIST_RESULT, CMSG_SEND_MAIL, SMSG_SEND_MAIL_RESULT, mail take
money/item/delete/mark-as-read, and inbox/compose UI windows.

Fix periodic stuttering in Stormwind caused by synchronous per-line disk
flushes in the logger — remove fileStream.flush() and std::endl, downgrade
high-volume per-packet/per-model/per-texture LOG_INFO to LOG_DEBUG.
This commit is contained in:
Kelsi 2026-02-15 14:00:41 -08:00
parent 9bc8c5c85a
commit 8a468e9533
14 changed files with 782 additions and 22 deletions

View file

@ -296,7 +296,7 @@ void WorldSocket::update() {
}
if (receivedAny) {
LOG_INFO("World socket read ", bytesReadThisTick, " bytes in ", readOps,
LOG_DEBUG("World socket read ", bytesReadThisTick, " bytes in ", readOps,
" recv call(s), buffered=", receiveBuffer.size());
// Hex dump received bytes for auth debugging
if (bytesReadThisTick <= 128) {
@ -304,11 +304,11 @@ void WorldSocket::update() {
for (size_t i = 0; i < receiveBuffer.size(); ++i) {
char buf[4]; snprintf(buf, sizeof(buf), "%02x ", receiveBuffer[i]); hex += buf;
}
LOG_INFO("World socket raw bytes: ", hex);
LOG_DEBUG("World socket raw bytes: ", hex);
}
tryParsePackets();
if (connected && !receiveBuffer.empty()) {
LOG_INFO("World socket parse left ", receiveBuffer.size(),
LOG_DEBUG("World socket parse left ", receiveBuffer.size(),
" bytes buffered (awaiting complete packet)");
}
}