From da2883cbdbd3ef634cb77932167014c6a57bc2a7 Mon Sep 17 00:00:00 2001 From: Elson Costa Date: Fri, 26 Apr 2024 11:05:19 -0300 Subject: [PATCH] updates. --- .../functions/creatures/player/player_functions.hpp | 3 +-- src/server/network/protocol/protocolgame.cpp | 11 +++++------ src/server/server_definitions.hpp | 1 - 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/lua/functions/creatures/player/player_functions.hpp b/src/lua/functions/creatures/player/player_functions.hpp index 3684cafb157..c7548edc1dd 100644 --- a/src/lua/functions/creatures/player/player_functions.hpp +++ b/src/lua/functions/creatures/player/player_functions.hpp @@ -364,8 +364,7 @@ class PlayerFunctions final : LuaScriptInterface { registerMethod(L, "Player", "addAchievementPoints", PlayerFunctions::luaPlayerAddAchievementPoints); registerMethod(L, "Player", "removeAchievementPoints", PlayerFunctions::luaPlayerRemoveAchievementPoints); - // Cyclopedia Functions - registerMethod(L, "Player", "load", PlayerFunctions::luaPlayerAddBadge); + // Badge Functions registerMethod(L, "Player", "addBadge", PlayerFunctions::luaPlayerAddBadge); GroupFunctions::init(L); diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 396e82d4ae4..9749148aebc 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -3380,9 +3380,9 @@ void ProtocolGame::sendCyclopediaCharacterBaseInformation() { msg.add(player->getLevel()); AddOutfit(msg, player->getDefaultOutfit(), false); - msg.addByte(g_configManager().getBoolean(STAMINA_SYSTEM, __FUNCTION__) ? 0x00 : 0x01); // hide stamina - msg.addByte(0x00); // Store summary & Character titles (will be 0x01) - msg.addString("", "ProtocolGame::sendCyclopediaCharacterBaseInformation - player->title()->getCurrentTitleName()"); // character title + msg.addByte(g_configManager().getBoolean(STAMINA_SYSTEM, __FUNCTION__) ? 0x01 : 0x00); // hide stamina + // msg.addByte(0x00); // Store summary & Character titles (will be 0x01) + msg.addString("", "ProtocolGame::sendCyclopediaCharacterBaseInformation - empty"); // character title // msg.addString(player->title()->getCurrentTitleName(), "ProtocolGame::sendCyclopediaCharacterBaseInformation - player->title()->getCurrentTitleName()"); // character title writeToOutputBuffer(msg); } @@ -3946,15 +3946,14 @@ void ProtocolGame::sendCyclopediaCharacterBadges() { msg.addByte(0xDA); msg.addByte(CYCLOPEDIA_CHARACTERINFO_BADGES); msg.addByte(0x00); - - msg.addByte(0x01); // ShowAccountInformation - // if ShowAccountInformation show IsOnline, IsPremium, character title, badges + msg.addByte(0x01); // ShowAccountInformation, if 0x01 will show IsOnline, IsPremium, character title, badges const auto loggedPlayer = g_game().getPlayerUniqueLogin(player->getName()); msg.addByte(loggedPlayer ? 0x01 : 0x00); // IsOnline msg.addByte(player->isPremium() ? 0x01 : 0x00); // IsPremium (GOD has always 'Premium') // Character loyalty title msg.addString(player->getLoyaltyTitle(), "ProtocolGame::sendCyclopediaCharacterBadges - player->getLoyaltyTitle()"); + // msg.addByte(0x01); // Enable badges uint8_t badgesSize = 0; auto badgesSizePosition = msg.getBufferPosition(); diff --git a/src/server/server_definitions.hpp b/src/server/server_definitions.hpp index e07916440b3..ad816b76b02 100644 --- a/src/server/server_definitions.hpp +++ b/src/server/server_definitions.hpp @@ -127,5 +127,4 @@ struct HighscoreCharacter { uint32_t rank; uint16_t level; uint8_t vocation; - uint8_t title; };