Skip to content

Commit

Permalink
fix: wrong getNumber param (opentibiabr#1889)
Browse files Browse the repository at this point in the history
ConfigManager::getNumber only accept config enum
  • Loading branch information
dudantas authored Nov 23, 2023
1 parent b9cf8e1 commit 2bb39d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data-canary/scripts/movements/tiles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function tile.onStepIn(creature, item, position, fromPosition)
local depotItem = playerPosition:getTile():getItemByType(ITEM_TYPE_DEPOT)
if depotItem ~= nil then
local depotItems = 0
for id = 1, configManager.getNumber("depotBoxes") do
for id = 1, configManager.getNumber(configKeys.DEPOT_BOXES) do
depotItems = depotItems + player:getDepotChest(id, true):getItemHoldingCount()
end
player:sendTextMessage(MESSAGE_FAILURE, "Your depot contains " .. depotItems .. " item" .. (depotItems > 1 and "s." or ".") .. "\
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/movements/others/tiles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function tiles.onStepIn(creature, item, position, fromPosition)

if depotItem ~= nil then
local depotItems = 0
for id = 1, configManager.getNumber("depotBoxes") do
for id = 1, configManager.getNumber(configKeys.DEPOT_BOXES) do
depotItems = depotItems + player:getDepotChest(id, true):getItemHoldingCount()
end

Expand Down

0 comments on commit 2bb39d3

Please sign in to comment.