Compare commits

...

16 Commits

Author SHA1 Message Date
bb3316cad3 Fix 11.1.5 error, update TOC
Fixes #15
2025-04-26 16:36:46 -05:00
b2c12901f6 Update TOCs 2025-04-02 07:26:42 -05:00
3c7f556780 Update TOCs 2025-02-23 14:01:22 -06:00
33679a0e57 Update Breakables.toc (#14) 2025-02-23 12:51:46 -06:00
ab8c9eb427 Update TOCs 2024-12-20 22:19:14 -06:00
98a73a1872 Update changelog 2024-11-13 08:52:25 -06:00
85280456af Bump interface for SoD and Retail (#13) 2024-11-13 08:50:25 -06:00
e388f5243e Bump interface for Cata (#12) 2024-11-05 08:09:25 -06:00
d24498372b Fix another 11.0.2 error
Fixes #10
2024-08-14 16:18:29 -05:00
89191ad299 Fix error from 11.0.2 2024-08-14 13:34:16 -05:00
96cac06743 Update TOC for TWW 2024-08-14 10:19:33 -05:00
10da683630 Update TOC for Classic-era 2024-07-25 22:38:47 -05:00
2a0ad73b5f Update TOC for 11.0 2024-07-24 09:23:30 -05:00
71ee74a273 Update changelog 2024-07-21 14:07:53 -05:00
76fa35ef02 Use checkout v4 2024-07-21 13:47:22 -05:00
dd746f2800 Initial TWW compatibility 2024-06-22 18:14:41 -05:00
4 changed files with 98 additions and 13 deletions

View File

@ -32,7 +32,7 @@ jobs:
# we first have to clone the AddOn project, this is a required step # we first have to clone the AddOn project, this is a required step
- name: Clone project - name: Clone project
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 0 # gets git history for changelogs fetch-depth: 0 # gets git history for changelogs

View File

@ -34,6 +34,25 @@ if C_Container then
end end
end end
local GetSpellInfo = GetSpellInfo
if not GetSpellInfo and C_Spell and C_Spell.GetSpellInfo then
GetSpellInfo = function(id)
if not id then
return nil
end
local info = C_Spell.GetSpellInfo(id)
if info then
return info.name, nil, info.iconID
end
end
end
local IsUsableSpell = IsUsableSpell
if not IsUsableSpell and C_Spell and C_Spell.IsSpellUsable then
IsUsableSpell = C_Spell.IsSpellUsable
end
local EQUIPPED_LAST = EQUIPPED_LAST local EQUIPPED_LAST = EQUIPPED_LAST
if not EQUIPPED_LAST then if not EQUIPPED_LAST then
EQUIPPED_LAST = INVSLOT_LAST_EQUIPPED EQUIPPED_LAST = INVSLOT_LAST_EQUIPPED
@ -508,7 +527,11 @@ function Breakables:OnDisable()
end end
function Breakables:OnSlashCommand(input) function Breakables:OnSlashCommand(input)
if InterfaceOptionsFrame_OpenToCategory then
InterfaceOptionsFrame_OpenToCategory(self.optionsFrame) InterfaceOptionsFrame_OpenToCategory(self.optionsFrame)
else
Settings.OpenToCategory("Breakables")
end
end end
function Breakables:OnItemReceived(event, bag) function Breakables:OnItemReceived(event, bag)
@ -1490,10 +1513,12 @@ function Breakables:FindBreakablesInSlot(bagId, slotId)
local tooltipData local tooltipData
if C_TooltipInfo then if C_TooltipInfo then
tooltipData = C_TooltipInfo.GetBagItem(bagId, slotId) tooltipData = C_TooltipInfo.GetBagItem(bagId, slotId)
if TooltipUtil and TooltipUtil.SurfaceArgs then
TooltipUtil.SurfaceArgs(tooltipData) TooltipUtil.SurfaceArgs(tooltipData)
for _, line in ipairs(tooltipData.lines) do for _, line in ipairs(tooltipData.lines) do
TooltipUtil.SurfaceArgs(line) TooltipUtil.SurfaceArgs(line)
end end
end
else else
self.myTooltip:SetBagItem(bagId, slotId) self.myTooltip:SetBagItem(bagId, slotId)
end end
@ -1593,9 +1618,13 @@ function Breakables:PlayerHasSkillToPickItem(bagId, slotId)
return true return true
end end
if TooltipUtil and TooltipUtil.SurfaceArgs then
TooltipUtil.SurfaceArgs(tooltipData) TooltipUtil.SurfaceArgs(tooltipData)
end
for _, line in ipairs(tooltipData.lines) do for _, line in ipairs(tooltipData.lines) do
if TooltipUtil and TooltipUtil.SurfaceArgs then
TooltipUtil.SurfaceArgs(line) TooltipUtil.SurfaceArgs(line)
end
if line.leftText == LOCKED then if line.leftText == LOCKED then
return not (line.leftColor and line.leftColor.r == 1 and line.leftColor.g < 0.2 and line.leftColor.b < 0.2) return not (line.leftColor and line.leftColor.r == 1 and line.leftColor.g < 0.2 and line.leftColor.b < 0.2)
end end
@ -1676,7 +1705,12 @@ function Breakables:IsInEquipmentSet(itemId)
end end
function Breakables:GetItemIdFromLink(itemLink) function Breakables:GetItemIdFromLink(itemLink)
local _, foundItemId = strsplit(":", itemLink) local _, num1, num2 = strsplit(":", itemLink)
local foundItemId = num1
-- support new item link format that adds a new : section in front
if not tonumber(foundItemId) then
foundItemId = num2
end
return tonumber(foundItemId) return tonumber(foundItemId)
end end
@ -1701,7 +1735,7 @@ function Breakables:SortBreakables(foundBreakables)
local iId = self:GetItemIdFromLink(foundBreakables[i][IDX_LINK]) local iId = self:GetItemIdFromLink(foundBreakables[i][IDX_LINK])
for j=i,#foundBreakables do for j=i,#foundBreakables do
local jId = self:GetItemIdFromLink(foundBreakables[j][IDX_LINK]) local jId = self:GetItemIdFromLink(foundBreakables[j][IDX_LINK])
if iId < jId then if iId > jId then
local temp = foundBreakables[i] local temp = foundBreakables[i]
foundBreakables[i] = foundBreakables[j] foundBreakables[i] = foundBreakables[j]
foundBreakables[j] = temp foundBreakables[j] = temp

View File

@ -1,9 +1,9 @@
## Interface: 100207 ## Interface: 110105
## Interface-Retail: 100207 ## Interface-Retail: 110105
## Interface-Classic: 11502 ## Interface-Classic: 11507
## Interface-BCC: 20504 ## Interface-BCC: 20504
## Interface-Wrath: 30403 ## Interface-Wrath: 30403
## Interface-Cata: 40400 ## Interface-Cata: 40402
## Author: Parnic ## Author: Parnic
## Name: Breakables ## Name: Breakables
## Title: Breakables |cff7fff7f-Ace3-|r ## Title: Breakables |cff7fff7f-Ace3-|r
@ -20,6 +20,17 @@
## X-Curse-Project-ID: 16629 ## X-Curse-Project-ID: 16629
## X-WoWI-ID: 17929 ## X-WoWI-ID: 17929
## X-Wago-ID: rkGrlA6y ## X-Wago-ID: rkGrlA6y
## Category-enUS: Professions
## Category-deDE: Berufe
## Category-esES: Profesiones
## Category-esMX: Profesiones
## Category-frFR: Métiers
## Category-itIT: Professioni
## Category-koKR: 전문 기술
## Category-ptBR: Profissões
## Category-ruRU: Профессии
## Category-zhCN: 专业
## Category-zhTW: 專業技能
#@no-lib-strip@ #@no-lib-strip@
embeds.xml embeds.xml

View File

@ -1,3 +1,43 @@
v1.10.8:
- Support WoW 11.1.5 (fixes #15)
- Update TOC
v1.10.7:
- Update TOCs
v1.10.6:
- Update TOCs
v1.10.5:
- Update TOCs
v1.10.4:
- Update Cataclysm Classic TOC to 4.4.1
- Update Classic-era TOC for 1.15.4
- Update TWW TOC for 11.0.5
v1.10.3:
- Fix another error from 11.0.2
v1.10.2:
- Fix error from 11.0.2
v1.10.1:
- Update Classic-era TOC for 1.15.3
- Update TOC for TWW
v1.10.0:
- Support The War Within/11.0
v1.9.26: v1.9.26:
- Update Dragonflight TOC for 10.2.7 - Update Dragonflight TOC for 10.2.7