Skip to content

Commit 187f5aa

Browse files
committed
更新插件到最新版本
1 parent cb0e170 commit 187f5aa

File tree

517 files changed

+51170
-3666
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

517 files changed

+51170
-3666
lines changed

AddOns/AdiBags/AdiBags.toc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
## Interface: 60000
2-
## X-Curse-Packaged-Version: v1.7.10
2+
## X-Curse-Packaged-Version: v1.7.12
33
## X-Curse-Project-Name: AdiBags
44
## X-Curse-Project-ID: adibags
55
## X-Curse-Repository-ID: wow/adibags/mainline
66

77
## Title: AdiBags
88
## Notes: Adirelle's bag addon.
99
## Author: Adirelle
10-
## Version: v1.7.10
10+
## Version: v1.7.12
1111
## SavedVariables: AdiBagsDB
12-
## X-Date: 2014-11-10T13:55:41Z
12+
## X-Date: 2014-11-18T06:42:24Z
1313
## OptionalDeps: LibStub, CallbackHandler-1.0, Ace3, LibBabble-Inventory-3.0, LibSharedMedia-3.0, LibItemUpgradeInfo-1.0, Scrap, BrainDead, !BugGrabber, SyLevel
1414
#@alpha@
1515
# ## OptionalDeps: AdiDebug, BugSack, Swatter
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
tag v1.7.12
2+
8c9c9b01224d3ac10403f8c68d18adf80b8010a3
3+
4+
2014-11-18 07:42:33 +0100
5+
6+
Bugfix.
7+
8+
9+
--------------------
10+
11+
Adirelle:
12+
- Missing comma, whoopsy.

AddOns/AdiBags/config/Options.lua

+4-3
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ do
146146
set = function(info, value)
147147
addon.db.profile[data.dbKey][name] = value
148148
if value then module:Enable() else module:Disable() end
149+
self:UpdateFilters()
149150
end,
150151
},
151152
}
@@ -258,7 +259,7 @@ local function GetOptions()
258259
name = addonName..' DEV',
259260
--@end-debug@]===]
260261
--@non-debug@
261-
name = addonName..' v1.7.10',
262+
name = addonName..' v1.7.12',
262263
--@end-non-debug@
263264
type = 'group',
264265
handler = addon:GetOptionHandler(addon),
@@ -633,9 +634,9 @@ local function GetOptions()
633634
},
634635
plugins = {}
635636
}
636-
addon.OnModuleCreated = OnModuleCreated
637+
hooksecurefunc(addon, "OnModuleCreated", OnModuleCreated)
637638
for name, module in addon:IterateModules() do
638-
addon:OnModuleCreated(module)
639+
OnModuleCreated(addon, module)
639640
end
640641
UpdateFilterOrder()
641642

AddOns/AdiBags/core/Core.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ function addon:ShouldStack(slotData)
489489
end
490490
end
491491
elseif conf.others and unstack < 2 then
492-
return true, tostring(self.GetDistinctItemID(slotData.link))..hintSuffix
492+
return true, tostring(slotData.link)..hintSuffix
493493
end
494494
end
495495

AddOns/AdiBags/core/Filters.lua

+38-23
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ local filterProto = setmetatable({
3131
}, { __index = addon.moduleProto })
3232
addon.filterProto = filterProto
3333

34-
function filterProto:OnEnable()
35-
addon:UpdateFilters()
36-
end
37-
38-
function filterProto:OnDisable()
39-
addon:UpdateFilters()
40-
end
41-
4234
function filterProto:GetPriority()
4335
return addon.db.profile.filterPriorities[self.filterName] or self.priority or 0
4436
end
@@ -68,27 +60,46 @@ local function CompareFilters(a, b)
6860
end
6961
end
7062

71-
local activeFilters = {}
72-
local allFilters = {}
73-
function addon:UpdateFilters()
74-
wipe(allFilters)
75-
for name, filter in self:IterateModules() do
76-
if filter.isFilter then
77-
tinsert(allFilters, filter)
63+
local GetAllFilters, GetActiveFilters
64+
do
65+
local activeFilters
66+
local allFilters
67+
68+
function addon:UpdateFilters()
69+
activeFilters, allFilters = nil, nil
70+
self:SendMessage('AdiBags_FiltersChanged')
71+
end
72+
73+
function GetAllFilters()
74+
if allFilters then
75+
return allFilters
7876
end
77+
allFilters = {}
78+
for name, filter in addon:IterateModules() do
79+
if filter.isFilter then
80+
tinsert(allFilters, filter)
81+
end
82+
end
83+
tsort(allFilters, CompareFilters)
84+
return allFilters
7985
end
80-
tsort(allFilters, CompareFilters)
81-
wipe(activeFilters)
82-
for i, filter in ipairs(allFilters) do
83-
if filter:IsEnabled() then
84-
tinsert(activeFilters, filter)
86+
87+
function GetActiveFilters()
88+
if activeFilters then
89+
return activeFilters
90+
end
91+
activeFilters = {}
92+
for i, filter in ipairs(GetAllFilters()) do
93+
if filter:IsEnabled() then
94+
tinsert(activeFilters, filter)
95+
end
8596
end
97+
return activeFilters
8698
end
87-
self:SendMessage('AdiBags_FiltersChanged')
8899
end
89100

90101
function addon:IterateFilters()
91-
return ipairs(allFilters)
102+
return ipairs(GetAllFilters())
92103
end
93104

94105
function addon:RegisterFilter(name, priority, Filter, ...)
@@ -106,13 +117,17 @@ function addon:RegisterFilter(name, priority, Filter, ...)
106117
return filter
107118
end
108119

120+
function addon:OnModuleCreated(module)
121+
self:UpdateFilters()
122+
end
123+
109124
--------------------------------------------------------------------------------
110125
-- Filtering process
111126
--------------------------------------------------------------------------------
112127

113128
local safecall = addon.safecall
114129
function addon:Filter(slotData, defaultSection, defaultCategory)
115-
for i, filter in ipairs(activeFilters) do
130+
for i, filter in ipairs(GetActiveFilters()) do
116131
local sectionName, category = safecall(filter.Filter, filter, slotData)
117132
if sectionName then
118133
--[===[@alpha@

AddOns/AdiBags/core/Utility.lua

-34
Original file line numberDiff line numberDiff line change
@@ -139,40 +139,6 @@ function addon.IsValidItemLink(link)
139139
end
140140
end
141141

142-
--------------------------------------------------------------------------------
143-
-- Get distinct item IDs from item links
144-
--------------------------------------------------------------------------------
145-
146-
local function __GetDistinctItemID(link)
147-
if not link or not addon.IsValidItemLink(link) then return end
148-
if strmatch(link, "battlepet:") then
149-
return link
150-
else
151-
local itemString, id, enchant, gem1, gem2, gem3, gem4, suffix, reforge = strmatch(link, '(item:(%-?%d+):(%-?%d+):(%-?%d+):(%-?%d+):(%-?%d+):(%-?%d+):(%-?%d+):%-?%d+:%-?%d+:(%-?%d+))')
152-
id = tonumber(id)
153-
local equipSlot = select(9, GetItemInfo(id))
154-
if equipSlot and equipSlot ~= "" and equipSlot ~= "INVTYPE_BAG" then
155-
-- Rebuild an item link without noise
156-
id = strjoin(':', 'item', id, enchant, gem1, gem2, gem3, gem4, suffix, "0", "0", reforge)
157-
end
158-
return id
159-
end
160-
end
161-
162-
local distinctIDs = setmetatable({}, {__index = function(t, link)
163-
local result = __GetDistinctItemID(link)
164-
if result then
165-
t[link] = result
166-
return result
167-
else
168-
return link
169-
end
170-
end})
171-
172-
function addon.GetDistinctItemID(link)
173-
return link and distinctIDs[link]
174-
end
175-
176142
--------------------------------------------------------------------------------
177143
-- Basic junk test
178144
--------------------------------------------------------------------------------

AddOns/AdiBags/modules/ItemLevel.lua

+6-5
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,12 @@ do
299299
end
300300

301301
local maxLevelRanges = {
302-
[60] = { 66, 92 },
303-
[70] = { 100, 164 },
304-
[80] = { 187, 284 },
305-
[85] = { 333, 416 },
306-
[90] = { 458, 580 }
302+
[60] = { 66, 92 },
303+
[70] = { 100, 164 },
304+
[80] = { 187, 284 },
305+
[85] = { 333, 416 },
306+
[90] = { 458, 580 },
307+
[100] = { 615, 695 },
307308
}
308309

309310
local maxLevelColors = {}

AddOns/AdiBags/modules/NewItemTracking.lua

-3
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,12 @@ function mod:OnEnable()
5656

5757
self:RegisterMessage('AdiBags_UpdateButton', 'UpdateButton')
5858
self:RegisterEvent('BAG_NEW_ITEMS_UPDATED')
59-
60-
addon.filterProto.OnEnable(self)
6159
end
6260

6361
function mod:OnDisable()
6462
if self.button then
6563
self.button:Hide()
6664
end
67-
addon.filterProto.OnDisable(self)
6865
end
6966

7067
--------------------------------------------------------------------------------

AddOns/AdiBags/widgets/ContainerFrame.lua

+17-18
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,7 @@ function containerProto:CreateReagentTabButton()
308308
self.BagSlotButton:SetChecked(False)
309309
end
310310
self.Title:SetText(self.isReagentBank and REAGENT_BANK or L["Bank"])
311-
self:PauseUpdates()
312-
for bag in pairs(previousBags) do
313-
self:UpdateContent(bag)
314-
end
315-
self:ResumeUpdates()
311+
addon:SendMessage('AdiBags_BagSetupChanged')
316312
end,
317313
function(_, tooltip)
318314
if not IsReagentBankUnlocked() then
@@ -391,6 +387,7 @@ function containerProto:OnShow()
391387
self:RegisterEvent('AUCTION_MULTISELL_UPDATE')
392388
self:RegisterEvent('AUCTION_MULTISELL_FAILURE', "ResumeUpdates")
393389
self:RegisterMessage('AdiBags_SpellIsTargetingChanged')
390+
self:RegisterMessage('AdiBags_BagSetupChanged')
394391
self:ResumeUpdates()
395392
containerParentProto.OnShow(self)
396393
end
@@ -408,7 +405,19 @@ function containerProto:ResumeUpdates()
408405
self.paused = false
409406
self:RegisterMessage('AdiBags_BagUpdated', 'BagsUpdated')
410407
self:Debug('ResumeUpdates')
411-
for bag in pairs(self:GetBagIds()) do
408+
return self:AdiBags_BagSetupChanged()
409+
end
410+
411+
function containerProto:PauseUpdates()
412+
if self.paused then return end
413+
self:Debug('PauseUpdates')
414+
self:UnregisterMessage('AdiBags_BagUpdated')
415+
self.paused = true
416+
end
417+
418+
function containerProto:AdiBags_BagSetupChanged()
419+
self:Debug('BagSetupChanged')
420+
for bag in pairs(self.content) do
412421
self:UpdateContent(bag)
413422
end
414423
if self.filtersChanged then
@@ -419,13 +428,6 @@ function containerProto:ResumeUpdates()
419428
self:LayoutSections(true)
420429
end
421430

422-
function containerProto:PauseUpdates()
423-
if self.paused then return end
424-
self:Debug('PauseUpdates')
425-
self:UnregisterMessage('AdiBags_BagUpdated')
426-
self.paused = true
427-
end
428-
429431
function containerProto:AUCTION_MULTISELL_UPDATE(event, current, total)
430432
if current == total then
431433
self:ResumeUpdates()
@@ -554,9 +556,6 @@ end
554556
-- Bag content scanning
555557
--------------------------------------------------------------------------------
556558

557-
local GetDistinctItemID = addon.GetDistinctItemID
558-
local IsValidItemLink = addon.IsValidItemLink
559-
560559
function containerProto:UpdateContent(bag)
561560
self:Debug('UpdateContent', bag)
562561
local added, removed, changed = self.added, self.removed, self.changed
@@ -567,7 +566,7 @@ function containerProto:UpdateContent(bag)
567566
for slot = 1, newSize do
568567
local itemId = GetContainerItemID(bag, slot)
569568
local link = GetContainerItemLink(bag, slot)
570-
if not itemId or (link and IsValidItemLink(link)) then
569+
if not itemId or (link and addon.IsValidItemLink(link)) then
571570
local slotData = content[slot]
572571
if not slotData then
573572
slotData = {
@@ -589,7 +588,7 @@ function containerProto:UpdateContent(bag)
589588
link, count = false, 0
590589
end
591590

592-
if GetDistinctItemID(slotData.link) ~= GetDistinctItemID(link) then
591+
if slotData.link ~= link then
593592
removed[slotData.slotId] = slotData.link
594593
slotData.count = count
595594
slotData.link = link

AddOns/AdiBags/widgets/ItemButton.lua

+7-2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ function buttonProto:OnCreate()
6363
if self.NewItemTexture then
6464
self.NewItemTexture:Hide()
6565
end
66+
self.SplitStack = nil -- Remove the function set up by the template
6667
end
6768

6869
function buttonProto:OnAcquire(container, bag, slot)
@@ -94,6 +95,10 @@ function buttonProto:IsLocked()
9495
return select(3, GetContainerItemInfo(self.bag, self.slot))
9596
end
9697

98+
function buttonProto:SplitStack(split)
99+
SplitContainerItem(self.bag, self.slot, split)
100+
end
101+
97102
--------------------------------------------------------------------------------
98103
-- Generic bank button sub-type
99104
--------------------------------------------------------------------------------
@@ -356,7 +361,7 @@ end
356361
function buttonProto:UpdateBorder(isolatedEvent)
357362
local texture, r, g, b, a, x1, x2, y1, y2, blendMode
358363
if self.hasItem then
359-
texture, r, g, b, a, x1, x2, y1, y2, blendMode = GetBorder(self.bag, self.slot, self.itemId, addon.db.profile)
364+
texture, r, g, b, a, x1, x2, y1, y2, blendMode = GetBorder(self.bag, self.slot, self.itemLink or self.itemId, addon.db.profile)
360365
end
361366
if not texture then
362367
self.IconQuestTexture:Hide()
@@ -374,7 +379,7 @@ function buttonProto:UpdateBorder(isolatedEvent)
374379
border:Show()
375380
end
376381
if self.JunkIcon then
377-
local quality = self.hasItem and select(3, GetItemInfo(self.itemId))
382+
local quality = self.hasItem and select(3, GetItemInfo(self.itemLink or self.itemId))
378383
self.JunkIcon:SetShown(quality == LE_ITEM_QUALITY_POOR and addon:GetInteractingWindow() == "MERCHANT")
379384
end
380385
if isolatedEvent then

AddOns/AdiBags_Config/AdiBags_Config.toc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
## Interface: 60000
2-
## X-Curse-Packaged-Version: v1.7.10
2+
## X-Curse-Packaged-Version: v1.7.12
33
## X-Curse-Project-Name: AdiBags
44
## X-Curse-Project-ID: adibags
55
## X-Curse-Repository-ID: wow/adibags/mainline
66

77
## Title: AdiBags Configuration
88
## Notes: Adirelle's bag addon.
99
## Author: Adirelle
10-
## Version: v1.7.10
11-
## X-Date: 2014-11-10T13:55:41Z
10+
## Version: v1.7.12
11+
## X-Date: 2014-11-18T06:42:24Z
1212
## X-Part-Of: AdiBags
1313
## LoadOnDemand: 1
1414
## Dependencies: AdiBags

AddOns/BagSync/BagSync.toc

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
## Title: BagSync
33
## Notes: BagSync tracks your characters items and displays it within tooltips.
44
## Author: Xruptor
5-
## Version: 7.9
5+
## Version: 8.0
66
## OptionalDeps: tekDebug
77
## SavedVariables: BagSyncDB, BagSyncOpt, BagSyncGUILD_DB, BagSyncTOKEN_DB, BagSyncCRAFT_DB, BagSyncBLACKLIST_DB
8-
## X-Curse-Packaged-Version: v7.9
8+
## X-Curse-Packaged-Version: v8.0
99
## X-Curse-Project-Name: BagSync
1010
## X-Curse-Project-ID: bagsync
1111
## X-Curse-Repository-ID: wow/bagsync/mainline

AddOns/BagSync/BagSync_Search.lua

+1
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ local function DoSearch()
187187
["void"] = 0,
188188
["auction"] = 0,
189189
["guild"] = 0,
190+
["reagentbank"] = 0,
190191
}
191192

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

0 commit comments

Comments
 (0)