Handle SMSG_NOTIFICATION (0x1CB) for vanilla/Turtle WoW welcome messages

This commit is contained in:
Kelsi 2026-02-20 00:28:51 -08:00
parent e8864941dc
commit 687675fa14
6 changed files with 21 additions and 0 deletions

View file

@ -1119,6 +1119,11 @@ void GameHandler::handlePacket(network::Packet& packet) {
handleMotd(packet);
break;
case Opcode::SMSG_NOTIFICATION:
// Vanilla/Classic server notification (single string)
handleNotification(packet);
break;
case Opcode::SMSG_PONG:
// Can be received at any time after entering world
handlePong(packet);
@ -3599,6 +3604,15 @@ void GameHandler::handleMotd(network::Packet& packet) {
}
}
void GameHandler::handleNotification(network::Packet& packet) {
// SMSG_NOTIFICATION: single null-terminated string
std::string message = packet.readString();
if (!message.empty()) {
LOG_INFO("Server notification: ", message);
addSystemChatMessage(message);
}
}
void GameHandler::sendPing() {
if (state != WorldState::IN_WORLD) {
return;