Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
9a3006e
Merge pull request #11 from pollyzoid/bank-battlepet-tooltip
Jaliborc Jul 24, 2018
1bd9016
Merge pull request #12 from jackfnx/master
Jaliborc Jul 24, 2018
cd9afec
Use GetItemID anc CACHE_BANK_OPENED
Aug 3, 2018
8a2b268
Renamed in-addon messages to signals. The name could lead to coding e…
Aug 3, 2018
11ac7de
Implemented worldmap auto hide
Aug 3, 2018
2441735
Include instead of script tag
Aug 4, 2018
9710849
Simplified configloader
Sep 2, 2018
60453a6
Azerite and artifact borders
Sep 7, 2018
72e02df
Reworked racial icons
Sep 7, 2018
59964f4
Scrapping display event
Sep 7, 2018
960e05a
frFR Update
tborlee Sep 8, 2018
6c22a43
small typo
tborlee Sep 8, 2018
691fe2f
Fixed guild tab issues, reverted frame disabling
Oct 14, 2018
d477d52
Update cn.lua
adavak Dec 15, 2018
a2f7044
Updated tip count russian translation
Jan 24, 2019
e0e189e
Merge pull request #16 from tborlee/patch-1
Jaliborc Jan 26, 2019
34c5ef5
Merge pull request #21 from adavak/master
Jaliborc Jan 26, 2019
f72e4c4
Using UnitFullName
Jan 26, 2019
74ac099
Merge branch 'master' of https://github.com/tullamods/Wildpants
Feb 2, 2019
51aab9c
No multiple owners required
Feb 2, 2019
b0a7c11
Not prescreening owners
Feb 2, 2019
affbf7b
MInor change
Feb 2, 2019
90f107e
Fixed issue with character specific settings
Feb 3, 2019
938cac3
8.1.5 workarounds
Tuller Mar 13, 2019
74e360d
Merge pull request #23 from tullamods/8.1.5
Jaliborc Mar 14, 2019
a297c6d
Cleaned up solutions
Mar 14, 2019
424a36c
Fixed sort bank + reagents server issue introduced in wow 8.1.5
Mar 16, 2019
270801b
Replaced all ShowUIPanel and HideUIPanel calls
Jun 30, 2019
1e2ecde
Fixed for Classic 1.13.2
xionglingfeng Aug 12, 2019
7312382
Fix errors when right click items
xionglingfeng Aug 26, 2019
e3ff1b5
Merge pull request #24 from xionglingfeng/master
Jaliborc Aug 27, 2019
bd5a011
Now apparently fully compatible with classic. Changed how character i…
Aug 27, 2019
c2b26e4
Moving as much as possiblr from client version detection to feature d…
Aug 27, 2019
36c52d8
Fixed bank slots
Aug 28, 2019
146543c
Created FUNDING.yml
Aug 28, 2019
e510784
Added ammo pouches to bag types
Aug 28, 2019
6417d12
Changed vault defaults
Aug 28, 2019
fe876a6
Updated dependencies
Aug 28, 2019
ad50218
Added classic filters, removed 'all' subclass filters, fixed quivers
Aug 28, 2019
9cded0f
Now checks for socketing and vehicle APIs
Aug 29, 2019
9869cc1
ownerSelector now shared
Aug 30, 2019
ee2f7be
updated libitemsearch
Aug 30, 2019
cc88cd6
Added classic item families for containers
Sep 1, 2019
6970625
Fixed trade, quivers. Added soul shards.
Sep 1, 2019
639375b
Removing need for separate owner portrait texture
Sep 2, 2019
e88ffd1
Moving config code to the repo. Still LOD.
Sep 3, 2019
2565fc9
Updated sushi libs
Sep 3, 2019
e8592a8
Removed custom itemscale
Sep 4, 2019
55912f9
Merge pull request #1 from tullamods/master
adavak Sep 6, 2019
b1996fd
Update cn.lua
adavak Sep 6, 2019
4200b85
Update cn.lua
adavak Sep 6, 2019
e3f1d2b
Update cn.lua
adavak Sep 6, 2019
f14dafc
Update cn.lua
adavak Sep 6, 2019
b64a52b
Bugfix
Sep 7, 2019
7970436
Starting item sorting feature
Sep 7, 2019
7c25218
Made small improvements to sorting. Added item stacking.
Sep 9, 2019
cb6492e
Now handles better user interaction during sorting/stacking.
Sep 9, 2019
50539e5
Further work in sorting. New delay API.
Sep 13, 2019
8586e6b
Sorting no longer starts in combat and stops when combat starts.
Sep 14, 2019
17748ca
Fixed item.After issue introduced in the timing API rework
Sep 14, 2019
35b5933
Completely changed how instruction tooltip text is generated.
Sep 14, 2019
ffeb75e
Sorting now event agnostic
Sep 15, 2019
b37e8a3
Updated customsearch
Sep 15, 2019
c4cd85c
Merge pull request #2 from tullamods/master
adavak Sep 16, 2019
2d58842
Update cn.lua
adavak Sep 16, 2019
1f4a3a8
Merge pull request #26 from adavak/master
Jaliborc Sep 16, 2019
d61ad89
Updated european localizations
Sep 16, 2019
37c67fd
Fixing multiple issues, now always checks for default sorting API ins…
Sep 16, 2019
ddc84a6
Added support to 2 new constants for control of the default settings
Sep 17, 2019
2be1fff
Added support for 2 new addon level constants
Sep 17, 2019
d79435a
updated new ko.lua
chkmyid Sep 23, 2019
3fea10e
updated new ko.lua
chkmyid Sep 23, 2019
3eeeeac
Fixed two sorting issues (including ammo sort)
Sep 25, 2019
81f4104
Merge branch 'master' of https://github.com/tullamods/Wildpants
Sep 25, 2019
81fd489
Fixed locale issue
Sep 25, 2019
edb7536
Now properly loading unit tests
Sep 25, 2019
08c4fe0
Adding check until i actually impldement rulesets in bagnon
Sep 25, 2019
b35e32f
Faster sorting oh boy
Sep 26, 2019
89402d5
Added new translation
kalvin807 Oct 5, 2019
f5242ba
Added new translation and fixed old translation
kalvin807 Oct 5, 2019
0bf2427
Merge pull request #28 from chkmyid/patch-4
Jaliborc Oct 5, 2019
df676b6
Merge pull request #29 from chkmyid/patch-3
Jaliborc Oct 5, 2019
84e930a
Merge pull request #30 from kalvin807/update-tw-translation
Jaliborc Oct 5, 2019
28a2ad2
Fixed tiny sorting bug slowing down operations
Oct 5, 2019
315c56f
Merge branch 'master' of https://github.com/tullamods/Wildpants
Oct 5, 2019
952bce6
Updated libitemcache
Oct 5, 2019
f57983f
Updated patrons
Oct 5, 2019
388fb15
updated spanish
Oct 27, 2019
86d0d1f
updated esES
Oct 27, 2019
5a863bb
Merge pull request #31 from woopydalan/master
Jaliborc Oct 27, 2019
4f85418
Reorganized all code into modules. Upgraded to Poncho-2.0 and cleaned…
Dec 4, 2019
2709d39
Update ko.lua
chkmyid Dec 5, 2019
7e3b223
Update ko.lua
chkmyid Dec 5, 2019
7eaadbc
Merge pull request #3 from tullamods/experimental
adavak Dec 12, 2019
8b73761
Update cn.lua
adavak Dec 12, 2019
a85a646
Fixes #1023
Dec 13, 2019
88deceb
Hopefully fixes #1027
Dec 13, 2019
5488ae4
Marking poncho and sushi releases
Dec 13, 2019
e3eef8d
Merge branch 'master' into experimental
Jaliborc Dec 13, 2019
ab5eed6
Merge pull request #36 from tullamods/experimental
Jaliborc Dec 13, 2019
0ea7888
Merge pull request #35 from adavak/master
Jaliborc Dec 13, 2019
204746e
Merge pull request #37 from tullamods/experimental
Jaliborc Dec 13, 2019
58eca50
Merge pull request #33 from chkmyid/patch-7
Jaliborc Dec 13, 2019
15ad1fb
Merge pull request #34 from chkmyid/patch-5
Jaliborc Dec 13, 2019
db1a045
Updated LibItemCache
Dec 13, 2019
6dc6a0c
Christmas updates
Jan 14, 2020
2aba934
Added vulperas and mechagnomes
Jan 17, 2020
42cf6c7
Merge pull request #4 from tullamods/master
adavak Jan 17, 2020
9fb3ad3
Update en.lua
adavak Jan 17, 2020
f574349
Revert "Update en.lua"
adavak Jan 17, 2020
593262c
Update cn.lua
adavak Jan 17, 2020
1f21cee
Update cn.lua
adavak Jan 17, 2020
2554ad3
Merge pull request #42 from adavak/master
Jaliborc Jan 17, 2020
43770d3
Update ko.lua
chkmyid Jan 17, 2020
934a6af
Update ko.lua
chkmyid Jan 17, 2020
98be388
Merge pull request #43 from chkmyid/patch-8
Jaliborc Jan 17, 2020
1f6ea62
Merge pull request #44 from chkmyid/patch-9
Jaliborc Jan 17, 2020
6da183b
Now using atlas for race icons in retail
Jan 17, 2020
193fcde
Updated sushi
Jan 17, 2020
d6f8a0f
Avoid unit test duplication
Jan 17, 2020
8e52926
Fixed rulesets
Jan 18, 2020
3efca09
Fixed rules toggle issue
Jan 18, 2020
81c0fef
Italian update
Feb 4, 2020
a574bfa
Preventing item tooltip error
Feb 4, 2020
2d094cc
Fixes #16
Feb 4, 2020
f58a89d
Keystone fixes
Feb 4, 2020
7a64e02
Updated dependencies
Feb 24, 2020
39ab6fc
Merge branch 'master' of https://github.com/tullamods/Wildpants
Feb 24, 2020
6740ef5
Patrons updated
Feb 24, 2020
9e8848b
Minor clean
Feb 24, 2020
1448e65
Make sorting faster by implementing an item distance
Pierre-Sassoulas Mar 7, 2020
a9df72d
Restore corruption eye
Centias Mar 10, 2020
5d794fa
Restore corruption eye pt 2
Centias Mar 12, 2020
def5834
Merge pull request #48 from Pierre-Sassoulas/master
Jaliborc Jul 8, 2020
cf04417
Merge pull request #49 from Centias/corrupt-eye
Jaliborc Jul 8, 2020
e9b6369
Improved item distance metric, refactor community code
Jul 9, 2020
3cafb26
Optimized bag events using UPDATE_DELAYED
Jul 10, 2020
5e46055
Hotfix of bug in item distance algorithm
Jul 10, 2020
9b83b1f
Fixed issue updating bank bags
Jul 12, 2020
d293acc
New sushi build
Sep 20, 2020
3e70ed5
Merge branch 'master' of https://github.com/tullamods/Wildpants
Sep 20, 2020
662a1d1
New poncho and sushi versions
Sep 21, 2020
8b97c6b
Updated patreon list
Sep 21, 2020
5cf660f
New sushi version
Sep 23, 2020
3ef3bcc
Fixed issue with bank slot purchases and releasing item slots.
Sep 26, 2020
6447be9
Added code to support blank on top option to itemGroup.lua
Apr 27, 2020
938cd2b
Added row to frames.lua and English translation to en.lua
Apr 27, 2020
52e3e89
added missing +, and fixed capitalization typo
Apr 27, 2020
5c003d9
Got the offset calcuation to work with the bank and reagent bank
Apr 28, 2020
24d85df
Fixed an off-by-one, and removed a few blank lines
Apr 28, 2020
eb62316
Changed from GetContainerNumSlots to NumSlots, in order to get cached…
May 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patreon: jaliborc
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,15 @@
[submodule "libs/CustomSearch-1.0"]
path = libs/CustomSearch-1.0
url = https://github.com/Jaliborc/CustomSearch-1.0.git
[submodule "libs/Poncho-2.0"]
path = libs/Poncho-2.0
url = https://github.com/Jaliborc/Poncho-2.0.git
[submodule "libs/Sushi-3.1"]
path = libs/Sushi-3.1
url = https://github.com/Jaliborc/Sushi-3.1.git
[submodule "libs/WildAddon-1.0"]
path = libs/WildAddon-1.0
url = https://github.com/Jaliborc/WildAddon-1.0.git
[submodule "libs/MutexDelay-1.0"]
path = libs/MutexDelay-1.0
url = https://github.com/Jaliborc/MutexDelay-1.0.git
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Wildpants includes:
* Core useful functionality (frame display management, settings setup, custom item events,...)
* Classes to generate shared UI compoments (item buttons, money display, sort button,...)
* Common features (tooltip counts, item rulesets, flash find,...)
* _Load on demand_ configuration menus to control all the aforementioned features

## For Developers
Are you a developer? Wildpants provides a rich API for developing plugins or addons that interact with _Bagnon_ or _Combuctor_:
Expand Down
80 changes: 41 additions & 39 deletions core/settings.lua → Wildpants.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
--[[
settings.lua
Methods for initializing and sharing settings between characters
Wildpants.lua
Starts the addon and its settings
--]]

local ADDON, Addon = ...
local SETS = ADDON .. '_Sets'
local CURRENT_VERSION = GetAddOnMetadata(ADDON, 'Version')
local Addon = LibStub('WildAddon-1.0'):NewAddon(ADDON, Addon, 'LibItemCache-2.0')
Addon.IsRetail = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
Addon.Version = GetAddOnMetadata(ADDON, 'Version')

local L = LibStub('AceLocale-3.0'):GetLocale(ADDON)
local Cache = LibStub('LibItemCache-2.0')
local SETS = ADDON .. '_Sets'

local function AsArray(table)
return setmetatable(table, {__metatable = 1})
Expand Down Expand Up @@ -35,23 +37,23 @@ local FrameDefaults = {
money = true, broker = true,
bagToggle = true, sort = true, search = true, options = true,

strata = 'HIGH',
scale = 1, alpha = 1,
strata = 'HIGH', alpha = 1,
scale = Addon.FrameScale or 1,
color = {0, 0, 0, 0.5},
x = 0, y = 0,

itemScale = Addon.ItemScale or 1,
spacing = 2,

brokerObject = ADDON .. 'Launcher',
brokerObject = Addon.Name .. 'Launcher',
hiddenRules = {contain = true},
hiddenBags = {},

rules = AsArray({
'all', 'all/all', 'all/normal', 'all/trade', 'all/reagent',
'equip', 'equip/all', 'equip/armor', 'equip/weapon', 'equip/trinket',
'use', 'use/all', 'use/consume', 'use/enhance',
'trade', 'trade/all', 'trade/goods', 'trade/gem', 'trade/glyph', 'trade/recipe',
'all', 'all/normal', 'all/trade', 'all/reagent', 'all/keys', 'all/quiver',
'equip', 'equip/armor', 'equip/weapon', 'equip/trinket',
'use', 'use/consume', 'use/enhance',
'trade', 'trade/goods', 'trade/gem', 'trade/glyph', 'trade/recipe',
'quest', 'misc',
}),
}
Expand Down Expand Up @@ -79,7 +81,7 @@ local ProfileDefaults = {
vault = SetDefaults({
borderColor = {1, 0, 0.98, 1},
point = 'LEFT',
columns = 8,
columns = 10,
x = 95
}, FrameDefaults),

Expand All @@ -91,37 +93,44 @@ local ProfileDefaults = {
}


--[[ Settings ]]--
--[[ Startup ]]--

function Addon:OnEnable()
CreateFrame('Frame', nil, InterfaceOptionsFrame):SetScript('OnShow', function()
LoadAddOn(Addon.Name .. '_Config')
end)

function Addon:StartupSettings()
_G[SETS] = SetDefaults(_G[SETS] or {}, {
version = CURRENT_VERSION,
version = Addon.Version,
global = SetDefaults({}, ProfileDefaults),
profiles = {},

resetPlayer = true,
displayBank = true, closeBank = true, displayAuction = true, displayGuild = true, displayMail = true, displayTrade = true, displayCraft = true,
displayBank = true, closeBank = true, displayAuction = true, displayGuild = true, displayMail = true, displayTrade = true, displayCraft = true, displayScrapping = true,
flashFind = true, tipCount = true, fading = true,

glowAlpha = 0.5,
glowQuality = true, glowNew = true, glowQuest = true, glowSets = true, glowUnusable = true,

emptySlots = true, colorSlots = true,
normalColor = {1, 1, 1},
keyColor = {1, .9, .19},
quiverColor = {1, .87, .68},
soulColor = {0.64, 0.39, 1},
reagentColor = {1, .87, .68},
leatherColor = {1, .6, .45},
enchantColor = {0.64, 0.83, 1},
inscribeColor = {.64, 1, .82},
engineerColor = {.68, .63, .25},
tackleColor = {0.42, 0.59, 1},
refrigeColor = {1, .5, .5},
fridgeColor = {1, .5, .5},
gemColor = {1, .65, .98},
mineColor = {1, .81, .38},
herbColor = {.5, 1, .5},
reagentColor = {1, .87, .68},
normalColor = {1, 1, 1},
})

self.sets = _G[SETS]
self:UpdateSettings()
self.sets.version = Addon.Version

for owner, profile in pairs(self.sets.profiles) do
SetDefaults(profile, ProfileDefaults)
Expand All @@ -130,30 +139,23 @@ function Addon:StartupSettings()
self.profile = self:GetProfile()
end

function Addon:UpdateSettings()
if self.sets.frames then
for frame, sets in pairs(self.sets.frames) do
self.sets.global[frame] = SetDefaults(sets, self.sets.global[frame])
end

self.sets.frames = nil
end

self.sets.players, self.sets.owners = nil
if self.sets.version ~= CURRENT_VERSION then
self.sets.version = CURRENT_VERSION
self:Print(format(L.Updated, self.sets.version))
end
end


--[[ Profiles ]]--

function Addon:SetCurrentProfile(profile)
self.sets.profiles[Cache:GetOwnerID()] = profile and SetDefaults(profile, ProfileDefaults)
self.sets.profiles[self:GetOwnerID()] = profile and SetDefaults(profile, ProfileDefaults)
self.profile = self:GetProfile()
end

function Addon:GetProfile(owner)
return self.sets.profiles[Cache:GetOwnerID(owner)] or self.sets.global
return self.sets.profiles[self:GetOwnerID(owner)] or self.sets.global
end


--[[ Options ]]--

function Addon:ShowOptions()
if LoadAddOn(ADDON .. '_Config') then
Addon.GeneralOptions:Open()
end
end
10 changes: 6 additions & 4 deletions Wildpants.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<Ui>
<Include file="libs\libs.xml"/>
<Include file="localization\localization.xml"/>
<Include file="core\core.xml"/>
<Include file="components\components.xml"/>
<Include file="localization\main\localization.xml"/>

<Script file="Wildpants.lua"/>
<Include file="api\api.xml"/>
<Include file="classes\classes.xml"/>
<Include file="features\features.xml"/>
</Ui>
4 changes: 4 additions & 0 deletions Wildpants_Config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<Ui>
<Include file="localization\config\localization.xml"/>
<Include file="config\config.xml"/>
</Ui>
7 changes: 7 additions & 0 deletions api/api.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Ui>
<Script file="owners.lua"/>
<Script file="events.lua"/>
<Script file="frames.lua"/>
<Script file="rules.lua"/>
<Script file="sorting.lua"/>
</Ui>
60 changes: 30 additions & 30 deletions core/events.lua → api/events.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--[[
events.lua
Custom item events for better performance
Custom ace item events for better performance

BAG_UPDATE_SIZE
args: bag
Expand All @@ -9,32 +9,33 @@
BAG_UPDATE_CONTENT
args: bag
called when the items of a bag change

BANK_OPENED
args: none
called when the bank has opened and all of other events have been fired

--]]

local _, Addon = ...
local Events = Addon:NewClass('Events')
local ADDON, Addon = ...
local Events = Addon:NewModule('Events')


--[[ Events ]]--

function Events:PLAYER_LOGIN()
function Events:OnEnable()
self.firstVisit = true
self.sizes, self.types, self.queue = {}, {}, {}

if REAGENTBANK_CONTAINER then
self:RegisterEvent('PLAYERREAGENTBANKSLOTS_CHANGED')
self:RegisterEvent('REAGENTBANK_PURCHASED')
end

self:RegisterEvent('BAG_UPDATE')
self:RegisterEvent('BAG_UPDATE_DELAYED', 'UpdateBags')
self:RegisterEvent('PLAYERBANKSLOTS_CHANGED')
self:RegisterEvent('PLAYERREAGENTBANKSLOTS_CHANGED')
self:RegisterEvent('REAGENTBANK_PURCHASED')
self:RegisterEvent('BANKFRAME_OPENED')
self:RegisterMessage('CACHE_BANK_OPENED')
self:UpdateSize(BACKPACK_CONTAINER)
self:UpdateBags()
end

function Events:BAG_UPDATE(event, bag)
self:UpdateBags()
self:UpdateContent(bag)
self.queue[bag] = true
end

function Events:PLAYERBANKSLOTS_CHANGED()
Expand All @@ -50,15 +51,16 @@ function Events:REAGENTBANK_PURCHASED()
self:UpdateContent(REAGENTBANK_CONTAINER)
end

function Events:BANKFRAME_OPENED()
function Events:CACHE_BANK_OPENED()
if self.firstVisit then
self.firstVisit = nil
self:UpdateSize(BANK_CONTAINER)
self:UpdateSize(REAGENTBANK_CONTAINER)
self:UpdateBankBags()
end

self:SendMessage('BANK_OPENED')
if REAGENTBANK_CONTAINER then
self:UpdateSize(REAGENTBANK_CONTAINER)
end
end
end


Expand All @@ -70,10 +72,14 @@ function Events:UpdateBags()
self:UpdateType(bag)
end
end

for bag in pairs(self.queue) do
self:UpdateContent(bag)
end
end

function Events:UpdateBankBags()
for bag = 1, NUM_BAG_SLOTS + GetNumBankSlots() do
for bag = 1, NUM_BAG_SLOTS + NUM_BANKBAGSLOTS do
if not self:UpdateSize(bag) then
self:UpdateType(bag)
end
Expand All @@ -88,8 +94,8 @@ function Events:UpdateSize(bag)
local _, kind = GetContainerNumFreeSlots(bag)
self.types[bag] = kind
self.sizes[bag] = new

self:SendMessage('BAG_UPDATE_SIZE', bag)
self.queue[bag] = nil
self:SendSignal('BAG_UPDATE_SIZE', bag)
return true
end
end
Expand All @@ -100,17 +106,11 @@ function Events:UpdateType(bag)

if old ~= new then
self.types[bag] = new
self:SendMessage('BAG_UPDATE_CONTENT', bag)
self:UpdateContent(bag)
end
end

function Events:UpdateContent(bag)
self:SendMessage('BAG_UPDATE_CONTENT', bag)
self.queue[bag] = nil
self:SendSignal('BAG_UPDATE_CONTENT', bag)
end


--[[ Startup ]]--

Events.firstVisit = true
Events.sizes, Events.types = {}, {}
Events:RegisterEvent('PLAYER_LOGIN')
Loading