Larsj02 / Remix-Gem-Helper

1 stars 5 forks source link

Cloak tooltip #15

Closed Dairyman closed 3 months ago

Dairyman commented 3 months ago

You can https://github.com/Larsj02/Remix-Gem-Helper/blob/d7038cfddc0f2c69183af51bcb124768143f8770/CloakTooltip.lua#L22-L31 change with

local function updateItemTooltip(tooltip, tooltipData)
    if tooltipData.id ~= const.CLOAK_BUFF.ITEM_ID or not tooltipData.guid then return end
    local guid = tooltipData.guid
    if not guid or not C_Item.IsItemGUIDInInventory(guid) then return end

    tooltip.TextLeft1:SetText((tooltip.TextLeft1:GetText() or "") .. getCloakLevel())
    local stats = getCloakStats()
    if stats then
        tooltip.TextLeft2:SetText((tooltip.TextLeft2:GetText() or "").. "\n" .. stats)
    end
end

Simpler check if it is the cloak and check if it yours so it does not display your stats on other players cloaks. Plus a check for stats as this can be nil when you do not wear the cloak.

Larsj02 commented 3 months ago

Thanks add this

Larsj02 commented 3 months ago

In the future if you wanna update stuff you can also just make a pull request and i'll take a look :)