Skip to content

Commit

Permalink
updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel committed Apr 26, 2024
1 parent 83c8cee commit 6e56b2e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 214 deletions.
112 changes: 0 additions & 112 deletions src/creatures/players/cyclopedia/player_cyclopedia.cpp

This file was deleted.

88 changes: 0 additions & 88 deletions src/creatures/players/cyclopedia/player_cyclopedia.hpp

This file was deleted.

11 changes: 3 additions & 8 deletions src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8500,15 +8500,10 @@ void Game::processHighscoreResults(DBResult_ptr result, uint32_t playerID, uint8
characters.reserve(result->countResults());
if (result) {
do {
uint8_t characterVocation;
const auto &voc = g_vocations().getVocation(result->getNumber<uint16_t>("vocation"));
if (voc) {
characterVocation = voc->getClientId();
} else {
characterVocation = 0;
}
// todo get char title
characters.emplace_back(std::move(result->getString("name")), result->getNumber<uint64_t>("points"), result->getNumber<uint32_t>("id"), result->getNumber<uint32_t>("rank"), result->getNumber<uint16_t>("level"), characterVocation, 0);
uint8_t characterVocation = voc ? voc->getClientId() : 0;
std::string characterTitle = "";
characters.emplace_back(std::move(result->getString("name")), result->getNumber<uint64_t>("points"), result->getNumber<uint32_t>("id"), result->getNumber<uint32_t>("rank"), result->getNumber<uint16_t>("level"), characterVocation, characterTitle);
} while (result->next());
}

Expand Down
2 changes: 1 addition & 1 deletion src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2190,7 +2190,7 @@ void ProtocolGame::sendHighscores(const std::vector<HighscoreCharacter> &charact
for (const HighscoreCharacter &character : characters) {
msg.add<uint32_t>(character.rank); // Rank
msg.addString(character.name, "ProtocolGame::sendHighscores - character.name"); // Character Name
msg.addString("", "ProtocolGame::sendHighscores - empty"); // Probably Character Title(not visible in window)
msg.addString(character.title, "ProtocolGame::sendHighscores - character.title"); // Character Title
msg.addByte(character.vocation); // Vocation Id
msg.addString(g_configManager().getString(SERVER_NAME, __FUNCTION__), "ProtocolGame::sendHighscores - g_configManager().getString(SERVER_NAME)"); // World
msg.add<uint16_t>(character.level); // Level
Expand Down
4 changes: 2 additions & 2 deletions src/server/server_definitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ 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, uint8_t title) :
HighscoreCharacter(std::string name, uint64_t points, uint32_t id, uint32_t rank, uint16_t level, uint8_t vocation, std::string title) :
name(std::move(name)),
points(points),
id(id),
Expand All @@ -128,5 +128,5 @@ struct HighscoreCharacter {
uint32_t rank;
uint16_t level;
uint8_t vocation;
uint8_t title;
std::string title;
};
3 changes: 0 additions & 3 deletions src/utils/const.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ static constexpr int32_t CHANNEL_GUILD = 0x00;
static constexpr int32_t CHANNEL_PARTY = 0x01;
static constexpr int32_t CHANNEL_PRIVATE = 0xFFFF;

// Highscore interval time to reload from database in seconds
static constexpr int64_t EVENT_HIGHSCORE_INTERVAL = 3600;

// This is in miliseconds
static constexpr int32_t EVENT_IMBUEMENT_INTERVAL = 1000;
static constexpr uint8_t IMBUEMENT_MAX_TIER = 3;
Expand Down

0 comments on commit 6e56b2e

Please sign in to comment.