Skip to content

Commit

Permalink
Voice of Harmony #385
Browse files Browse the repository at this point in the history
Update references to Harmonious Apparatus to be Voice of Harmony.
Fix Holy Word completes bar coloring.
  • Loading branch information
Twintop committed May 8, 2024
1 parent 137faa9 commit 9687586
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 57 deletions.
13 changes: 6 additions & 7 deletions ClassModules/Classes/PriestClasses.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ end
---@field public divineConversation TRB.Classes.SpellBase
---@field public prayerFocus TRB.Classes.SpellBase
---@field public sacredReverence TRB.Classes.SpellBase
---@field public voiceOfHarmony TRB.Classes.SpellBase
---@field public symbolOfHope TRB.Classes.SpellThreshold
---@field public smite TRB.Classes.Priest.HolyWordSpell
---@field public heal TRB.Classes.Priest.HolyWordSpell
Expand All @@ -197,7 +198,6 @@ end
---@field public holyFire TRB.Classes.Priest.HolyWordSpell
---@field public circleOfHealing TRB.Classes.Priest.HolyWordSpell
---@field public lightOfTheNaaru TRB.Classes.Priest.HolyWordSpell
---@field public harmoniousApparatus TRB.Classes.Priest.HolyWordSpell
---@field public apotheosis TRB.Classes.Priest.HolyWordSpell
TRB.Classes.Priest.HolySpells = setmetatable({}, {__index = TRB.Classes.Priest.HealerSpells})
TRB.Classes.Priest.HolySpells.__index = TRB.Classes.Priest.HolySpells
Expand Down Expand Up @@ -235,7 +235,7 @@ function TRB.Classes.Priest.HolySpells:New()
self.prayerOfMending = TRB.Classes.Priest.HolyWordSpell:New({
id = 33076,
holyWordKey = "holyWordSerenity",
holyWordReduction = 2, -- Per rank of Harmonious Apparatus
holyWordReduction = 2, -- Per rank of Voice of Harmony
isTalent = true,
baseline = true
})
Expand Down Expand Up @@ -273,13 +273,13 @@ function TRB.Classes.Priest.HolySpells:New()
self.holyFire = TRB.Classes.Priest.HolyWordSpell:New({
id = 14914,
holyWordKey = "holyWordChastise",
holyWordReduction = 2, -- Per rank of Harmonious Apparatus
holyWordReduction = 2, -- Per rank of Voice of Harmony
isTalent = true
})
self.circleOfHealing = TRB.Classes.Priest.HolyWordSpell:New({
id = 204883,
holyWordKey = "holyWordSanctify",
holyWordReduction = 2, -- Per rank of Harmonious Apparatus
holyWordReduction = 2, -- Per rank of Voice of Harmony
isTalent = true
})
self.symbolOfHope = TRB.Classes.SpellThreshold:New({
Expand All @@ -298,9 +298,8 @@ function TRB.Classes.Priest.HolySpells:New()
holyWordModifier = 0.1, -- Per rank
isTalent = true
})
self.harmoniousApparatus = TRB.Classes.Priest.HolyWordSpell:New({
id = 196985,
holyWordModifier = 0.1, -- Per rank
self.voiceOfHarmony = TRB.Classes.SpellBase:New({
id = 390994,
isTalent = true
})
self.apotheosis = TRB.Classes.Priest.HolyWordSpell:New({
Expand Down
54 changes: 6 additions & 48 deletions ClassModules/Priest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,6 @@ local function FillSpellData_Holy()
{ variable = "#coh", icon = spells.circleOfHealing.icon, description = spells.circleOfHealing.name, printInSettings = true },
{ variable = "#circleOfHealing", icon = spells.circleOfHealing.icon, description = spells.circleOfHealing.name, printInSettings = false },
{ variable = "#flashHeal", icon = spells.flashHeal.icon, description = spells.flashHeal.name, printInSettings = true },
{ variable = "#ha", icon = spells.harmoniousApparatus.icon, description = spells.harmoniousApparatus.name, printInSettings = true },
{ variable = "#harmoniousApparatus", icon = spells.harmoniousApparatus.icon, description = spells.harmoniousApparatus.name, printInSettings = false },
{ variable = "#heal", icon = spells.heal.icon, description = spells.heal.name, printInSettings = true },
{ variable = "#hf", icon = spells.holyFire.icon, description = spells.holyFire.name, printInSettings = true },
{ variable = "#holyFire", icon = spells.holyFire.icon, description = spells.holyFire.name, printInSettings = false },
Expand Down Expand Up @@ -2387,12 +2385,12 @@ local function CastingSpell()
snapshotData.casting.spellKey = "renew"
elseif currentSpellId == spells.smite.id then
snapshotData.casting.spellKey = "smite"
elseif talents:IsTalentActive(spells.harmoniousApparatus) then
if currentSpellId == spells.circleOfHealing.id then --Harmonious Apparatus / This shouldn't happen
elseif talents:IsTalentActive(spells.voiceOfHarmony) then
if currentSpellId == spells.circleOfHealing.id then --Voice of Harmony / This shouldn't happen
snapshotData.casting.spellKey = "circleOfHealing"
elseif currentSpellId == spells.prayerOfMending.id then --Harmonious Apparatus / This shouldn't happen
elseif currentSpellId == spells.prayerOfMending.id then --Voice of Harmony / This shouldn't happen
snapshotData.casting.spellKey = "prayerOfMending"
elseif currentSpellId == spells.holyFire.id then --Harmonious Apparatus
elseif currentSpellId == spells.holyFire.id then --Voice of Harmony
snapshotData.casting.spellKey = "holyFire"
end
end
Expand Down Expand Up @@ -3259,44 +3257,6 @@ local function UpdateResourceBar()
else
castingBarValue = currentResource
end

TRB.Functions.Threshold:ManageCommonHealerThresholds(currentResource, castingBarValue, specSettings, snapshots[spells.aeratedManaPotionRank1.id].cooldown, snapshots[spells.conjuredChillglobe.id].cooldown, TRB.Data.character, resourceFrame, CalculateManaGain)

local shadowfiend = snapshots[spells.shadowfiend.id]

if talents:IsTalentActive(spells.shadowfiend) and not shadowfiend.buff.isActive then
local shadowfiendThresholdColor = specSettings.colors.threshold.over
if specSettings.thresholds.shadowfiend.enabled and (not shadowfiend.cooldown:IsUnusable() or specSettings.thresholds.shadowfiend.cooldown) then
local haveTotem, timeRemaining, swingsRemaining, gcdsRemaining, timeToNextSwing, swingSpeed = GetMaximumShadowfiendResults()
local shadowfiendMana = swingsRemaining * shadowfiend.spell.attributes.resourcePercent * TRB.Data.character.maxResource

if shadowfiend.cooldown:IsUnusable() then
shadowfiendThresholdColor = specSettings.colors.threshold.unusable
end

if not haveTotem and shadowfiendMana > 0 and (castingBarValue + shadowfiendMana) < TRB.Data.character.maxResource then
TRB.Functions.Threshold:RepositionThreshold(specSettings, resourceFrame.thresholds[8], resourceFrame, (castingBarValue + shadowfiendMana), TRB.Data.character.maxResource)
---@diagnostic disable-next-line: undefined-field
resourceFrame.thresholds[8].texture:SetColorTexture(TRB.Functions.Color:GetRGBAFromString(shadowfiendThresholdColor, true))
---@diagnostic disable-next-line: undefined-field
resourceFrame.thresholds[8].icon:SetBackdropBorderColor(TRB.Functions.Color:GetRGBAFromString(shadowfiendThresholdColor, true))
resourceFrame.thresholds[8]:Show()

if specSettings.thresholds.icons.showCooldown and shadowfiend.cooldown.remaining > 0 then
resourceFrame.thresholds[8].icon.cooldown:SetCooldown(shadowfiend.cooldown.startTime, shadowfiend.cooldown.duration)
else
resourceFrame.thresholds[8].icon.cooldown:SetCooldown(0, 0)
end
else
resourceFrame.thresholds[8]:Hide()
end
else
resourceFrame.thresholds[8]:Hide()
end
else
resourceFrame.thresholds[8]:Hide()
end


local passiveValue, thresholdCount = TRB.Functions.Threshold:ManageCommonHealerPassiveThresholds(specSettings, spells, snapshotData.snapshots, passiveFrame, castingBarValue)
thresholdCount = thresholdCount + 1
Expand Down Expand Up @@ -3411,7 +3371,7 @@ local function UpdateResourceBar()
end
else
showThreshold = false
end
end
elseif spell.id == spells.symbolOfHope.id and talents:IsTalentActive(spell) then
snapshot = snapshots[spells.symbolOfHope.id]
local currentManaPercent = (currentResource / TRB.Data.character.maxResource) * 100
Expand Down Expand Up @@ -3463,7 +3423,7 @@ local function UpdateResourceBar()
holyWordCooldownCompletes = true
holyWordCooldownCompletesKey = maybeHolyWordSpell.holyWordKey
if specSettings.bar[maybeHolyWordSpell.holyWordKey .. "Enabled"] then
resourceBarColor = specSettings.colors.bar[maybeHolyWordSpell]
resourceBarColor = specSettings.colors.bar[maybeHolyWordSpell.holyWordKey]
end
end
end
Expand Down Expand Up @@ -4250,8 +4210,6 @@ local function SwitchSpec()
lookup["#coh"] = spells.circleOfHealing.icon
lookup["#circleOfHealing"] = spells.circleOfHealing.icon
lookup["#flashHeal"] = spells.flashHeal.icon
lookup["#ha"] = spells.harmoniousApparatus.icon
lookup["#harmoniousApparatus"] = spells.harmoniousApparatus.icon
lookup["#heal"] = spells.heal.icon
lookup["#hf"] = spells.holyFire.icon
lookup["#holyFire"] = spells.holyFire.icon
Expand Down
8 changes: 8 additions & 0 deletions Functions/News.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ local content = [====[
---
# 10.2.7.3-release (2024-05-09)
## Priest
### Holy
- [#385 - FIX (Twintop)](#385) Update Harmonious Apparatus to be Voice of Harmony and fix bar color change when the current cast will take the associated Holy Word spell off cooldown.
---
# 10.2.7.2-release (2024-05-08)
## General
Expand Down
4 changes: 2 additions & 2 deletions TwintopInsanityBar.toc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
## Title-zhTW: Twintop 的資源欄
## Author: Twintop
## X-AuthorServer: Frostmourne-US/OCE
## Version: 10.2.7.2
## Version: 10.2.7.3
## X-ReleaseType: release
## X-ReleaseDate: 2024-05-08
## X-ReleaseDate: 2024-05-09
## SavedVariables: TwintopInsanityBarSettings
## IconTexture: 1386550
## DefaultState: enabled
Expand Down

0 comments on commit 9687586

Please sign in to comment.