Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added sets: Mantle of Siroria, Domihaus, Winter's Respite #25

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
123 changes: 122 additions & 1 deletion src/Data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,116 @@ function Cool.GetSetData()
-- local isSet, setName, _, _, _, setId = GetItemLinkSetInfo(itemLink, false)

Cool.Data.Sets = {
--["Encratis's Behemoth"] = {
[577] = {
procType = "set",
event = EVENT_COMBAT_EVENT,
description = "Displays when the Sentinel of Rkugamz proc is available or cooldown until it is ready again.",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this description text correct?

id = {151033},
result = ACTION_RESULT_EFFECT_GAINED,
cooldownDurationMs = 15000,
texture = "/esoui/art/icons/monster_fire_elemental_embers_001.dds",
showFrame = false,
},
--["Stone-Talker"] = {
[588] = {
procType = "set",
event = EVENT_COMBAT_EVENT,
description = "Displays when the Stone-Talker proc is available or cooldown until it is ready again.",
id = 154786,
result = ACTION_RESULT_EFFECT_GAINED,
cooldownDurationMs = 10000,
texture = "/esoui/art/icons/placeholder/icon_spell_rest_convalescence01.dds",
showFrame = true,
},
--["Perfected Stone-Talker"] = {
[592] = {
procType = "set",
event = EVENT_COMBAT_EVENT,
description = "Displays when the Perfected Stone-Talker proc is available or cooldown until it is ready again.",
id = 154786,
result = ACTION_RESULT_EFFECT_GAINED,
cooldownDurationMs = 10000,
texture = "/esoui/art/icons/placeholder/icon_spell_rest_convalescence01.dds",
showFrame = true,
},
--["Perfected Void Bash"] = {
[564] = {
procType = "set",
event = EVENT_COMBAT_EVENT,
description = "Displays when the Perfected Void Bash proc is available or cooldown until it is ready again.",
id = 147744,
result = ACTION_RESULT_EFFECT_GAINED,
cooldownDurationMs = 13000,
texture = "/esoui/art/icons/gear_voriplasm_shield_a.dds",
showFrame = false,
},
--["Void Bash"] = {
[558] = {
procType = "set",
event = EVENT_COMBAT_EVENT,
description = "Displays when the Void Bash proc is available or cooldown until it is ready again.",
id = 147744,
result = ACTION_RESULT_EFFECT_GAINED,
cooldownDurationMs = 13000,
texture = "/esoui/art/icons/gear_voriplasm_shield_a.dds",
showFrame = false,
},
--["Sentinel of Rkugamz"] = {
[268] = {
procType = "set",
event = EVENT_COMBAT_EVENT,
description = "Displays when the Sentinel of Rkugamz proc is available or cooldown until it is ready again.",
id = {81036},
result = ACTION_RESULT_EFFECT_GAINED,
cooldownDurationMs = 15000,
texture = "/esoui/art/icons/gear_undauntedcenturion_head_a.dds",
showFrame = false,
},
--["Tremorscale"] = {
[276] = {
procType = "set",
event = EVENT_COMBAT_EVENT,
description = "Displays when the Tremorscale proc is available or cooldown until it is ready again.",
id = {80517,80865},
result = ACTION_RESULT_EFFECT_GAINED,
cooldownDurationMs = 8000,
texture = "/esoui/art/icons/gear_undauntedsuneripper_head_a.dds",
showFrame = false,
},
--["Mantle of Siroria"] = {
[390] = {
procType = "set",
event = EVENT_COMBAT_EVENT,
description = "Displays when the Mantle of Siroria proc is available or cooldown until it is ready again.",
id = 110067,
result = ACTION_RESULT_EFFECT_GAINED,
cooldownDurationMs = 10000,
texture = "/esoui/art/icons/placeholder/icon_offense_weaponcharge_01.dds",
showFrame = true,
},
--["Domihaus"] = {
[342] = {
procType = "set",
event = EVENT_COMBAT_EVENT,
description = "Displays when the Domihaus proc is available or cooldown until it is ready again.",
id = {97901,97882},
result = ACTION_RESULT_EFFECT_GAINED,
cooldownDurationMs = 15000,
texture = "/esoui/art/icons/gear_undauntedminotaur_a.dds",
showFrame = false,
},
--["Winter's Respite"] = {
[487] = {
procType = "set",
event = EVENT_COMBAT_EVENT,
description = "Displays when the Winter's Respite proc is available or cooldown until it is ready again.",
id = 135659,
result = ACTION_RESULT_EFFECT_GAINED,
cooldownDurationMs = 10000,
texture = "/esoui/art/champion/champion_points_magicka_icon-hud.dds",
showFrame = true,
},
--["Magicka Furnace"] = {
[103] = {
procType = "set",
Expand Down Expand Up @@ -190,7 +300,7 @@ function Cool.GetSetData()
description = "Displays when the heal proc is ready or when it will be available, but not the duration of the heal over time.",
id = 97855,
result = ACTION_RESULT_EFFECT_GAINED,
cooldownDurationMs = 35000,
cooldownDurationMs = 20000,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #15

texture = "/esoui/art/icons/gear_undaunted_ironatronach_head_a.dds",
showFrame = false,
},
Expand Down Expand Up @@ -385,6 +495,17 @@ function Cool.GetSetData()
texture = "/esoui/art/icons/ability_debuff_offbalance.dds",
showFrame = true,
},
-- ["Perfected Claw of Yolnahkriin"] = {
[451] = {
procType = "set",
event = EVENT_COMBAT_EVENT,
description = "Displays when the Minor Courage effect is able to be applied, but does not indicate the duration of Minor Courage.",
id = 121878,
result = ACTION_RESULT_EFFECT_GAINED,
cooldownDurationMs = 8000,
texture = "/esoui/art/icons/placeholder/icon_health_major.dds",
showFrame = true,
},
-- ["Claw of Yolnahkriin"] = {
[446] = {
-- Thanks to Troodon80 for providing code and suggestion for this!
Expand Down
1 change: 1 addition & 0 deletions src/Defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ local defaults = {
gridSize = 16,
showOutsideCombat = true,
lagCompensation = true,
audioNotifications = true,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

size = 64,
timerSize = 36,
sounds = {
Expand Down
2 changes: 1 addition & 1 deletion src/Interface.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function Cool.UI.Update(setKey)
set.onCooldown = false
label:SetText("")
texture:SetColor(1, 1, 1, 1)
Cool.UI.PlaySound(Cool.preferences.sets[setKey].sounds.onReady)
if Cool.preferences.audioNotifications then Cool.UI.PlaySound(Cool.preferences.sets[setKey].sounds.onReady) end
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about moving the condition to check for audioNotifications moving to inside Cool.UI.Playsound?

e.g.

function Cool.UI.PlaySound(sound)
    if sound.enabled and Cool.preferences.audioNotifications then
        PlaySound(SOUNDS[sound.sound])
    end
end

elseif (countdown < 10) then
label:SetText(zo_strformat("<<1>>", string.format("%.1f", countdown)))
else
Expand Down
2 changes: 1 addition & 1 deletion src/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
-- -----------------------------------------------------------------------------
Cool = Cool or {}
Cool.name = "Cooldowns"
Cool.version = "1.7.0"
Cool.version = "1.8.0"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As v1.7.0 is still in dev, no need to bump the version yet.

Cool.dbVersion = 1
Cool.slash = "/cool"
Cool.prefix = "[Cooldowns] "
Expand Down
17 changes: 17 additions & 0 deletions src/Settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ local function SetLagCompensation(value)
Cool.preferences.lagCompensation = value
end

-- Audio Notifications
local function GetAudioNotifications()
return Cool.preferences.audioNotifications
end

local function SetAudioNotifications(value)
Cool.preferences.audioNotifications = value
end

-- Sizing
local function SetSize(setKey, size)
local context = WM:GetControlByName(setKey .. "_Container")
Expand Down Expand Up @@ -371,6 +380,14 @@ function Cool.Settings.Init()
setFunc = function(value) SetLagCompensation(value) end,
width = "full",
},
{
type = "checkbox",
name = "Enable Audio Notifications",
tooltip = "Disable audio notifications globally.",
getFunc = function() return GetAudioNotifications() end,
setFunc = function(value) SetAudioNotifications(value) end,
width = "full",
},
{
type = "checkbox",
name = "Show Outside of Combat",
Expand Down
6 changes: 3 additions & 3 deletions src/Tracking.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ local function OnCooldownUpdated(setKey, eventCode, abilityId)
end

set.onCooldown = true
Cool.UI.PlaySound(Cool.preferences.sets[setKey].sounds.onProc)
if Cool.preferences.audioNotifications then Cool.UI.PlaySound(Cool.preferences.sets[setKey].sounds.onProc) end
EM:RegisterForUpdate(Cool.name .. setKey .. "Count", updateIntervalMs, function(...) Cool.UI.Update(setKey) return end)

Cool:Trace(1, "Cooldown proc for <<1>> (<<2>>)", setKey, abilityId)
Expand All @@ -51,11 +51,11 @@ local function OnCombatEvent(setKey, _, result, _, abilityName, _, _, _, _, _, _

if result == ACTION_RESULT_ABILITY_ON_COOLDOWN then
Cool:Trace(1, "<<1>> (<<2>>) on Cooldown", abilityName, abilityId)
elseif result == set.result then
elseif result == set.result and not set.onCooldown then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good addition. Makes me even more sad that ACTION_RESULT_ABILITY_ON_COOLDOWN is no longer in the game.

Cool:Trace(1, "Name: <<1>> ID: <<2>> with result <<3>>", abilityName, abilityId, result)
set.onCooldown = true
set.timeOfProc = GetGameTimeMilliseconds()
Cool.UI.PlaySound(Cool.preferences.sets[setKey].sounds.onProc)
if Cool.preferences.audioNotifications then Cool.UI.PlaySound(Cool.preferences.sets[setKey].sounds.onProc) end
EM:RegisterForUpdate(Cool.name .. setKey .. "Count", updateIntervalMs, function(...) Cool.UI.Update(setKey) return end)
else
Cool:Trace(1, "Name: <<1>> ID: <<2>> with result <<3>>", abilityName, abilityId, result)
Expand Down