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

Update to 8.0 #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion Init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ function ns.OnLoad()
MerchantBuyBackItem:SetPoint("BOTTOMRIGHT", -7, 33)

-- The little class select dropdown show trigget a refresh
hooksecurefunc("SetMerchantFilter", function() GVS:GetScript("OnShow")(GVS) end)
hooksecurefunc("SetMerchantFilter", function()
if GVS.Merchant ~= UnitGUID("npc") then
GVS:GetScript("OnShow")(GVS)
else
GVS:GetScript("OnEvent")(GVS)
end
end)

-- Force show when we're loaded on demand and the tab is already selected
if MerchantFrame:IsVisible() and MerchantFrame.selectedTab == 1 then
Expand Down
1 change: 1 addition & 0 deletions frames/MainFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function ns.NewMainFrame()
end)
GVS:SetScript("OnEvent", Refresh)
GVS:SetScript("OnShow", function(self)
self.Merchant = UnitGUID("npc")
local max = math.max(0, GetMerchantNumItems() - NUMROWS)
scrollbar:SetMinMaxValues(0, max)
scrollbar:SetValue(0)
Expand Down
5 changes: 5 additions & 0 deletions frames/MerchantItem.lua
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ local function SetValue(self, i)
self.ItemName:SetText(text)

self.AltCurrency:SetValue(i)
if self.AltCurrency:IsShown() then
self.ItemName:SetPoint("RIGHT", self.AltCurrency, "LEFT", -GAP, 0)
else
self.ItemName:SetPoint("RIGHT", self.ItemPrice, "LEFT", -GAP, 0)
end

if extendedCost then
self.link, self.texture, self.extendedCost = link, itemTexture, true
Expand Down