-
-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unique loot is giving error #711
Comments
You can test this code? function MonsterType.getBossReward(self, lootFactor, player_position, unique_loots)
local result = {}
if getConfigInfo("rateLoot") > 0 then
local loot = self:getLoot() or {}
for i = #loot, 0, -1 do
local lootBlock = loot[i]
if lootBlock then
local showSite = false
if lootBlock.unique or lootBlock.list then
showSite = true
end
if lootBlock.unique and lootBlock.list then -- if list with unique, block message
showSite = false
end
if lootBlock.unique then
if player_position > 0 and isInArray(unique_loots[player_position],lootBlock.itemId) then
self:createLootItem(lootBlock, lootFactor, result, showSite)
end
else
self:createLootItem(lootBlock, lootFactor, result, showSite)
end
end
end
end
return result
end |
dumb question but where i should put this code? |
Replace the one I sent with the existing one canary/data/libs/reward_boss/monster.lua Line 77 in 14189ce
|
Now there is no reward bags even. Totally no loot
|
Priority
Medium
Area
What happened?
Hello, i have problem with unique loot cuz if its true it gives error and only one character gets full loot and the rest have empty reward bag. NOTICE THAT ONLY BOSSES WITH UNIQUE LOOT GIVES THAT ERROR. OTHER REWARD BAG BOSSES ARE FINE
It gives me error like this. Its the latest release of canary(2.6.0).
Lua script error:
scriptInterface: [Scripts Interface]
scriptId: [/home/xxx/canary/data-otservbr-global/scripts/reward_chest/boss_death.lua:callback]
timerEvent: []
callbackId:[]
function: []
error [...data-otservbr-global/scripts/reward_chest/boss_death.lua:76: bad argument #1 to 'ipairs' (table expected, got nil)
stack traceback:
[C]: at 0x56494ccd4940
[C]: in function 'ipairs'
...data-otservbr-global/scripts/reward_chest/boss_death.lua:76: in function <...data-otservbr-global/scripts/reward_chest/boss_death.lua:3>
What OS are you seeing the problem on?
Linux
Code of Conduct
The text was updated successfully, but these errors were encountered: