Skip to content

Commit

Permalink
feat: show loots in incomplete bestiary (#2375)
Browse files Browse the repository at this point in the history
  • Loading branch information
lamonato29 authored Mar 6, 2024
1 parent 6721bc6 commit 882bcd3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ onlyPremiumAccount = false
-- NOTE: randomMonsterSpawn = true, will enable monsters from the same spawn to be randomized between them, thus making a variable hunt
-- NOTE: enablePlayerPutItemInAmmoSlot = true, will enable players to put any items on ammo slot, more used in custom shopping system
-- NOTE: startStreakLevel will make a reward streak level for new players who never logged in
-- NOTE: if showLootsInBestiary is true, will cause all loots to be shown in the bestiary even if the player has not reached the required number of kills
stashMoving = false
depotChest = 4
autoLoot = false
Expand All @@ -255,6 +256,7 @@ lootPouchMaxLimit = 2000
storeInboxMaxLimit = 2000
enablePlayerPutItemInAmmoSlot = false
startStreakLevel = 0
showLootsInBestiary = false

-- Teleport summon
-- Set to true will never remove the summon
Expand Down
1 change: 1 addition & 0 deletions src/config/config_enums.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ enum ConfigKey_t : uint16_t {
SCRIPTS_CONSOLE_LOGS,
SERVER_MOTD,
SERVER_NAME,
SHOW_LOOTS_IN_BESTIARY,
SKULLED_DEATH_LOSE_STORE_ITEM,
SORT_LOOT_BY_CHANCE,
SQL_PORT,
Expand Down
1 change: 1 addition & 0 deletions src/config/configmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ bool ConfigManager::load() {
loadBoolConfig(L, REPLACE_KICK_ON_LOGIN, "replaceKickOnLogin", true);
loadBoolConfig(L, REWARD_CHEST_COLLECT_ENABLED, "rewardChestCollectEnabled", true);
loadBoolConfig(L, SCRIPTS_CONSOLE_LOGS, "showScriptsLogInConsole", true);
loadBoolConfig(L, SHOW_LOOTS_IN_BESTIARY, "showLootsInBestiary", false);
loadBoolConfig(L, SKULLED_DEATH_LOSE_STORE_ITEM, "skulledDeathLoseStoreItem", false);
loadBoolConfig(L, SORT_LOOT_BY_CHANCE, "sortLootByChance", false);
loadBoolConfig(L, STAMINA_PZ, "staminaPz", false);
Expand Down
4 changes: 2 additions & 2 deletions src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2334,10 +2334,10 @@ void ProtocolGame::parseBestiarysendMonsterData(NetworkMessage &msg) {
break;
}

newmsg.add<uint16_t>(shouldAddItem == true ? loot.id : 0);
newmsg.add<uint16_t>(g_configManager().getBoolean(SHOW_LOOTS_IN_BESTIARY, __FUNCTION__) || shouldAddItem == true ? loot.id : 0);
newmsg.addByte(difficult);
newmsg.addByte(0); // 1 if special event - 0 if regular loot (?)
if (shouldAddItem == true) {
if (g_configManager().getBoolean(SHOW_LOOTS_IN_BESTIARY, __FUNCTION__) || shouldAddItem == true) {
newmsg.addString(loot.name, "ProtocolGame::parseBestiarysendMonsterData - loot.name");
newmsg.addByte(loot.countmax > 0 ? 0x1 : 0x0);
}
Expand Down

0 comments on commit 882bcd3

Please sign in to comment.