Skip to content

Commit

Permalink
When the !reserves command responds around a single item, it links it
Browse files Browse the repository at this point in the history
  • Loading branch information
Anonomit committed Jul 8, 2024
1 parent 3bc9c5c commit d2f8d59
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2650,14 +2650,16 @@ function LootReserve.Server:SendReservesList(player, onlyRelevant, force, itemLi
end
else
local count = 0;
for _ in pairs(itemList or {}) do
local lastItem;
for itemID in pairs(itemList or {}) do
count = count + 1;
lastItem = LootReserve.ItemCache:Item(itemID);
end
local message;
if onlyRelevant then
message = "You currently have no reserves. To reserve an item, whisper me: !reserve ItemLinkOrName";
elseif count > 0 then
message = count > 1 and "There are currently no reserves on these items" or "There are currently no reserves on this item";
message = count > 1 and format("There are currently no reserves on these %d items", count) or format("There are currently no reserves on %s", lastItem:GetLink());
else
message = "There are currently no reserves";
end
Expand Down

0 comments on commit d2f8d59

Please sign in to comment.