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

Mmkbfa #56

Open
wants to merge 3 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
4 changes: 3 additions & 1 deletion externals/size_to_fit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ function ns.SizeToFit(self)

-- Now resize ourself
local _, _, width, height = self:GetBoundsRect()
self:SetSize(width, height)
if(width ~= nil and height ~= nil) then
self:SetSize(width, height)
end
end
6 changes: 5 additions & 1 deletion frames/MerchantItem.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ local function RequiresConfirmation(index)
if not HasAllCommonBarterItems(index) then return true end
end

local alt_click_exceptions = {}
alt_click_exceptions[GetCurrencyInfo(824)] = true
-- Add any other exceptional currencies here

local function OnClick(self, button)
local id = self:GetID()
local hasaltcurrency = (GetMerchantItemCostInfo(id) > 0)
local currencyname = select(4,GetMerchantItemCostItem(id, 1))
local hasaltcurrency = ((GetMerchantItemCostInfo(id) > 0) and (alt_click_exceptions[currencyname] == nil))

if IsAltKeyDown() and not hasaltcurrency then
self:BuyItem(true)
Expand Down