Skip to content
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

Close #209: Click for tooltip #215

Merged
merged 5 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions Features/ItemLoot/ItemLoot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ end

local function IsBetterThanEquipped(info)
-- Highlight Better Than Equipped
if G_RLF.db.global.itemHighlights.betterThanEquipped then
if G_RLF.db.global.itemHighlights.betterThanEquipped and info:IsEligibleEquipment() then
local equippedLink
local slot = G_RLF.equipSlotMap[info.itemEquipLoc]
if type(slot) == "table" then
for _, s in ipairs(slot) do
equippedLink = GetInventoryItemLink("player", s)
Expand All @@ -100,20 +101,17 @@ local function IsBetterThanEquipped(info)
end

if equippedInfo.itemLevel and equippedInfo.itemLevel < info.itemLevel then
self.highlight = true
return
return true
elseif equippedInfo.itemLevel == info.itemLevel then
local statDelta = C_Item.GetItemStatDelta(equippedLink, info.itemLink)
for k, v in pairs(statDelta) do
-- Has a Tertiary Stat
if k:find("ITEM_MOD_CR_") and v > 0 then
self.highlight = true
return
return true
end
-- Has a Gem Socket
if k:find("EMPTY_SOCKET_") and v > 0 then
self.highlight = true
return
return true
end
end
end
Expand Down Expand Up @@ -338,6 +336,13 @@ function ItemLoot:CHAT_MSG_LOOT(eventName, ...)
local sanitizedPlayerName = (playerName or playerName2):gsub("%-.+", "")
local unit = self.nameUnitMap[sanitizedPlayerName]
if not unit then
G_RLF:LogDebug(
"Party Loot Ignored - no matching party member (" .. sanitizedPlayerName .. ")",
"WOWEVENT",
self.moduleName,
"",
msg
)
return
end
local itemLink = msg:match("|c%x+|Hitem:.-|h%[.-%]|h|r")
Expand Down
Loading
Loading