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!: Simplify aura sorting algorithm a2a294f60cee50ab51d044139f50d784bb8f3455 Vladyslav Bondarenko 2023-09-07 01:49:15
feat!: Add raid frame with 25 small buttons 5bdc57423adeb4137bc796932657cf64f22ef8ad Vladyslav Bondarenko 2023-09-01 01:12:15
feat!: Add UnitSetRole backport 1eb6a3777cb6361f57386959cdec4066715bb0a6 Vladyslav Bondarenko 2023-08-31 18:07:35
feat(build): Add separation for Cata and Wrath API c1ec823b22648324afb48852149296f6b0612830 Vladyslav Bondarenko 2023-08-31 18:05:42
feat!: Release 0.5 ff0038bc36df311a01b038e192c3e6b495e5c509 Vladyslav Bondarenko 2023-08-30 23:45:43
fix!: Remove old flavour of unit frames 58d82ae1ba66bfc0acf41b97df99746a57a7a7cd Vladyslav Bondarenko 2023-08-30 23:38:49
fix: Update solo tot frames 4204e7a2649b970d28f4b0f38f4dc60e90cd40d0 Vladyslav Bondarenko 2023-08-30 23:37:37
fix!: Update party frame to unprotected strategy 470935eb589f7ab2fa77ae1335a194420e597340 Vladyslav Bondarenko 2023-08-30 22:52:34
fix!: Render solo status bar textures correctly 22d89fffabad69df1e7dcf078805e3ff341c5023 Vladyslav Bondarenko 2023-08-30 19:14:13
fix!: Restore solo frame context menu popup 0cc446f33351c8998d2359a42000f84da19defcd Vladyslav Bondarenko 2023-08-29 22:43:22
feat!: Update unit frame layout framework 1af4c0bd53a474483d60425f2a4e40250367ecf1 Vladyslav Bondarenko 2023-08-29 21:20:40
feat: Classify rare or elite units dd2c1f490c08a75774be085b318ebcd1b2788a2b Vladyslav Bondarenko 2023-08-29 21:18:49
feat(build): Remove cgitrc 1e6b59264abab70e1f2fa9ae494c74d2606c060f Vladyslav Bondarenko 2023-08-29 14:37:03
feat(build): Add cgitrc 7288f0336e36010fb92bf60479fdca3a0082ecd1 Vladyslav Bondarenko 2023-08-29 14:14:24
feat(build): Add cgitrc ea45afc0375774c2fe6bb0a3237cfd1817529ff0 Vladyslav Bondarenko 2023-08-29 14:14:24
feat(test)!: Toggle debug mode at runtime 23c37e3ab2eaf924f41fe51adc1e54f525222a8b Vladyslav Bondarenko 2023-08-29 03:41:55
fix: Aura tooltip is always opaque 1f7ba009c71796093b8cfa63cb38d918b9696c79 Vladyslav Bondarenko 2023-08-29 01:31:40
fix: Adjust aura tooltip toggle button layout fc72d10b09f44ef9ba6f2f93413a20def40c2d4a Vladyslav Bondarenko 2023-08-29 01:30:27
feat!: Add role widget 0ac8cda6522056c8adb527ba2f144229f251f69e Vladyslav Bondarenko 2023-08-29 00:59:14
fix: Only show power bar when appropriate 5313d1bfbf676c88b5c2a0a56fbea88549633b7b Vladyslav Bondarenko 2023-08-28 22:46:36
Commit a2a294f60cee50ab51d044139f50d784bb8f3455 - fix!: Simplify aura sorting algorithm
Improve aura sorting algorithm's performance to where the framerate is
consisten in parties of >10 men. Some corner cases were sacrificed.
Author: Vladyslav Bondarenko
Author date (UTC): 2023-09-07 01:49
Committer name: Vladyslav Bondarenko
Committer date (UTC): 2023-09-07 06:54
Parent(s): 5bdc57423adeb4137bc796932657cf64f22ef8ad
Signer:
Signing key: EFF9624877D25D02
Signing status: E
Tree: abe211e1b4583580d891e638396884673af28f44
File Lines added Lines deleted
src/ChorusAuraButtonTemplate.lua 2 0
src/ChorusAuraFrameTemplate.lua 24 24
src/ChorusAuraTooltipFrameTemplate.xml 1 1
File src/ChorusAuraButtonTemplate.lua changed (mode: 100644) (index c0ce313..4ad7618)
... ... function Chorus.auraButtonMain(self)
253 253 self:RegisterEvent('UNIT_AURA') self:RegisterEvent('UNIT_AURA')
254 254 auraButtonValidate(self) auraButtonValidate(self)
255 255 end end
256
257 Chorus.auraButtonEventProcessor = auraButtonEventProcessor
File src/ChorusAuraFrameTemplate.lua changed (mode: 100644) (index ee57294..faf5d72)
1 1 local Chorus = Chorus local Chorus = Chorus
2 2
3 local auraButtonEventProcessor = Chorus.auraButtonEventProcessor
4
3 5 local UnitAura = Chorus.test.UnitAura or UnitAura local UnitAura = Chorus.test.UnitAura or UnitAura
4 6 local UnitExists = Chorus.test.UnitExists or UnitExists local UnitExists = Chorus.test.UnitExists or UnitExists
5 7 local UnitIsConnected = Chorus.test.UnitIsConnected or UnitIsConnected local UnitIsConnected = Chorus.test.UnitIsConnected or UnitIsConnected
 
... ... local auraWeightMap = {
67 69 Chorus.auraWeightMap = auraWeightMap Chorus.auraWeightMap = auraWeightMap
68 70
69 71 local function getAuraWeight(unitDesignation, auraIndex, filter) local function getAuraWeight(unitDesignation, auraIndex, filter)
70 local name, _, _, _, category, durationSec, owner = UnitAura(unitDesignation, auraIndex, filter)
72 local name, _, _, _, _, durationSec, owner = UnitAura(unitDesignation, auraIndex, filter)
71 73 if not name then if not name then
72 74 return 0 return 0
73 75 end end
74 76
75 --[[ TODO Make sure getAuraWeight implementation does not depend on locale. ]]--
76 local categoryPrio = 1
77 if 'Magic' == category then
78 categoryPrio = 5
79 elseif 'Poison' == category then
80 categoryPrio = 4
81 elseif 'Disease' == category then
82 categoryPrio = 3
83 elseif 'Curse' == category then
84 categoryPrio = 2
85 end
86 categoryPrio = math.min(math.max(1, math.floor(math.abs(categoryPrio))), 9)
87
88 77 local specialPrio = auraWeightMap[name] or 0 local specialPrio = auraWeightMap[name] or 0
89 78 specialPrio = math.min(math.max(1, math.floor(math.abs(specialPrio))), 9) specialPrio = math.min(math.max(1, math.floor(math.abs(specialPrio))), 9)
90 79
 
... ... local function getAuraWeight(unitDesignation, auraIndex, filter)
100 89
101 90 local weight = 100000 * ownerPrio + local weight = 100000 * ownerPrio +
102 91 10000 * specialPrio + 10000 * specialPrio +
103 durationIsLimited * (7201 - math.min(durationSec, 7200)) +
104 categoryPrio
92 durationIsLimited * (7201 - math.min(durationSec, 7200))
105 93 return math.abs(math.floor(weight)) return math.abs(math.floor(weight))
106 94 end end
107 95
 
... ... end
129 117 local function auraFrameEventProcessor(self, eventCategory, ...) local function auraFrameEventProcessor(self, eventCategory, ...)
130 118 assert(self ~= nil) assert(self ~= nil)
131 119
120 --[[ Optimization hack ]]--
121 --[[ Make it use table value if it lags again. ]]--
132 122 local unitDesignation = SecureButton_GetUnit(self) or 'none' local unitDesignation = SecureButton_GetUnit(self) or 'none'
133 123 assert(unitDesignation ~= nil) assert(unitDesignation ~= nil)
134 124 assert('string' == type(unitDesignation)) assert('string' == type(unitDesignation))
 
... ... local function auraFrameEventProcessor(self, eventCategory, ...)
150 140 end end
151 141 end end
152 142
143 --[[ Make it use table value if it lags again. ]]--
153 144 local filter = SecureButton_GetAttribute(self, 'filter') local filter = SecureButton_GetAttribute(self, 'filter')
154 145 assert(filter ~= nil) assert(filter ~= nil)
155 146 assert('string' == type(filter)) assert('string' == type(filter))
 
... ... local function auraFrameEventProcessor(self, eventCategory, ...)
178 169 assert(k >= 0) assert(k >= 0)
179 170 b.index = k b.index = k
180 171
181 local func = b:GetScript('OnEvent')
182 if func then
183 func(b, eventCategory, ...)
184 end
172 auraButtonEventProcessor(b, eventCategory, ...)
185 173 end end
186 174
187 175 while (i < #t) do while (i < #t) do
 
... ... local function auraFrameEventProcessor(self, eventCategory, ...)
190 178 assert(b ~= nil) assert(b ~= nil)
191 179 b.index = 0 b.index = 0
192 180
193 local func = b:GetScript('OnEvent')
194 if func then
195 func(b, eventCategory, ...)
196 end
181 auraButtonEventProcessor(b, eventCategory, ...)
197 182 end end
198 183 end end
199 184
 
... ... function Chorus.auraFrameMain(self)
244 229 self:RegisterEvent('PLAYER_TARGET_CHANGED') self:RegisterEvent('PLAYER_TARGET_CHANGED')
245 230 self:RegisterEvent('UNIT_AURA') self:RegisterEvent('UNIT_AURA')
246 231
232 --[[ Disable redundant aura updates. ]]--
233 local t = {self:GetChildren()}
234 local i = 0
235 while (i < #t) do
236 i = i + 1
237 local b = t[i]
238 if b then
239 b:UnregisterEvent('UNIT_AURA')
240 end
241 end
242
243 --[[ Optimization hack. This function call is expensive. Probably. ]]--
244 self.unit = SecureButton_GetUnit(self)
245 self.filter = SecureButton_GetAttribute(self, 'filter')
246
247 247 self:SetScript('OnEvent', auraFrameEventProcessor) self:SetScript('OnEvent', auraFrameEventProcessor)
248 248 end end
File src/ChorusAuraTooltipFrameTemplate.xml changed (mode: 100644) (index c33f474..9221d05)
81 81 <Attribute name="useparent-unit" type="boolean" value="true"/> <Attribute name="useparent-unit" type="boolean" value="true"/>
82 82 </Attributes> </Attributes>
83 83 </Frame> </Frame>
84 <Button name="ChorusAuraTooltipFrameToggleButtonTemplate" virtual="true" enableMouse="true" inherits="SecureActionButtonTemplate" hidden="true">
84 <Button name="ChorusAuraTooltipFrameToggleButtonTemplate" virtual="true" enableMouse="true" inherits="SecureActionButtonTemplate">
85 85 <Size> <Size>
86 86 <AbsDimension x="16" y="16"/> <AbsDimension x="16" y="16"/>
87 87 </Size> </Size>
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