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;

View file

@ -61,6 +61,7 @@ static const OpcodeNameEntry kOpcodeNames[] = {
{"SMSG_CLIENTCACHE_VERSION", LogicalOpcode::SMSG_CLIENTCACHE_VERSION},
{"SMSG_FEATURE_SYSTEM_STATUS", LogicalOpcode::SMSG_FEATURE_SYSTEM_STATUS},
{"SMSG_MOTD", LogicalOpcode::SMSG_MOTD},
{"SMSG_NOTIFICATION", LogicalOpcode::SMSG_NOTIFICATION},
{"SMSG_UPDATE_OBJECT", LogicalOpcode::SMSG_UPDATE_OBJECT},
{"SMSG_COMPRESSED_UPDATE_OBJECT", LogicalOpcode::SMSG_COMPRESSED_UPDATE_OBJECT},
{"SMSG_UNKNOWN_1F5", LogicalOpcode::SMSG_UNKNOWN_1F5},