Skip to content

Commit

Permalink
Fix search bar in Reserves window
Browse files Browse the repository at this point in the history
  • Loading branch information
Anonomit committed Jun 4, 2024
1 parent 75705c1 commit 51ee146
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ function LootReserve.Client:StartSession(server, starting, startTime, acceptingR
if child.Loot then
for _, item in ipairs(child.Loot) do
if item ~= 0 then
local itemID = LootReserve.ItemCache(item):GetID();
item = LootReserve.ItemCache(item);
local itemID = item:GetID();
if LootReserve.ItemConditions:TestServer(itemID) then
if LootReserve.Data:IsTokenReward(itemID) then
table.insert(rewardIDs, itemID);
Expand Down
3 changes: 2 additions & 1 deletion ItemSearch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ function LootReserve.ItemSearch:Load()
if not category.Expansion or category.Expansion <= expansion then
for _, child in ipairs(category.Children or { }) do
for _, item in ipairs(child.Loot or { }) do
local itemID = LootReserve.ItemCache(item):GetID();
item = LootReserve.ItemCache(item);
local itemID = item:GetID();
if not alreadyAddedIDs[itemID] then
itemsToCache[#itemsToCache+1] = itemID;
alreadyAddedIDs[itemID] = true;
Expand Down
3 changes: 2 additions & 1 deletion Server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,8 @@ function LootReserve.Server:PrepareSession()
if child.Loot then
for _, item in ipairs(child.Loot) do
if item ~= 0 then
local itemID = LootReserve.ItemCache(item):GetID();
item = LootReserve.ItemCache(item);
local itemID = item:GetID();
if LootReserve.ItemConditions:TestServer(itemID) then
if LootReserve.Data:IsTokenReward(itemID) then
table.insert(rewardIDs, itemID);
Expand Down
3 changes: 2 additions & 1 deletion Windows/ClientWindow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ function LootReserve.Client:UpdateLootList()
end
if child.Loot then
for _, item in ipairs(child.Loot) do
local itemID = LootReserve.ItemCache(item):GetID();
item = LootReserve.ItemCache(item);
local itemID = item:GetID();
if itemID ~= 0 and not alreadyFoundIDs[itemID] then
local match = false;
if item:IsCached() then
Expand Down
3 changes: 2 additions & 1 deletion Windows/ServerLootEditWindow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ function LootReserve.Server.LootEdit:UpdateLootList()
end
if child.Loot then
for _, item in ipairs(child.Loot) do
local itemID = LootReserve.ItemCache(item):GetID();
item = LootReserve.ItemCache(item);
local itemID = item:GetID();
if itemID ~= 0 and not alreadyFoundIDs[itemID] then
local match = false;
if item:IsCached() then
Expand Down

0 comments on commit 51ee146

Please sign in to comment.