mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
fix: show area name in SMSG_ZONE_UNDER_ATTACK system message
Replace the raw area ID in the zone-under-attack message with the
resolved area name from the zone manager, matching retail WoW behavior
('Hillsbrad Foothills is under attack!' instead of 'area 267').
This commit is contained in:
parent
eaf827668a
commit
7c5d688c00
1 changed files with 5 additions and 4 deletions
|
|
@ -2826,10 +2826,11 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
// uint32 areaId
|
||||
if (packet.getSize() - packet.getReadPos() >= 4) {
|
||||
uint32_t areaId = packet.readUInt32();
|
||||
char buf[128];
|
||||
std::snprintf(buf, sizeof(buf),
|
||||
"A zone is under attack! (area %u)", areaId);
|
||||
addSystemChatMessage(buf);
|
||||
std::string areaName = getAreaName(areaId);
|
||||
std::string msg = areaName.empty()
|
||||
? std::string("A zone is under attack!")
|
||||
: (areaName + " is under attack!");
|
||||
addSystemChatMessage(msg);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue