diff --git a/BastionLoot.toc b/BastionLoot.toc index b24dc2e..87d3ebd 100644 --- a/BastionLoot.toc +++ b/BastionLoot.toc @@ -2,7 +2,7 @@ ## Author: Roadblock ## Title: BastionLoot ## Notes: In-game EPGP loot helper, supports standby, main/alt shared pool, minEP, offpecGP. Pluggable price list. Alternative +wincount mode. -## Version: 4.3.1 +## Version: 4.3.2 ## X-Alpha: ## X-Website: https://github.com/Road-block/BastionLoot/releases/latest ## OptionalDeps: Ace3, MizusRaidTracker diff --git a/BastionLoot_Cata.toc b/BastionLoot_Cata.toc index b24dc2e..87d3ebd 100644 --- a/BastionLoot_Cata.toc +++ b/BastionLoot_Cata.toc @@ -2,7 +2,7 @@ ## Author: Roadblock ## Title: BastionLoot ## Notes: In-game EPGP loot helper, supports standby, main/alt shared pool, minEP, offpecGP. Pluggable price list. Alternative +wincount mode. -## Version: 4.3.1 +## Version: 4.3.2 ## X-Alpha: ## X-Website: https://github.com/Road-block/BastionLoot/releases/latest ## OptionalDeps: Ace3, MizusRaidTracker diff --git a/Locales/enUS.lua b/Locales/enUS.lua index 3c157bb..0b6138f 100644 --- a/Locales/enUS.lua +++ b/Locales/enUS.lua @@ -591,5 +591,6 @@ You can also whisper |cffffd200!PR Name|r to any EPGP admin online to get back i L["Show Selected Item"] = true L["Use GP Button to Set"] = true L["%s removed from Favorites"] = true + L["|cff00ff00Upgradeable:|r"] = true bepgp.L = L diff --git a/Locales/zhCN.lua b/Locales/zhCN.lua index f3d47be..3be9cd8 100644 --- a/Locales/zhCN.lua +++ b/Locales/zhCN.lua @@ -585,5 +585,6 @@ You can whisper |cffffd200!PR Name|r to any higher rank guild member with the ad L["Show Selected Item"] = "Show Selected Item" -- needs translation L["Use GP Button to Set"] = "Use GP Button to Set" -- needs translation L["%s removed from Favorites"] = "%s removed from Favorites" -- needs translation + L["|cff00ff00Upgradeable:|r"] = "|cff00ff00Upgradeable:|r" -- needs translation bepgp.L = L diff --git a/Locales/zhTW.lua b/Locales/zhTW.lua index f340310..cd69148 100644 --- a/Locales/zhTW.lua +++ b/Locales/zhTW.lua @@ -585,5 +585,6 @@ You can whisper |cffffd200!PR Name|r to any higher rank guild member with the ad L["Show Selected Item"] = "Show Selected Item" -- needs translation L["Use GP Button to Set"] = "Use GP Button to Set" -- needs translation L["%s removed from Favorites"] = "%s removed from Favorites" -- needs translation + L["|cff00ff00Upgradeable:|r"] = "|cff00ff00Upgradeable:|r" -- needs translation bepgp.L = L diff --git a/Modules/tokens_cata.lua b/Modules/tokens_cata.lua index b4e6481..b35f253 100644 --- a/Modules/tokens_cata.lua +++ b/Modules/tokens_cata.lua @@ -6,6 +6,29 @@ local L = LibStub("AceLocale-3.0"):GetLocale(addonName) local tokens = {} -- item = token local rewards = {} -- token = items local last_reward_flipped = {} -- token = reward +local item_upgrades = {} -- baseitemid = token +-- crystallized firestone for now +item_upgrades[68915] = 71617 +item_upgrades[68972] = 71617 +item_upgrades[70929] = 71617 +item_upgrades[70939] = 71617 +item_upgrades[71146] = 71617 +item_upgrades[71147] = 71617 +item_upgrades[71148] = 71617 +item_upgrades[71149] = 71617 +item_upgrades[71150] = 71617 +item_upgrades[71151] = 71617 +item_upgrades[71152] = 71617 +item_upgrades[71154] = 71617 +item_upgrades[71218] = 71617 +item_upgrades[71359] = 71617 +item_upgrades[71360] = 71617 +item_upgrades[71361] = 71617 +item_upgrades[71362] = 71617 +item_upgrades[71365] = 71617 +item_upgrades[71366] = 71617 +item_upgrades[71367] = 71617 +item_upgrades[71640] = 71617 -- T11.359 (normal) rewards[63682] = { 60341,60351, 60277,60282,60286, 60243, 60299 } -- Helm of the Forlorn Vanquisher (dk/druid/mage/rogue) @@ -113,6 +136,17 @@ function bepgp_tokens_cata:GetToken(reward) return tokens[reward] or nil end +function bepgp_tokens_cata:ItemUpgradeString(baseItem) + if not (type(baseItem)=="number" or type(baseItem)=="string") then return end + local baseitemID = bepgp.GetItemInfoInstant(baseItem) + if not baseitemID then return end + local tokenID = item_upgrades[baseitemID] + if not tokenID then return end + local _,_,_,_,icon = bepgp.GetItemInfoInstant(tokenID) + local markup = item_icon_markup[icon] + return string.format("%s +%s",L["|cff00ff00Upgradeable:|r"],(markup or tokenID)) +end + function bepgp_tokens_cata:RewardItemString(tokenItem) if not (type(tokenItem)=="number" or type(tokenItem)=="string") then return end local tokenID = bepgp.GetItemInfoInstant(tokenItem) @@ -181,6 +215,7 @@ function bepgp_tokens_cata:CoreInit() self:cacheTokens() bepgp.TokensItemString = self.TokensItemString bepgp.RewardItemString = self.RewardItemString + bepgp.ItemUpgradeString = self.ItemUpgradeString if not self._initDone then self:delayInit() end diff --git a/core.lua b/core.lua index d1d4fc1..f4eac9d 100644 --- a/core.lua +++ b/core.lua @@ -62,6 +62,7 @@ bepgp.VARS = { osgp = L["Offspec GP"], bankde = L["Bank-D/E"], unassigned = C:Red(L["Unassigned"]), + crystalfirestone = 71617, autoloot = { [40752] = "BadgeHero", [101] = "currency", @@ -2271,7 +2272,7 @@ function bepgp:templateCache(id) local data = self.data local loot_indices = data.loot_indices local item_id = data[loot_indices.item_id] - if item_id == 71617 then -- Crystallized Firestone + if bepgp.VARS.crystalfirestone and (item_id == bepgp.VARS.crystalfirestone) then -- Crystallized Firestone data.firestoneData = data.firestoneData or {} data.firestoneData.Items = bepgp:getFirestoneItems((data[loot_indices.class] or "UNKNOWN"), data) else @@ -3598,16 +3599,24 @@ function bepgp:AddTipInfo(tooltip,...) if tipOptionGroup.favinfo and favorite then tooltip:AddLine(self._favmap[favorite]) end - if tipOptionGroup.tkninfo and self.TokensItemString and self.RewardItemString then - wipe(item_swaps) - local required_line = self:TokensItemString(itemid) - local reward_line = self:RewardItemString(itemid) - if required_line then - tooltip:AddDoubleLine(_G.CTRL_KEY,_G.SOURCE..required_line) - item_swaps[itemid] = required_line - elseif reward_line then - tooltip:AddDoubleLine(_G.CTRL_KEY,L["Token for:"]..reward_line) - item_swaps[itemid] = reward_line + if tipOptionGroup.tkninfo then + if self.ItemUpgradeString then + local token_markup = self:ItemUpgradeString(itemid) + if token_markup then + tooltip:AddDoubleLine(" ",token_markup) + end + end + if self.TokensItemString and self.RewardItemString then + wipe(item_swaps) + local required_line = self:TokensItemString(itemid) + local reward_line = self:RewardItemString(itemid) + if required_line then + tooltip:AddDoubleLine(_G.CTRL_KEY,_G.SOURCE..required_line) + item_swaps[itemid] = required_line + elseif reward_line then + tooltip:AddDoubleLine(_G.CTRL_KEY,L["Token for:"]..reward_line) + item_swaps[itemid] = reward_line + end end end if tipOptionGroup.useinfo and (type(useful)=="table" and #(useful)>0) then @@ -5059,7 +5068,7 @@ function bepgp:getFirestoneItems(enClass, dialogData) name = "Crystallized Firestone ".. TURN_IN_QUEST, order = 0, } - local itemAsync = Item:CreateFromItemID(71617) -- Crystallized Firestone id + local itemAsync = Item:CreateFromItemID(bepgp.VARS.crystalfirestone) -- Crystallized Firestone id itemAsync:ContinueOnItemLoad(function() local itemLink = itemAsync:GetItemLink() local itemName = itemAsync:GetItemName()