Skip to content

Commit

Permalink
feat: skulled players lose store items config (opentibiabr#2046)
Browse files Browse the repository at this point in the history
Created config to enable/disable players with red/black lose store items
and moved the validation from script `blessing.lua` to config.

Fixes opentibiabr#2014

---------

Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Luan Santos <[email protected]>
Co-authored-by: Luan Santos <[email protected]>
  • Loading branch information
4 people authored Dec 28, 2023
1 parent 5b54200 commit 9609368
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ showScriptsLogInConsole = false
criticalChance = 10
inventoryGlowOnFiveBless = false
adventurersBlessingLevel = 21
skulledDeathLoseStoreItem = false
experienceDisplayRates = true
-- configure attack base on Fist Fighting skill/experience
-- multiplierSpeedOnFist * 5 (multiplies the value obtained from the player fist skill and multiplies it * 5) max 25 is recommended due minTicks limits else player stop attack
Expand Down
2 changes: 1 addition & 1 deletion data/modules/scripts/blessings/blessings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Blessings.Config = {
AdventurerBlessingLevel = configManager.getNumber(configKeys.ADVENTURERSBLESSING_LEVEL), -- Free full bless until level
HasToF = false, -- Enables/disables twist of fate
InquisitonBlessPriceMultiplier = 1.1, -- Bless price multiplied by henricus
SkulledDeathLoseStoreItem = true, -- Destroy all items on store when dying with red/blackskull
SkulledDeathLoseStoreItem = configManager.getBoolean(configKeys.SKULLED_DEATH_LOSE_STORE_ITEM), -- Destroy all items on store when dying with red/blackskull
InventoryGlowOnFiveBless = configManager.getBoolean(configKeys.INVENTORY_GLOW), -- Glow in yellow inventory items when the player has 5 or more bless,
Debug = false, -- Prin debug messages in console if enabled
}
Expand Down
1 change: 1 addition & 0 deletions src/config/config_definitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ enum ConfigKey_t : uint16_t {
SCRIPTS_CONSOLE_LOGS,
SERVER_MOTD,
SERVER_NAME,
SKULLED_DEATH_LOSE_STORE_ITEM,
SORT_LOOT_BY_CHANCE,
SQL_PORT,
STAIRHOP_DELAY,
Expand Down
1 change: 1 addition & 0 deletions src/config/configmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ bool ConfigManager::load() {
loadIntConfig(L, CRITICALCHANCE, "criticalChance", 10);

loadIntConfig(L, ADVENTURERSBLESSING_LEVEL, "adventurersBlessingLevel", 21);
loadBoolConfig(L, SKULLED_DEATH_LOSE_STORE_ITEM, "skulledDeathLoseStoreItem", false);
loadIntConfig(L, FORGE_MAX_ITEM_TIER, "forgeMaxItemTier", 10);
loadIntConfig(L, FORGE_COST_ONE_SLIVER, "forgeCostOneSliver", 20);
loadIntConfig(L, FORGE_SLIVER_AMOUNT, "forgeSliverAmount", 3);
Expand Down

0 comments on commit 9609368

Please sign in to comment.