mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
feat: parse MSG_BATTLEGROUND_PLAYER_POSITIONS and show flag carriers on minimap
Replaces the silent consume with full packet parsing: reads two lists of (guid, x, y) positions (typically ally and horde flag carriers) and stores them in bgPlayerPositions_. Renders each as a colored diamond on the minimap (blue=group0, red=group1) with a "Flag carrier" tooltip showing the player's name when available.
This commit is contained in:
parent
48cb7df4b4
commit
113be66314
3 changed files with 76 additions and 3 deletions
|
|
@ -5587,10 +5587,22 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
addUIError("Battlefield port denied.");
|
||||
addSystemChatMessage("Battlefield port denied.");
|
||||
break;
|
||||
case Opcode::MSG_BATTLEGROUND_PLAYER_POSITIONS:
|
||||
// Optional map position updates for BG objectives/players.
|
||||
packet.setReadPos(packet.getSize());
|
||||
case Opcode::MSG_BATTLEGROUND_PLAYER_POSITIONS: {
|
||||
bgPlayerPositions_.clear();
|
||||
for (int grp = 0; grp < 2; ++grp) {
|
||||
if (packet.getSize() - packet.getReadPos() < 4) break;
|
||||
uint32_t count = packet.readUInt32();
|
||||
for (uint32_t i = 0; i < count && packet.getSize() - packet.getReadPos() >= 16; ++i) {
|
||||
BgPlayerPosition pos;
|
||||
pos.guid = packet.readUInt64();
|
||||
pos.wowX = packet.readFloat();
|
||||
pos.wowY = packet.readFloat();
|
||||
pos.group = grp;
|
||||
bgPlayerPositions_.push_back(pos);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Opcode::SMSG_REMOVED_FROM_PVP_QUEUE:
|
||||
addSystemChatMessage("You have been removed from the PvP queue.");
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue