Browse Source

log bag count on buyout

dev
Jørgen Lien Sellæg 4 months ago
parent
commit
33e6d6718a
  1. 2
      TradeSkillMaster/TradeSkillMaster.toc
  2. 12
      TradeSkillMaster_AuctionDB/TradeSkillMaster_AuctionDB.lua
  3. 4
      TradeSkillMaster_AuctionDB/TradeSkillMaster_AuctionDB.toc

2
TradeSkillMaster/TradeSkillMaster.toc

@ -2,7 +2,7 @@
## Title: |cff00fe00TradeSkillMaster: Revived|r ## Title: |cff00fe00TradeSkillMaster: Revived|r
## Notes: Core addon for the TradeSkillMaster suite, revived for Wrath of the Lich King. Does nothing without modules installed. ## Notes: Core addon for the TradeSkillMaster suite, revived for Wrath of the Lich King. Does nothing without modules installed.
## Author: Sapu94, Bart39, Gnomezilla [Warmane-Icecrown(A)], BlueAo [Warmane], andrew6180, Yoshiyuka, DimaSheiko, and other contributors... ## Author: Sapu94, Bart39, Gnomezilla [Warmane-Icecrown(A)], BlueAo [Warmane], andrew6180, Yoshiyuka, DimaSheiko, and other contributors...
## Version: 2.3.17 ## Version: 2.3.18
## SavedVariables: TradeSkillMasterAppDB, AscensionTSMDB ## SavedVariables: TradeSkillMasterAppDB, AscensionTSMDB
## OptionalDeps: AccurateTime, Ace3, LibDataBroker-1.1, LibDBIcon-1.0, LibExtraTip, TipHelper, LibParse, LibCompress, LibGraph-2.0, SharedMedia, TheUndermineJournal, TheUndermineJournalGE ## OptionalDeps: AccurateTime, Ace3, LibDataBroker-1.1, LibDBIcon-1.0, LibExtraTip, TipHelper, LibParse, LibCompress, LibGraph-2.0, SharedMedia, TheUndermineJournal, TheUndermineJournalGE
## X-Embeds: AccurateTime, Ace3, LibDataBroker-1.1, LibDBIcon-1.0, LibExtraTip, TipHelper, LibParse, LibCompress, LibGraph-2.0 ## X-Embeds: AccurateTime, Ace3, LibDataBroker-1.1, LibDBIcon-1.0, LibExtraTip, TipHelper, LibParse, LibCompress, LibGraph-2.0

12
TradeSkillMaster_AuctionDB/TradeSkillMaster_AuctionDB.lua

@ -236,12 +236,16 @@ function private.OnItemBought(_, data)
TSM:DecodeItemData(itemID) TSM:DecodeItemData(itemID)
local link = data.link or select(2, TSMAPI:GetSafeItemInfo(data.itemString)) or data.itemString local link = data.link or select(2, TSMAPI:GetSafeItemInfo(data.itemString)) or data.itemString
local buyoutText = data.buyout and (TSMAPI:FormatTextMoney(data.buyout, "|cffffffff", true) or "---") or "---" local buyoutText = data.buyout and (TSMAPI:FormatTextMoney(data.buyout, "|cffffffff", true) or "---") or "---"
local total = TSM.data[itemID].quantity local total = 0
local minBuyout = TSM:GetMinBuyout(itemID) local baseItemString = TSMAPI:GetBaseItemString(data.itemString)
for _, _, itemString, quantity in TSMAPI:GetBagIterator() do
if TSMAPI:GetBaseItemString(itemString) == baseItemString then
total = total + quantity
end
end
local marketValue = TSM:GetMarketValue(itemID) local marketValue = TSM:GetMarketValue(itemID)
local minText = minBuyout and (TSMAPI:FormatTextMoney(minBuyout, "|cffffffff", true) or "---") or "---"
local marketText = marketValue and (TSMAPI:FormatTextMoney(marketValue, "|cffffffff", true) or "---") or "---" local marketText = marketValue and (TSMAPI:FormatTextMoney(marketValue, "|cffffffff", true) or "---") or "---"
TSM:Printf("Bought %s for %s (x%d). items=%s dbmin=%s dbmarket=%s", link, buyoutText, data.count or 1, total and tostring(total) or "?", minText, marketText) TSM:Printf("Bought %s for %s (x%d). bags=%s dbmarket=%s", link, buyoutText, data.count or 1, tostring(total), marketText)
end end
function TSM:OnTSMDBShutdown() function TSM:OnTSMDBShutdown()

4
TradeSkillMaster_AuctionDB/TradeSkillMaster_AuctionDB.toc

@ -2,10 +2,10 @@
## Title: |cff00ff00TradeSkillMaster_AuctionDB|r ## Title: |cff00ff00TradeSkillMaster_AuctionDB|r
## Notes: Stores auction house data and calculates market prices. ## Notes: Stores auction house data and calculates market prices.
## Author: Sapu94, Bart39 ## Author: Sapu94, Bart39
## Version: 2.3.17 ## Version: 2.3.18
## SavedVariables: AscensionTSM_AuctionDB ## SavedVariables: AscensionTSM_AuctionDB
## Dependency: TradeSkillMaster ## Dependency: TradeSkillMaster
## X-Curse-Packaged-Version: 2.3.17 ## X-Curse-Packaged-Version: 2.3.18
## X-Curse-Project-Name: TradeSkillMaster_AuctionDB ## X-Curse-Project-Name: TradeSkillMaster_AuctionDB
## X-Curse-Project-ID: tradeskillmaster_auctiondb ## X-Curse-Project-ID: tradeskillmaster_auctiondb
## X-Curse-Repository-ID: wow/tradeskillmaster_auctiondb/mainline ## X-Curse-Repository-ID: wow/tradeskillmaster_auctiondb/mainline

Loading…
Cancel
Save