List of commits:
Subject Hash Author Date (UTC)
feat: Add Serendipity and Surge of Light indicators ba1d0f32a4b8f4f5d4e2730f0a4e409e23b52974 Vladyslav Bondarenko 2020-12-10 16:19:55
Initial commit 9b3df418e373218125fec12271084afebb11cfc2 Vladyslav Bondarenko 2020-12-04 10:27:24
Commit ba1d0f32a4b8f4f5d4e2730f0a4e409e23b52974 - feat: Add Serendipity and Surge of Light indicators
Add two new indicators for priest talents: Serendipity and
Surge of Light. Additionally allow aura stacks to show on the indicator.
Author: Vladyslav Bondarenko
Author date (UTC): 2020-12-10 16:19
Committer name: Vladyslav Bondarenko
Committer date (UTC): 2020-12-10 16:19
Parent(s): 9b3df418e373218125fec12271084afebb11cfc2
Signing key:
Tree: 586062f6ffebe68b54e42f9fd038361bc5f1ae44
File Lines added Lines deleted
gradle.properties 1 1
src/ClearcastingFrame.lua 17 4
File gradle.properties changed (mode: 100644) (index 6b09920..830451f)
1 version=0.0.1-SNAPSHOT
1 version=0.0.2-SNAPSHOT
File src/ClearcastingFrame.lua changed (mode: 100644) (index e40322e..7c61142)
... ... end
213 213 local function getUnitAuraRemainingSecs(unitDesignation, auraId) local function getUnitAuraRemainingSecs(unitDesignation, auraId)
214 214 local auraName = GetSpellInfo(auraId) local auraName = GetSpellInfo(auraId)
215 215 assert (auraName ~= nil) assert (auraName ~= nil)
216 local name, _, _, _, _,
216 local name, _, _, stackQuantity, _,
217 217 duration, expirationTime = UnitAura(unitDesignation, auraName) duration, expirationTime = UnitAura(unitDesignation, auraName)
218 218 if nil == name then if nil == name then
219 219 return -1 return -1
220 220 end end
221 return (expirationTime - GetTime()), duration
221 if nil == stackQuantity or type(stackQuantity) ~= 'number' then
222 stackQuantity = 0
223 end
224 stackQuantitiy = math.min(math.max(0, stackQuantity), 8)
225 return (expirationTime - GetTime()), duration, stackQuantity
222 226 end end
223 227
224 228 local function updateEveryIndicator(rootFrame) local function updateEveryIndicator(rootFrame)
 
... ... local function updateEveryIndicator(rootFrame)
231 235 if auraId ~= nil then if auraId ~= nil then
232 236 assert (auraId >= 1) assert (auraId >= 1)
233 237 local unitDesignation = f.unitDesignation local unitDesignation = f.unitDesignation
234 local remainingSecs, duration = getUnitAuraRemainingSecs(unitDesignation, auraId)
238 local remainingSecs, duration, stackQuantity = getUnitAuraRemainingSecs(unitDesignation, auraId)
235 239 if remainingSecs > 0 then if remainingSecs > 0 then
236 240 f:Show() f:Show()
237 f.text:SetText(string.format("%.0f", remainingSecs))
241 local t = ''
242 if stackQuantity > 1 then
243 t = string.format("%.0f\r\n(%d)", remainingSecs, stackQuantity)
244 else
245 t = string.format("%.0f", remainingSecs)
246 end
247 f.text:SetText(t)
238 248 local r = remainingSecs / duration local r = remainingSecs / duration
239 249 local bleed = math.min(1.5 * r, 1) local bleed = math.min(1.5 * r, 1)
240 250 f.background:SetVertexColor(1, bleed, bleed) f.background:SetVertexColor(1, bleed, bleed)
 
... ... local function initEveryIndicator(rootFrame)
355 365 local _, playerClassDesignation = UnitClass('player') local _, playerClassDesignation = UnitClass('player')
356 366 if 'PALADIN' == playerClassDesignation then if 'PALADIN' == playerClassDesignation then
357 367 initPaladinIndicator(rootFrame) initPaladinIndicator(rootFrame)
368 elseif 'PRIEST' == playerClassDesignation then
369 initIndicator(rootFrame, 'Surge of Light', 0, 2, 33151)
370 initIndicator(rootFrame, 'Serendipity', 0, 3, 63731)
358 371 elseif 'DRUID' == playerClassDesignation then elseif 'DRUID' == playerClassDesignation then
359 372 initIndicator(rootFrame, 'Clearcasting', 0, 0) initIndicator(rootFrame, 'Clearcasting', 0, 0)
360 373 elseif 'WARRIOR' == playerClassDesignation then elseif 'WARRIOR' == playerClassDesignation then
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/clearcasting

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

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

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