Compare commits

...

7 Commits
1.4.6 ... 1.4.8

Author SHA1 Message Date
3897e6378d Updated TOC to 7.2 2017-03-28 14:28:18 -05:00
5e0cafd2c3 Fixed reported error 2017-03-09 09:07:08 -06:00
33e8bfd9b8 Update mailmap 2017-02-02 16:41:40 -06:00
fee9785107 Updated changelog 2016-11-26 01:08:39 -06:00
a339435212 Disabled Mass Milling
Didn't mean to commit this local testing change. Mass Milling can't be easily automated right now since it's a profession skill.
2016-11-25 23:34:52 -06:00
5e4bd58d92 Set default value for ignoreList array 2016-11-25 19:21:16 -06:00
129875fa02 Hide ignore list from options if not ignoring anything 2016-11-23 11:21:10 -06:00
4 changed files with 27 additions and 23 deletions

View File

@ -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>

View File

@ -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

View File

@ -1,4 +1,4 @@
## Interface: 70100
## Interface: 70200
## Author: Parnic
## Name: Breakables
## Title: Breakables |cff7fff7f-Ace3-|r

View File

@ -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.