Skip to content

Commit

Permalink
Merge branch 'thewarwithin' of https://github.com/Hekili/hekili into …
Browse files Browse the repository at this point in the history
…thewarwithin
  • Loading branch information
Hekili committed Oct 30, 2024
2 parents b694390 + 9696c14 commit c7c37e7
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
20 changes: 19 additions & 1 deletion TheWarWithin/RogueAssassination.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local Hekili = _G[ addon ]
local class, state = Hekili.Class, Hekili.State
local PTR = ns.PTR
local GetUnitChargedPowerPoints = GetUnitChargedPowerPoints
local format, wipe, max = string.format, table.wipe, math.max
local strformat, wipe, max = string.format, table.wipe, math.max
local UA_GetPlayerAuraBySpellID = C_UnitAuras.GetPlayerAuraBySpellID

local orderedPairs = ns.orderedPairs
Expand Down Expand Up @@ -2743,6 +2743,14 @@ spec:RegisterAbilities( {

toggle = "cooldowns",

readyTime = function ()
local reserved = settings.vanish_charges_reserved or 0
if reserved > 0 then
local cd = cooldown.vanish
return ( 1 + reserved - cd.charges_fractional ) * cd.recharge
end
end,

handler = function ()
applyBuff( "vanish" )
applyBuff( "stealth" )
Expand Down Expand Up @@ -2916,6 +2924,16 @@ spec:RegisterSetting( "mfd_points", 3, {
width = "full"
} )

spec:RegisterSetting( "vanish_charges_reserved", 0, {
name = strformat( "Reserve %s Charges", Hekili:GetSpellLinkWithTexture( 1856 ) ),
desc = strformat( "If set above zero, %s will not be recommended if it would leave you with fewer (fractional) charges.", Hekili:GetSpellLinkWithTexture( 1856 ) ),
type = "range",
min = 0,
max = 2,
step = 0.1,
width = "full"
} )

spec:RegisterSetting( "solo_vanish", true, {
name = "Allow |T132331:0|t Vanish when Solo",
desc = "If unchecked, the addon will not recommend |T132331:0|t Vanish when you are alone (to avoid resetting combat).",
Expand Down
10 changes: 10 additions & 0 deletions TheWarWithin/RogueOutlaw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,16 @@ spec:RegisterSetting( "allow_shadowmeld", false, {
end,
} )

spec:RegisterSetting( "vanish_charges_reserved", 0, {
name = strformat( "Reserve %s Charges", Hekili:GetSpellLinkWithTexture( 1856 ) ),
desc = strformat( "If set above zero, %s will not be recommended if it would leave you with fewer (fractional) charges.", Hekili:GetSpellLinkWithTexture( 1856 ) ),
type = "range",
min = 0,
max = 2,
step = 0.1,
width = "full"
} )

spec:RegisterSetting( "solo_vanish", true, {
name = strformat( "%s: Solo", Hekili:GetSpellLinkWithTexture( 1856 ) ),
desc = strformat( "If unchecked, %s will not be recommended if you are playing alone, to avoid resetting combat.",
Expand Down
11 changes: 10 additions & 1 deletion TheWarWithin/RogueSubtlety.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1558,14 +1558,23 @@ spec:RegisterSetting( "rupture_duration", 12, {
width = "full",
} )

spec:RegisterSetting( "vanish_charges_reserved", 0, {
name = strformat( "Reserve %s Charges", Hekili:GetSpellLinkWithTexture( 1856 ) ),
desc = strformat( "If set above zero, %s will not be recommended if it would leave you with fewer (fractional) charges.", Hekili:GetSpellLinkWithTexture( 1856 ) ),
type = "range",
min = 0,
max = 2,
step = 0.1,
width = "full"
} )

spec:RegisterSetting( "solo_vanish", true, {
name = "Allow |T132331:0|t Vanish when Solo",
desc = "If unchecked, the addon will not recommend |T132331:0|t Vanish when you are alone (to avoid resetting combat).",
type = "toggle",
width = "full"
} )


spec:RegisterSetting( "allow_shadowmeld", nil, {
name = "Allow |T132089:0|t Shadowmeld",
desc = "If checked, |T132089:0|t Shadowmeld can be recommended for Night Elves when its conditions are met. Your stealth-based abilities can be used in Shadowmeld, even if your action bar does not change. " ..
Expand Down

0 comments on commit c7c37e7

Please sign in to comment.