mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: use zone name in battlefield entry invite message
Replace raw bfZoneId integer with getAreaName() lookup in SMSG_BATTLEFIELD_MGR_ENTRY_INVITE so players see "Wintergrasp" instead of "zone 4197" in the invitation prompt.
This commit is contained in:
parent
a9835f6873
commit
9fe2ef381c
1 changed files with 9 additions and 2 deletions
|
|
@ -7300,8 +7300,15 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
bfMgrInvitePending_ = true;
|
||||
bfMgrZoneId_ = bfZoneId;
|
||||
char buf[128];
|
||||
std::snprintf(buf, sizeof(buf),
|
||||
"You are invited to the outdoor battlefield in zone %u. Click to enter.", bfZoneId);
|
||||
std::string bfZoneName = getAreaName(bfZoneId);
|
||||
if (!bfZoneName.empty())
|
||||
std::snprintf(buf, sizeof(buf),
|
||||
"You are invited to the outdoor battlefield in %s. Click to enter.",
|
||||
bfZoneName.c_str());
|
||||
else
|
||||
std::snprintf(buf, sizeof(buf),
|
||||
"You are invited to the outdoor battlefield in zone %u. Click to enter.",
|
||||
bfZoneId);
|
||||
addSystemChatMessage(buf);
|
||||
LOG_INFO("SMSG_BATTLEFIELD_MGR_ENTRY_INVITE: zoneId=", bfZoneId);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue