Files
ForeverCore/tests/game/ChatAddonTargetedLayout.cpp
T
Karrz1 ff699fb5cf Sync with WoW Forever 0.1.34: Blizzlike core
Brings forever up to date with our 0.1.34 code for the WoW Forever client 1.60.1.70862.
Blizzlike only: fixes from real game data (packet captures, live hotfixes, player caches, Wowhead and Questie data,
VMaNGOS for the vanilla world) and server fixes. No custom items or custom content; every rate and option defaults
to Blizzard's behaviour.

What is new since 2ae1313e, in short:
- Clients 70790, 70840 and 70862: message numbers, mail, guild window, charters, contact list, add-on whispers.
- Crash and exploit fixes: guild ranks, loot of emptied veins, quest lookups, taxi mask, battleground templates,
  vendor free buys, item sell price, auction house, falling out of the world, bnetserver request limit.
- Classes, talents, pets and buffs from the live game data and Blizzard's hotfixes of November.
- Quests, NPCs, spawns, trainers, loot, fishing, events, Merchant's Favor crates and writs, sealed crate turn-ins.
- Dungeon and raid scripts (Molten Core, Blackwing Lair, Zul'Gurub, Ahn'Qiraj, Shadowfang Keep, Deadmines ...).
- Pathing fixes that help pets and NPCs.
- Russian creature names, quest titles and quest texts.
- README: Blizzlike stance, branches, repack.
2026-11-09 17:27:57 +00:00

28 lines
1.3 KiB
C++

#include "tc_catch2.h"
#include "ChatPackets.h"
#include "Util.h"
// CMSG_CHAT_ADDON_MESSAGE_TARGETED from client 70685 (live realm, 2026-10-29): the ForeverBots add-on whispering "hello" with prefix FBOTS
// to its own player "Karrz". The classic 1.60 layout has a second 9 bit sized string after PlayerName (as CMSG_CHAT_MESSAGE_WHISPER does);
// reading it as retail made the bit block a byte short, so PlayerName came out as "\0Karr" and the whisper hooks never ran.
TEST_CASE("CHAT_ADDON_MESSAGE_TARGETED reads the classic whisper layout", "[ChatAddonTargetedLayout]")
{
std::vector<uint8> payload = HexStrToByteVector("28280700000046424F545368656C6C6F0000000000000000030000004B6172727A00");
WorldPacket raw(CMSG_CHAT_ADDON_MESSAGE_TARGETED, payload.size());
raw.append(payload.data(), payload.size());
WorldPackets::Chat::ChatAddonMessageTargeted packet(std::move(raw));
packet.Read();
CHECK(packet.Params.Prefix == "FBOTS");
CHECK(packet.Params.Text == "hello");
CHECK(packet.Params.Type == CHAT_MSG_WHISPER);
CHECK_FALSE(packet.Params.IsLogged);
CHECK(packet.PlayerName == "Karrz");
CHECK(packet.PlayerGUID.IsEmpty());
CHECK(packet.PlayerVirtualRealmAddress == 0);
CHECK(packet.ChannelName.empty());
CHECK(packet.ChannelGUID.IsEmpty());
CHECK(packet.GetRawPacket()->rpos() == packet.GetRawPacket()->size());
}