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

Bug causing equipment tooltip to break #3

Closed
mcdonnelldean opened this issue Feb 20, 2017 · 4 comments
Closed

Bug causing equipment tooltip to break #3

mcdonnelldean opened this issue Feb 20, 2017 · 4 comments
Assignees
Labels

Comments

@mcdonnelldean
Copy link
Owner

Reported on ESOUI: http://www.esoui.com/downloads/info1616-PadMerchant.html#comments

I'm afraid you're addon has broken the equipped items tooltips. But, I came across this issue on Votan's addons, and he found a solution. I've applied the small change to your addon, and the issue is gone.

Basically in Tooltips.lua update your IntegrateWith function to be like the below (basically added a "local result" to the Wrapper function):

Lua Code:

-- Integrates with the given tooltip panel.
local function IntegrateWith(tooltip)
    local method = "LayoutItem"
    local original = tooltip[method]
    
    -- The wrapper will call the old method first, we 
    -- will add our data at the bottom of the list.
    local function Wrapper(self, itemLink, ...)
        local result = original(self, itemLink, ...)
        AddData(self, itemLink)
        return result
    end
 
    tooltip[method] = Wrapper
end
@mcdonnelldean mcdonnelldean self-assigned this Feb 20, 2017
@mcdonnelldean
Copy link
Owner Author

Need to investigate this too. Could not verify since the server is down. Also need to confirm if result should be returned from original or AddData.

@mcdonnelldean
Copy link
Owner Author

Should probably be returning the tooltip from AddData https://github.com/mcdonnelldean/eso-pad-merchant/blob/master/PadMerchant/addon/Tooltips.lua#L52

@mcdonnelldean
Copy link
Owner Author

Update: checked equipped item tooltips and they seem fine. Asked for more info from the person who created the issue. Will do more intensive testing tonight.

@mcdonnelldean
Copy link
Owner Author

Fixed in #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant