Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Bruce Schneier can accurately calculate in advance how long a software project will take.
  • Loading branch information
opussf committed Nov 9, 2023
2 parents ffc1dd6 + 6c8c440 commit 323e372
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/INEED.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function INEED.OnLoad()
INEED_Frame:RegisterEvent("ADDON_LOADED")
INEED_Frame:RegisterEvent("BAG_UPDATE")
INEED_Frame:RegisterEvent("MERCHANT_SHOW")
INEED_Frame:RegisterEvent("MERCHANT_CLOSED")
INEED_Frame:RegisterEvent("MAIL_SHOW")
INEED_Frame:RegisterEvent("PLAYER_ENTERING_WORLD")
INEED_Frame:RegisterEvent("CURRENCY_DISPLAY_UPDATE")
Expand Down Expand Up @@ -372,6 +373,7 @@ end
function INEED.MERCHANT_SHOW()
-- Event handler. Autopurchase
--local numItems = GetMerchantNumItems()
INEED.isMerchantOpen = true
local purchaseAmount = 0
local msgSent = false
for i = 0, GetMerchantNumItems() do -- Go through the items for sale
Expand Down Expand Up @@ -456,6 +458,9 @@ function INEED.MERCHANT_SHOW()
BuyMerchantItem(index {, quantity});
]]--
end
function INEED.MERCHANT_CLOSED()
INEED.isMerchantOpen = nil
end
function INEED.PLAYER_MONEY()
-- PLAYER_MONEY has changed
if INEED_account.percent then -- look to see if need to add to balance
Expand Down Expand Up @@ -721,6 +726,9 @@ function INEED.addItem( itemLink, quantity )
INEED.clearData()
end
end
if INEED.isMerchantOpen then
INEED.MERCHANT_SHOW() -- Allow a newly added item to trigger a purchase with
end
return itemLink -- return early
end
local enchantID = INEED.getEnchantIdFromLink( itemLink )
Expand Down

0 comments on commit 323e372

Please sign in to comment.