diff --git a/src/game/game.cpp b/src/game/game.cpp index 107b67693b4..0647bccabfc 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -8537,8 +8537,8 @@ void Game::processHighscoreResults(DBResult_ptr result, uint32_t playerID, uint8 do { const auto &voc = g_vocations().getVocation(result->getNumber("vocation")); uint8_t characterVocation = voc ? voc->getClientId() : 0; - std::string characterTitle = ""; - characters.emplace_back(std::move(result->getString("name")), result->getNumber("points"), result->getNumber("id"), result->getNumber("rank"), result->getNumber("level"), characterVocation, characterTitle); + std::string loyaltyTitle = ""; // todo get loyalty title from player + characters.emplace_back(std::move(result->getString("name")), result->getNumber("points"), result->getNumber("id"), result->getNumber("rank"), result->getNumber("level"), characterVocation, loyaltyTitle); } while (result->next()); } diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 56234e20f5b..d924e0bfb0e 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -2141,8 +2141,9 @@ void ProtocolGame::sendHighscores(const std::vector &charact msg.addByte(0x00); // All data available msg.addByte(1); // Worlds - msg.addString(g_configManager().getString(SERVER_NAME, __FUNCTION__), "ProtocolGame::sendHighscores - g_configManager().getString(SERVER_NAME)"); // First World - msg.addString(g_configManager().getString(SERVER_NAME, __FUNCTION__), "ProtocolGame::sendHighscores - g_configManager().getString(SERVER_NAME)"); // Selected World + auto serverName = g_configManager().getString(SERVER_NAME, __FUNCTION__); + msg.addString(serverName, "ProtocolGame::sendHighscores - g_configManager().getString(SERVER_NAME)"); // First World + msg.addString(serverName, "ProtocolGame::sendHighscores - g_configManager().getString(SERVER_NAME)"); // Selected World msg.addByte(0); // Game World Category: 0xFF(-1) - Selected World msg.addByte(0); // BattlEye World Type @@ -2190,9 +2191,9 @@ void ProtocolGame::sendHighscores(const std::vector &charact for (const HighscoreCharacter &character : characters) { msg.add(character.rank); // Rank msg.addString(character.name, "ProtocolGame::sendHighscores - character.name"); // Character Name - msg.addString(character.title, "ProtocolGame::sendHighscores - character.title"); // Character Title + msg.addString(character.loyaltyTitle, "ProtocolGame::sendHighscores - character.loyaltyTitle"); // Character Loyalty Title msg.addByte(character.vocation); // Vocation Id - msg.addString(g_configManager().getString(SERVER_NAME, __FUNCTION__), "ProtocolGame::sendHighscores - g_configManager().getString(SERVER_NAME)"); // World + msg.addString(serverName, "ProtocolGame::sendHighscores - g_configManager().getString(SERVER_NAME)"); // World msg.add(character.level); // Level msg.addByte((player->getGUID() == character.id)); // Player Indicator Boolean msg.add(character.points); // Points diff --git a/src/server/server_definitions.hpp b/src/server/server_definitions.hpp index b689f77eaee..1d5ed5b628e 100644 --- a/src/server/server_definitions.hpp +++ b/src/server/server_definitions.hpp @@ -113,14 +113,14 @@ enum Supply_Stash_Actions_t : uint8_t { }; struct HighscoreCharacter { - HighscoreCharacter(std::string name, uint64_t points, uint32_t id, uint32_t rank, uint16_t level, uint8_t vocation, std::string title) : + HighscoreCharacter(std::string name, uint64_t points, uint32_t id, uint32_t rank, uint16_t level, uint8_t vocation, std::string loyaltyTitle) : name(std::move(name)), points(points), id(id), rank(rank), level(level), vocation(vocation), - title(std::move(title)) { } + loyaltyTitle(std::move(loyaltyTitle)) { } std::string name; uint64_t points; @@ -128,5 +128,5 @@ struct HighscoreCharacter { uint32_t rank; uint16_t level; uint8_t vocation; - std::string title; + std::string loyaltyTitle; };