vrtc / chorus (public) (License: CC0) (since 2023-08-12) (hash sha1)
World of Warcraft add-on stub. The overall goal is to create a specialized raid frame.
List of commits:
Subject Hash Author Date (UTC)
fix!: Change aura sorting ba249c7309ccbcb14fea727b347c3dd532af73ee Vladyslav Bondarenko 2023-08-19 20:40:31
feat: Show player in party 198e8c86b9b93dd9c3edf7045d5bbcb9142d76d6 Vladyslav Bondarenko 2023-08-19 20:38:40
feat(doc)!: Add project description 4b406a549e83dda3845104e8a6a233eae481a3c8 Vladyslav Bondarenko 2023-08-19 05:58:50
fix: Typo in ChorusRaidFrame 61fb4f93c227e3b94a52df26eeffece12fe86e55 Vladyslav Bondarenko 2023-08-18 21:00:34
feat(build): Document build validation scripts d19d03c4a20c8c02fee8b4c1c00241c58baa12eb Vladyslav Bondarenko 2023-08-18 20:57:35
feat: Update raid frame ff5ad9619c6af14f7e1719cbaaf34fa0465c1f12 Vladyslav Bondarenko 2023-08-18 20:54:29
feat: Update add-on loading mechanism 2d8df81c17fbfcaf8d0bb966a3373503bb32a585 Vladyslav Bondarenko 2023-08-18 19:59:39
feat: Update progress frames on demand only 7c18488e61b5889eca4b057602fbc41883fc53f1 Vladyslav Bondarenko 2023-08-18 19:50:41
feat: Add basic font customization 321c2e6251e2e619101f8d57b4d4b1ef10a79694 Vladyslav Bondarenko 2023-08-18 17:29:12
fix: Improve range indicator accuracy 17ee7011ae6bdd3e28bae4694d40a68ea799d001 Vladyslav Bondarenko 2023-08-17 23:52:43
feat!: Add target range indicator 83b3fae1f675042b7d9e89c09aedc864e8fcaa27 Vladyslav Bondarenko 2023-08-17 22:41:08
feat: Add class color code to target frame 990cdf1d9f44c9916948697e74f86d6490d83304 Vladyslav Bondarenko 2023-08-17 20:59:28
feat: Add solo unit buttons 4658af2b5142ff2ca86c2c4b48577879117a9ecc Vladyslav Bondarenko 2023-08-17 20:38:10
feat: Add power bar to raid unit button b25bd8d28c30cb003bf8cfe2886e2cfd8442d32f Vladyslav Bondarenko 2023-08-17 18:48:29
feat!: Add basic raid frame stub 66e27810a396b564cf7cd737e1f402f4f433b879 Vladyslav Bondarenko 2023-08-17 17:40:08
feat: Add raid frame stub 5fd737cef8e3fc700bab1e6a89ceb68c21495eea Vladyslav Bondarenko 2023-08-16 02:35:08
fix: Show auras correctly at startup 54136c9cedf83fa2a8559b879ab8410a6e28646c Vladyslav Bondarenko 2023-08-15 19:15:48
fix!: Shadowing correct functions 53991b2f7093e765993f8423377602ca22e234da Vladyslav Bondarenko 2023-08-15 18:22:56
fix: Add UnitClass shadowing local e87c61c3cae4cdb945714c67259a6304201968d0 Vladyslav Bondarenko 2023-08-15 18:21:32
feat!: Add unit name b8358f834b4a9c25a6d057d91ed56e3b4d7dc320 Vladyslav Bondarenko 2023-08-15 18:21:12
Commit ba249c7309ccbcb14fea727b347c3dd532af73ee - fix!: Change aura sorting
Buffs and debuffs shown for raid units are sorted by priority. The
priority is roughly: owner > special exceptions > duration > category.
The new priority system allows for more relevant effects to be visible
to the user.

Previously the priority was rougly: owner > category > special
exceptions > duration. This resulted in relevant effects being
truncated and hidden. This commit attempts to fix this issue.

Special exceptions are major effects that change how unit is perceived
by other players. Example special exceptions include: Divine Shield, Ice
Block, Blind, and many others.
Author: Vladyslav Bondarenko
Author date (UTC): 2023-08-19 20:40
Committer name: Vladyslav Bondarenko
Committer date (UTC): 2023-08-19 20:40
Parent(s): 198e8c86b9b93dd9c3edf7045d5bbcb9142d76d6
Signer:
Signing key: EFF9624877D25D02
Signing status: E
Tree: 38211d6c8ce7a36f4e7da1f091b7cad42558839d
File Lines added Lines deleted
src/ChorusAuraButtonTemplate.lua 42 17
src/ChorusAuraFrameTemplate.lua 15 11
File src/ChorusAuraButtonTemplate.lua changed (mode: 100644) (index e0490d7..0151ce4)
... ... local function applyOverlay(auraButton, category)
87 87 end end
88 88 end end
89 89
90 local function applyDuration(auraButton, now, durationSec, expirationInstance)
90 local function formatDuration(durationSec)
91 assert(durationSec ~= nil)
92 assert('number' == type(durationSec))
93
94 local t
95 if durationSec < 60 then
96 t = string.format("%.0f", durationSec)
97 elseif durationSec < 3600 then
98 t = string.format("%.0f m", durationSec / 60)
99 else
100 t = string.format("%.0f h", durationSec / 60 / 60)
101 end
102 return t
103 end
104
105 local function applyDuration(auraButton, now, totalDurationSec, expirationInstance)
91 106 auraButtonValidate(auraButton) auraButtonValidate(auraButton)
92 107
93 108 assert(now ~= nil) assert(now ~= nil)
94 109 assert('number' == type(now)) assert('number' == type(now))
95 110 assert(now >= 0) assert(now >= 0)
96 111
97 assert(durationSec ~= nil)
98 assert('number' == type(durationSec))
99 assert(durationSec >= 0)
112 assert(totalDurationSec ~= nil)
113 assert('number' == type(totalDurationSec))
114 assert(totalDurationSec >= 0)
100 115
101 116 assert(expirationInstance ~= nil) assert(expirationInstance ~= nil)
102 117 assert('number' == type(expirationInstance)) assert('number' == type(expirationInstance))
 
... ... local function applyDuration(auraButton, now, durationSec, expirationInstance)
105 120 local label = auraButton.label local label = auraButton.label
106 121 assert (label ~= nil) assert (label ~= nil)
107 122
108 local t
109 if durationSec and now < expirationInstance then
110 local d = expirationInstance - now
111 if d < 60 then
112 t = string.format("%.0f", d)
113 elseif d < 3600 then
114 t = string.format("%.0f m", d / 60)
115 else
116 t = string.format("%.0f h", d / 60 / 60)
123 local durationRemainingSec
124 if totalDurationSec and now < expirationInstance then
125 durationRemainingSec = expirationInstance - now
126 end
127
128 local isButtonLarge = auraButton:GetHeight() >= 24
129
130 --[[ User readability tweaks. ]]--
131 local t = nil
132 if isButtonLarge then
133 --[[ Given large button, separate text from artwork. ]]--
134 label:SetJustifyV('BOTTOM')
135 if durationRemainingSec then
136 t = formatDuration(durationRemainingSec)
117 137 end end
118 138 else else
119 t = nil
139 --[[ Given small button, overlap text with artwork. Additionally, only show short durations. ]]--
140 label:SetJustifyV('CENTER')
141 if durationRemainingSec and durationRemainingSec < 60 then
142 t = formatDuration(durationRemainingSec)
143 end
120 144 end end
121 145
122 146 label:SetText(t) label:SetText(t)
123 147
124 if auraButton:GetHeight() >= 24 then
125 label:SetJustifyV('BOTTOM')
148 local artwork = auraButton.artwork
149 if artwork and totalDurationSec and durationRemainingSec and totalDurationSec >= 12 and durationRemainingSec <= 3 then
150 artwork:SetAlpha(0.6)
126 151 else else
127 label:SetJustifyV('CENTER')
152 artwork:SetAlpha(1)
128 153 end end
129 154 end end
130 155
File src/ChorusAuraFrameTemplate.lua changed (mode: 100644) (index 3f93a2c..cb1d4f4)
... ... local function getAuraWeight(unitDesignation, auraIndex, filter)
73 73 end end
74 74
75 75 --[[ TODO Make sure getAuraWeight implementation does not depend on locale. ]]-- --[[ TODO Make sure getAuraWeight implementation does not depend on locale. ]]--
76 local major = 1
76 local categoryPrio = 1
77 77 if 'Magic' == category then if 'Magic' == category then
78 major = 5
78 categoryPrio = 5
79 79 elseif 'Poison' == category then elseif 'Poison' == category then
80 major = 4
80 categoryPrio = 4
81 81 elseif 'Disease' == category then elseif 'Disease' == category then
82 major = 3
82 categoryPrio = 3
83 83 elseif 'Curse' == category then elseif 'Curse' == category then
84 major = 2
84 categoryPrio = 2
85 85 end end
86 major = math.min(math.max(1, math.floor(math.abs(major))), 9)
86 categoryPrio = math.min(math.max(1, math.floor(math.abs(categoryPrio))), 9)
87 87
88 local minor = auraWeightMap[name] or 0
89 minor = math.min(math.max(1, math.floor(math.abs(minor))), 9)
88 local specialPrio = auraWeightMap[name] or 0
89 specialPrio = math.min(math.max(1, math.floor(math.abs(specialPrio))), 9)
90 90
91 local patch = 1
91 local durationIsLimited = 1
92 92 if not durationSec or durationSec < 1 then if not durationSec or durationSec < 1 then
93 patch = 0
93 durationIsLimited = 0
94 94 end end
95 95
96 96 local ownerPrio = 1 local ownerPrio = 1
 
... ... local function getAuraWeight(unitDesignation, auraIndex, filter)
98 98 ownerPrio = 2 ownerPrio = 2
99 99 end end
100 100
101 return 1000000 * ownerPrio + major * 100000 + minor * 10000 + patch * (3601 - math.min(durationSec, 3600))
101 local weight = 1000 * ownerPrio +
102 100 * specialPrio +
103 durationIsLimited * (91 - math.min(durationSec, 90)) +
104 categoryPrio
105 return math.abs(math.floor(weight))
102 106 end end
103 107
104 108 local function getAuraPriorityList(unitDesignation, filter) local function getAuraPriorityList(unitDesignation, filter)
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/vrtc/chorus

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/vrtc/chorus

Clone this repository using git:
git clone git://git.rocketgit.com/user/vrtc/chorus

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main