Skip to content

Commit

Permalink
更新插件到最新版本
Browse files Browse the repository at this point in the history
  • Loading branch information
qyh214 committed Dec 1, 2014
1 parent cb0e170 commit 187f5aa
Show file tree
Hide file tree
Showing 517 changed files with 51,170 additions and 3,666 deletions.
6 changes: 3 additions & 3 deletions AddOns/AdiBags/AdiBags.toc
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
## Interface: 60000
## X-Curse-Packaged-Version: v1.7.10
## X-Curse-Packaged-Version: v1.7.12
## X-Curse-Project-Name: AdiBags
## X-Curse-Project-ID: adibags
## X-Curse-Repository-ID: wow/adibags/mainline

## Title: AdiBags
## Notes: Adirelle's bag addon.
## Author: Adirelle
## Version: v1.7.10
## Version: v1.7.12
## SavedVariables: AdiBagsDB
## X-Date: 2014-11-10T13:55:41Z
## X-Date: 2014-11-18T06:42:24Z
## OptionalDeps: LibStub, CallbackHandler-1.0, Ace3, LibBabble-Inventory-3.0, LibSharedMedia-3.0, LibItemUpgradeInfo-1.0, Scrap, BrainDead, !BugGrabber, SyLevel
#@alpha@
# ## OptionalDeps: AdiDebug, BugSack, Swatter
Expand Down
12 changes: 12 additions & 0 deletions AddOns/AdiBags/Changelog-AdiBags-v1.7.12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
tag v1.7.12
8c9c9b01224d3ac10403f8c68d18adf80b8010a3
Adirelle <[email protected]>
2014-11-18 07:42:33 +0100

Bugfix.


--------------------

Adirelle:
- Missing comma, whoopsy.
7 changes: 4 additions & 3 deletions AddOns/AdiBags/config/Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ do
set = function(info, value)
addon.db.profile[data.dbKey][name] = value
if value then module:Enable() else module:Disable() end
self:UpdateFilters()
end,
},
}
Expand Down Expand Up @@ -258,7 +259,7 @@ local function GetOptions()
name = addonName..' DEV',
--@end-debug@]===]
--@non-debug@
name = addonName..' v1.7.10',
name = addonName..' v1.7.12',
--@end-non-debug@
type = 'group',
handler = addon:GetOptionHandler(addon),
Expand Down Expand Up @@ -633,9 +634,9 @@ local function GetOptions()
},
plugins = {}
}
addon.OnModuleCreated = OnModuleCreated
hooksecurefunc(addon, "OnModuleCreated", OnModuleCreated)
for name, module in addon:IterateModules() do
addon:OnModuleCreated(module)
OnModuleCreated(addon, module)
end
UpdateFilterOrder()

Expand Down
2 changes: 1 addition & 1 deletion AddOns/AdiBags/core/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ function addon:ShouldStack(slotData)
end
end
elseif conf.others and unstack < 2 then
return true, tostring(self.GetDistinctItemID(slotData.link))..hintSuffix
return true, tostring(slotData.link)..hintSuffix
end
end

Expand Down
61 changes: 38 additions & 23 deletions AddOns/AdiBags/core/Filters.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ local filterProto = setmetatable({
}, { __index = addon.moduleProto })
addon.filterProto = filterProto

function filterProto:OnEnable()
addon:UpdateFilters()
end

function filterProto:OnDisable()
addon:UpdateFilters()
end

function filterProto:GetPriority()
return addon.db.profile.filterPriorities[self.filterName] or self.priority or 0
end
Expand Down Expand Up @@ -68,27 +60,46 @@ local function CompareFilters(a, b)
end
end

local activeFilters = {}
local allFilters = {}
function addon:UpdateFilters()
wipe(allFilters)
for name, filter in self:IterateModules() do
if filter.isFilter then
tinsert(allFilters, filter)
local GetAllFilters, GetActiveFilters
do
local activeFilters
local allFilters

function addon:UpdateFilters()
activeFilters, allFilters = nil, nil
self:SendMessage('AdiBags_FiltersChanged')
end

function GetAllFilters()
if allFilters then
return allFilters
end
allFilters = {}
for name, filter in addon:IterateModules() do
if filter.isFilter then
tinsert(allFilters, filter)
end
end
tsort(allFilters, CompareFilters)
return allFilters
end
tsort(allFilters, CompareFilters)
wipe(activeFilters)
for i, filter in ipairs(allFilters) do
if filter:IsEnabled() then
tinsert(activeFilters, filter)

function GetActiveFilters()
if activeFilters then
return activeFilters
end
activeFilters = {}
for i, filter in ipairs(GetAllFilters()) do
if filter:IsEnabled() then
tinsert(activeFilters, filter)
end
end
return activeFilters
end
self:SendMessage('AdiBags_FiltersChanged')
end

function addon:IterateFilters()
return ipairs(allFilters)
return ipairs(GetAllFilters())
end

function addon:RegisterFilter(name, priority, Filter, ...)
Expand All @@ -106,13 +117,17 @@ function addon:RegisterFilter(name, priority, Filter, ...)
return filter
end

function addon:OnModuleCreated(module)
self:UpdateFilters()
end

--------------------------------------------------------------------------------
-- Filtering process
--------------------------------------------------------------------------------

local safecall = addon.safecall
function addon:Filter(slotData, defaultSection, defaultCategory)
for i, filter in ipairs(activeFilters) do
for i, filter in ipairs(GetActiveFilters()) do
local sectionName, category = safecall(filter.Filter, filter, slotData)
if sectionName then
--[===[@alpha@
Expand Down
34 changes: 0 additions & 34 deletions AddOns/AdiBags/core/Utility.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,40 +139,6 @@ function addon.IsValidItemLink(link)
end
end

--------------------------------------------------------------------------------
-- Get distinct item IDs from item links
--------------------------------------------------------------------------------

local function __GetDistinctItemID(link)
if not link or not addon.IsValidItemLink(link) then return end
if strmatch(link, "battlepet:") then
return link
else
local itemString, id, enchant, gem1, gem2, gem3, gem4, suffix, reforge = strmatch(link, '(item:(%-?%d+):(%-?%d+):(%-?%d+):(%-?%d+):(%-?%d+):(%-?%d+):(%-?%d+):%-?%d+:%-?%d+:(%-?%d+))')
id = tonumber(id)
local equipSlot = select(9, GetItemInfo(id))
if equipSlot and equipSlot ~= "" and equipSlot ~= "INVTYPE_BAG" then
-- Rebuild an item link without noise
id = strjoin(':', 'item', id, enchant, gem1, gem2, gem3, gem4, suffix, "0", "0", reforge)
end
return id
end
end

local distinctIDs = setmetatable({}, {__index = function(t, link)
local result = __GetDistinctItemID(link)
if result then
t[link] = result
return result
else
return link
end
end})

function addon.GetDistinctItemID(link)
return link and distinctIDs[link]
end

--------------------------------------------------------------------------------
-- Basic junk test
--------------------------------------------------------------------------------
Expand Down
11 changes: 6 additions & 5 deletions AddOns/AdiBags/modules/ItemLevel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,12 @@ do
end

local maxLevelRanges = {
[60] = { 66, 92 },
[70] = { 100, 164 },
[80] = { 187, 284 },
[85] = { 333, 416 },
[90] = { 458, 580 }
[60] = { 66, 92 },
[70] = { 100, 164 },
[80] = { 187, 284 },
[85] = { 333, 416 },
[90] = { 458, 580 },
[100] = { 615, 695 },
}

local maxLevelColors = {}
Expand Down
3 changes: 0 additions & 3 deletions AddOns/AdiBags/modules/NewItemTracking.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,12 @@ function mod:OnEnable()

self:RegisterMessage('AdiBags_UpdateButton', 'UpdateButton')
self:RegisterEvent('BAG_NEW_ITEMS_UPDATED')

addon.filterProto.OnEnable(self)
end

function mod:OnDisable()
if self.button then
self.button:Hide()
end
addon.filterProto.OnDisable(self)
end

--------------------------------------------------------------------------------
Expand Down
35 changes: 17 additions & 18 deletions AddOns/AdiBags/widgets/ContainerFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,7 @@ function containerProto:CreateReagentTabButton()
self.BagSlotButton:SetChecked(False)
end
self.Title:SetText(self.isReagentBank and REAGENT_BANK or L["Bank"])
self:PauseUpdates()
for bag in pairs(previousBags) do
self:UpdateContent(bag)
end
self:ResumeUpdates()
addon:SendMessage('AdiBags_BagSetupChanged')
end,
function(_, tooltip)
if not IsReagentBankUnlocked() then
Expand Down Expand Up @@ -391,6 +387,7 @@ function containerProto:OnShow()
self:RegisterEvent('AUCTION_MULTISELL_UPDATE')
self:RegisterEvent('AUCTION_MULTISELL_FAILURE', "ResumeUpdates")
self:RegisterMessage('AdiBags_SpellIsTargetingChanged')
self:RegisterMessage('AdiBags_BagSetupChanged')
self:ResumeUpdates()
containerParentProto.OnShow(self)
end
Expand All @@ -408,7 +405,19 @@ function containerProto:ResumeUpdates()
self.paused = false
self:RegisterMessage('AdiBags_BagUpdated', 'BagsUpdated')
self:Debug('ResumeUpdates')
for bag in pairs(self:GetBagIds()) do
return self:AdiBags_BagSetupChanged()
end

function containerProto:PauseUpdates()
if self.paused then return end
self:Debug('PauseUpdates')
self:UnregisterMessage('AdiBags_BagUpdated')
self.paused = true
end

function containerProto:AdiBags_BagSetupChanged()
self:Debug('BagSetupChanged')
for bag in pairs(self.content) do
self:UpdateContent(bag)
end
if self.filtersChanged then
Expand All @@ -419,13 +428,6 @@ function containerProto:ResumeUpdates()
self:LayoutSections(true)
end

function containerProto:PauseUpdates()
if self.paused then return end
self:Debug('PauseUpdates')
self:UnregisterMessage('AdiBags_BagUpdated')
self.paused = true
end

function containerProto:AUCTION_MULTISELL_UPDATE(event, current, total)
if current == total then
self:ResumeUpdates()
Expand Down Expand Up @@ -554,9 +556,6 @@ end
-- Bag content scanning
--------------------------------------------------------------------------------

local GetDistinctItemID = addon.GetDistinctItemID
local IsValidItemLink = addon.IsValidItemLink

function containerProto:UpdateContent(bag)
self:Debug('UpdateContent', bag)
local added, removed, changed = self.added, self.removed, self.changed
Expand All @@ -567,7 +566,7 @@ function containerProto:UpdateContent(bag)
for slot = 1, newSize do
local itemId = GetContainerItemID(bag, slot)
local link = GetContainerItemLink(bag, slot)
if not itemId or (link and IsValidItemLink(link)) then
if not itemId or (link and addon.IsValidItemLink(link)) then
local slotData = content[slot]
if not slotData then
slotData = {
Expand All @@ -589,7 +588,7 @@ function containerProto:UpdateContent(bag)
link, count = false, 0
end

if GetDistinctItemID(slotData.link) ~= GetDistinctItemID(link) then
if slotData.link ~= link then
removed[slotData.slotId] = slotData.link
slotData.count = count
slotData.link = link
Expand Down
9 changes: 7 additions & 2 deletions AddOns/AdiBags/widgets/ItemButton.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function buttonProto:OnCreate()
if self.NewItemTexture then
self.NewItemTexture:Hide()
end
self.SplitStack = nil -- Remove the function set up by the template
end

function buttonProto:OnAcquire(container, bag, slot)
Expand Down Expand Up @@ -94,6 +95,10 @@ function buttonProto:IsLocked()
return select(3, GetContainerItemInfo(self.bag, self.slot))
end

function buttonProto:SplitStack(split)
SplitContainerItem(self.bag, self.slot, split)
end

--------------------------------------------------------------------------------
-- Generic bank button sub-type
--------------------------------------------------------------------------------
Expand Down Expand Up @@ -356,7 +361,7 @@ end
function buttonProto:UpdateBorder(isolatedEvent)
local texture, r, g, b, a, x1, x2, y1, y2, blendMode
if self.hasItem then
texture, r, g, b, a, x1, x2, y1, y2, blendMode = GetBorder(self.bag, self.slot, self.itemId, addon.db.profile)
texture, r, g, b, a, x1, x2, y1, y2, blendMode = GetBorder(self.bag, self.slot, self.itemLink or self.itemId, addon.db.profile)
end
if not texture then
self.IconQuestTexture:Hide()
Expand All @@ -374,7 +379,7 @@ function buttonProto:UpdateBorder(isolatedEvent)
border:Show()
end
if self.JunkIcon then
local quality = self.hasItem and select(3, GetItemInfo(self.itemId))
local quality = self.hasItem and select(3, GetItemInfo(self.itemLink or self.itemId))
self.JunkIcon:SetShown(quality == LE_ITEM_QUALITY_POOR and addon:GetInteractingWindow() == "MERCHANT")
end
if isolatedEvent then
Expand Down
6 changes: 3 additions & 3 deletions AddOns/AdiBags_Config/AdiBags_Config.toc
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## Interface: 60000
## X-Curse-Packaged-Version: v1.7.10
## X-Curse-Packaged-Version: v1.7.12
## X-Curse-Project-Name: AdiBags
## X-Curse-Project-ID: adibags
## X-Curse-Repository-ID: wow/adibags/mainline

## Title: AdiBags Configuration
## Notes: Adirelle's bag addon.
## Author: Adirelle
## Version: v1.7.10
## X-Date: 2014-11-10T13:55:41Z
## Version: v1.7.12
## X-Date: 2014-11-18T06:42:24Z
## X-Part-Of: AdiBags
## LoadOnDemand: 1
## Dependencies: AdiBags
Expand Down
4 changes: 2 additions & 2 deletions AddOns/BagSync/BagSync.toc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
## Title: BagSync
## Notes: BagSync tracks your characters items and displays it within tooltips.
## Author: Xruptor
## Version: 7.9
## Version: 8.0
## OptionalDeps: tekDebug
## SavedVariables: BagSyncDB, BagSyncOpt, BagSyncGUILD_DB, BagSyncTOKEN_DB, BagSyncCRAFT_DB, BagSyncBLACKLIST_DB
## X-Curse-Packaged-Version: v7.9
## X-Curse-Packaged-Version: v8.0
## X-Curse-Project-Name: BagSync
## X-Curse-Project-ID: bagsync
## X-Curse-Repository-ID: wow/bagsync/mainline
Expand Down
1 change: 1 addition & 0 deletions AddOns/BagSync/BagSync_Search.lua
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ local function DoSearch()
["void"] = 0,
["auction"] = 0,
["guild"] = 0,
["reagentbank"] = 0,
}

if string.len(searchStr) > 1 and string.find(searchStr, "@") and allowList[string.sub(searchStr, 2)] ~= nil then playerSearch = true end
Expand Down
Loading

0 comments on commit 187f5aa

Please sign in to comment.