mirror of
https://github.com/parnic/breakables.git
synced 2025-06-17 01:41:51 -05:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
3897e6378d | |||
5e0cafd2c3 | |||
33e8bfd9b8 | |||
fee9785107 | |||
a339435212 | |||
5e4bd58d92 | |||
129875fa02 |
1
.mailmap
1
.mailmap
@ -1,3 +1,4 @@
|
||||
parnic <parnic@parnic.com> Parnic <chris@parnic.com>
|
||||
parnic <parnic@parnic.com> Parnic <parnic@parnic.com>
|
||||
parnic <parnic@parnic.com> Chris Pickett <cpickett@perniciousgames.com>
|
||||
parnic <parnic@parnic.com> root <root@parnic.com>
|
||||
|
@ -181,6 +181,7 @@ function Breakables:OnInitialize()
|
||||
buttonScale = 1,
|
||||
fontSize = 11,
|
||||
growDirection = 2,
|
||||
ignoreList = {},
|
||||
}
|
||||
}
|
||||
self.db = LibStub("AceDB-3.0"):New("BreakablesDB", self.defaults, true)
|
||||
@ -412,9 +413,9 @@ end
|
||||
local function GetIgnoreListOptions()
|
||||
local ret = {}
|
||||
|
||||
if Breakables.settings.ignoreList ~= nil then
|
||||
for k,v in pairs(Breakables.settings.ignoreList) do
|
||||
local name, _, _, _, _, _, _, _, _, texture = GetItemInfo(k)
|
||||
for k,v in pairs(Breakables.settings.ignoreList) do
|
||||
local name, _, _, _, _, _, _, _, _, texture = GetItemInfo(k)
|
||||
if texture ~= nil and name ~= nil then
|
||||
ret[k] = ("|T%s:0|t %s"):format(texture, name)
|
||||
end
|
||||
end
|
||||
@ -422,6 +423,16 @@ local function GetIgnoreListOptions()
|
||||
return ret
|
||||
end
|
||||
|
||||
local function IsIgnoringAnything()
|
||||
for k,v in pairs(Breakables.settings.ignoreList) do
|
||||
if v ~= nil then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
function Breakables:GetOptions()
|
||||
local opts = {
|
||||
name = L["Breakables"],
|
||||
@ -570,6 +581,7 @@ function Breakables:GetOptions()
|
||||
return L["Are you sure you want to remove this item from the ignore list?"]
|
||||
end,
|
||||
values = GetIgnoreListOptions,
|
||||
hidden = function() return not IsIgnoringAnything() end,
|
||||
order = 30,
|
||||
},
|
||||
clearIgnoreList = {
|
||||
@ -584,19 +596,7 @@ function Breakables:GetOptions()
|
||||
confirm = function()
|
||||
return L["Are you sure you want to clear the ignore list?"]
|
||||
end,
|
||||
disabled = function()
|
||||
if Breakables.settings.ignoreList == nil then
|
||||
return true
|
||||
end
|
||||
|
||||
for k,v in pairs(Breakables.settings.ignoreList) do
|
||||
if v ~= nil then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
hidden = function() return not IsIgnoringAnything() end,
|
||||
order = 31,
|
||||
},
|
||||
},
|
||||
@ -735,7 +735,7 @@ end
|
||||
function Breakables:GetSpellIdFromProfessionButton(itemType, itemId)
|
||||
if itemType == BREAKABLE_HERB and itemId ~= nil then
|
||||
if MassMilling[itemId] ~= nil and IsPlayerSpell(MassMilling[itemId]) then
|
||||
return MassMilling[itemId]
|
||||
--return MassMilling[itemId]
|
||||
end
|
||||
end
|
||||
|
||||
@ -787,10 +787,6 @@ end
|
||||
|
||||
local function IgnoreFunc(self, button)
|
||||
if button == "RightButton" and not InCombatLockdown() then
|
||||
if Breakables.settings.ignoreList == nil then
|
||||
Breakables.settings.ignoreList = {}
|
||||
end
|
||||
|
||||
Breakables.settings.ignoreList[self.itemId] = true
|
||||
Breakables:FindBreakables()
|
||||
LibStub("AceConfigRegistry-3.0"):NotifyChange("Breakables")
|
||||
@ -1053,7 +1049,7 @@ function Breakables:FindBreakablesInSlot(bagId, slotId)
|
||||
local texture, itemCount, locked, quality, readable = GetContainerItemInfo(bagId, slotId)
|
||||
if texture then
|
||||
local itemLink = GetContainerItemLink(bagId, slotId)
|
||||
if self.settings.ignoreList and self.settings.ignoreList[self:GetItemIdFromLink(itemLink)] then
|
||||
if self.settings.ignoreList[self:GetItemIdFromLink(itemLink)] then
|
||||
return nil
|
||||
end
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
## Interface: 70100
|
||||
## Interface: 70200
|
||||
## Author: Parnic
|
||||
## Name: Breakables
|
||||
## Title: Breakables |cff7fff7f-Ace3-|r
|
||||
|
@ -1,3 +1,10 @@
|
||||
v1.4.8:
|
||||
- Fixed error in ignored items when the ignored item had not been loaded by the server since the last restart.
|
||||
- Updated TOC for 7.2
|
||||
|
||||
v1.4.7:
|
||||
- Fixed up milling herbs that the player knows Mass Milling for. Since Mass Mill is a profession ability and not a player ability/"spell", the addon can't currently automatically cast Mass Milling.
|
||||
|
||||
v1.4.6:
|
||||
- Added MoP Sparkling Shard as a combinable object.
|
||||
- Added support for registering artifact relics as disenchantable.
|
||||
|
Reference in New Issue
Block a user