mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Handle SMSG_NOTIFICATION (0x1CB) for vanilla/Turtle WoW welcome messages
This commit is contained in:
parent
e8864941dc
commit
687675fa14
6 changed files with 21 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue