Skip to content

Commit

Permalink
Add TSM DBRecent price source (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
mactep authored Oct 13, 2024
1 parent 618919e commit 8a19153
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions Locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ POINT_BLANK_SNIPER_LOCALES.enUS = function()
L["TUJ_REGION"] = "Region - Undermine Journal"
L["TUJ_REALM"] = "Realm - Undermine Journal"
L["TSM_DBMARKET"] = "DBMarket - TradeSkillMaster"
L["TSM_DBRECENT"] = "DBRecent - TradeSkillMaster"
L["TSM_DBREGIONMARKETAVG"] = "DBRegionMarketAvg - TradeSkillMaster"
L["TSM_DBREGIONSALEAVG"] = "DBRegionSaleAvg - TradeSkillMaster"
L["TSM_VENDORSELL"] = "VendorSell - TradeSkillMaster"
Expand Down
11 changes: 6 additions & 5 deletions Source/Constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ PointBlankSniper.Constants = {
TUJ_Region = 1,
TUJ_Realm = 2,
TSM_DBMarket = 3,
TSM_DBRegionMarketAvg = 4,
TSM_DBRegionSaleAvg = 5,
TSM_VendorSellPrice = 6,
OE_Realm = 7,
OE_Region = 8,
TSM_DBRecent = 4,
TSM_DBRegionMarketAvg = 5,
TSM_DBRegionSaleAvg = 6,
TSM_VendorSellPrice = 7,
OE_Realm = 8,
OE_Region = 9,
},
VendorBlacklist = {
38, --Recruit's Shirt (vendor version)
Expand Down
4 changes: 4 additions & 0 deletions Source/PriceCheck/Get.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ function PointBlankSniper.PriceCheck.Get()
if TSM_API then
if market == PointBlankSniper.Constants.Market.TSM_DBMarket then
return CreateAndInitFromMixin(PointBlankSniper.PriceCheck.TSMMixin, 'dbmarket', percentage)
elseif market == PointBlankSniper.Constants.Market.TSM_DBRecent then
return CreateAndInitFromMixin(PointBlankSniper.PriceCheck.TSMMixin, 'dbrecent', percentage)
elseif market == PointBlankSniper.Constants.Market.TSM_DBRegionMarketAvg then
return CreateAndInitFromMixin(PointBlankSniper.PriceCheck.TSMMixin, 'dbregionmarketavg', percentage)
elseif market == PointBlankSniper.Constants.Market.TSM_DBRegionSaleAvg then
Expand Down Expand Up @@ -45,6 +47,8 @@ function PointBlankSniper.PriceCheck.IsAvailable(marketDataType)
if TSM_API then
if marketDataType == PointBlankSniper.Constants.Market.TSM_DBMarket then
return true
elseif marketDataType == PointBlankSniper.Constants.Market.TSM_DBRecent then
return true
elseif marketDataType == PointBlankSniper.Constants.Market.TSM_DBRegionMarketAvg then
return true
elseif marketDataType == PointBlankSniper.Constants.Market.TSM_DBRegionSaleAvg then
Expand Down
1 change: 1 addition & 0 deletions Source/Tab/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ local marketToName = {
[PointBlankSniper.Constants.Market.TUJ_Region] = POINT_BLANK_SNIPER_L_TUJ_REGION,
[PointBlankSniper.Constants.Market.TUJ_Realm] = POINT_BLANK_SNIPER_L_TUJ_REALM,
[PointBlankSniper.Constants.Market.TSM_DBMarket] = POINT_BLANK_SNIPER_L_TSM_DBMARKET,
[PointBlankSniper.Constants.Market.TSM_DBRecent] = POINT_BLANK_SNIPER_L_TSM_DBRECENT,
[PointBlankSniper.Constants.Market.TSM_DBRegionMarketAvg] = POINT_BLANK_SNIPER_L_TSM_DBREGIONMARKETAVG,
[PointBlankSniper.Constants.Market.TSM_DBRegionSaleAvg] = POINT_BLANK_SNIPER_L_TSM_DBREGIONSALEAVG,
[PointBlankSniper.Constants.Market.TSM_VendorSellPrice] = POINT_BLANK_SNIPER_L_TSM_VENDORSELL,
Expand Down

0 comments on commit 8a19153

Please sign in to comment.