mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30: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
|
|
@ -32,6 +32,7 @@
|
|||
"SMSG_TUTORIAL_FLAGS": "0x0FD",
|
||||
"SMSG_WARDEN_DATA": "0x2E6",
|
||||
"CMSG_WARDEN_DATA": "0x2E7",
|
||||
"SMSG_NOTIFICATION": "0x1CB",
|
||||
"SMSG_ACCOUNT_DATA_TIMES": "0x209",
|
||||
"SMSG_UPDATE_OBJECT": "0x0A9",
|
||||
"SMSG_COMPRESSED_UPDATE_OBJECT": "0x1F6",
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
"SMSG_INITIALIZE_FACTIONS": "0x122",
|
||||
"SMSG_WARDEN_DATA": "0x2E6",
|
||||
"CMSG_WARDEN_DATA": "0x2E7",
|
||||
"SMSG_NOTIFICATION": "0x1CB",
|
||||
"SMSG_ACCOUNT_DATA_TIMES": "0x209",
|
||||
"SMSG_UPDATE_OBJECT": "0x0A9",
|
||||
"SMSG_COMPRESSED_UPDATE_OBJECT": "0x1F6",
|
||||
|
|
|
|||
|
|
@ -1008,6 +1008,9 @@ private:
|
|||
*/
|
||||
void handleMotd(network::Packet& packet);
|
||||
|
||||
/** Handle SMSG_NOTIFICATION (vanilla/classic server notification string) */
|
||||
void handleNotification(network::Packet& packet);
|
||||
|
||||
/**
|
||||
* Handle SMSG_PONG from server
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ enum class LogicalOpcode : uint16_t {
|
|||
SMSG_CLIENTCACHE_VERSION,
|
||||
SMSG_FEATURE_SYSTEM_STATUS,
|
||||
SMSG_MOTD,
|
||||
SMSG_NOTIFICATION,
|
||||
|
||||
// ---- Entity/Object updates ----
|
||||
SMSG_UPDATE_OBJECT,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue