Skip to content

Commit

Permalink
workaround for lore equip items returning wrong ID from advloot
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKumaPants committed Apr 16, 2024
1 parent d523bdc commit 75b13e5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions core/evaluate.lua
Expand Up @@ -64,6 +64,19 @@ evaluate.check_loot_conditions = function(item, loot_helpers, loot_conditions, s
-- this is an advlootitem
if item.Index and item.ID() then
condition_item = Item:new(nil, database.QueryDatabaseForItemId(item.ID()))

if not condition_item.item_db then
Write.Error("Item id \at%s\ax does not exist", item.ID())
condition_item = Item:new(nil, database.QueryDatabaseForItemName(item.Name()))
end

if not condition_item.item_db then
Write.Error("Item \at%s\ax does not exist", item.Name())
end

if not condition_item.item_db then
return nil
end
end
local success, result = pcall(func, condition_item)
if success and result then
Expand Down

0 comments on commit 75b13e5

Please sign in to comment.