diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index f41a978b..7829ca67 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -21936,7 +21936,7 @@ void GameHandler::handleSummonRequest(network::Packet& packet) { if (packet.getSize() - packet.getReadPos() < 16) return; summonerGuid_ = packet.readUInt64(); - /*uint32_t zoneId =*/ packet.readUInt32(); + uint32_t zoneId = packet.readUInt32(); uint32_t timeoutMs = packet.readUInt32(); summonTimeoutSec_ = timeoutMs / 1000.0f; pendingSummonRequest_= true; @@ -21946,6 +21946,11 @@ void GameHandler::handleSummonRequest(network::Packet& packet) { if (auto* unit = dynamic_cast(entity.get())) { summonerName_ = unit->getName(); } + if (summonerName_.empty()) { + auto nit = playerNameCache.find(summonerGuid_); + if (nit != playerNameCache.end()) + summonerName_ = nit->second; + } if (summonerName_.empty()) { char tmp[32]; std::snprintf(tmp, sizeof(tmp), "0x%llX", @@ -21953,9 +21958,14 @@ void GameHandler::handleSummonRequest(network::Packet& packet) { summonerName_ = tmp; } - addSystemChatMessage(summonerName_ + " is summoning you."); + std::string msg = summonerName_ + " is summoning you"; + std::string zoneName = getAreaName(zoneId); + if (!zoneName.empty()) + msg += " to " + zoneName; + msg += '.'; + addSystemChatMessage(msg); LOG_INFO("SMSG_SUMMON_REQUEST: summoner=", summonerName_, - " timeout=", summonTimeoutSec_, "s"); + " zoneId=", zoneId, " timeout=", summonTimeoutSec_, "s"); } void GameHandler::acceptSummon() { @@ -22001,6 +22011,11 @@ void GameHandler::handleTradeStatus(network::Packet& packet) { if (auto* unit = dynamic_cast(entity.get())) { tradePeerName_ = unit->getName(); } + if (tradePeerName_.empty()) { + auto nit = playerNameCache.find(tradePeerGuid_); + if (nit != playerNameCache.end()) + tradePeerName_ = nit->second; + } if (tradePeerName_.empty()) { char tmp[32]; std::snprintf(tmp, sizeof(tmp), "0x%llX",