new conditional channeltime and bump version

This commit is contained in:
Jrc13245
2025-11-27 18:18:54 -05:00
parent 8764fc1dd3
commit 5b5d8860c5
3 changed files with 26 additions and 1 deletions
+16
View File
@@ -1977,6 +1977,22 @@ CleveRoids.Keywords = {
return CleveRoids.CurrentSpell.type ~= "channeled"
end,
channeltime = function(conditionals)
local playerCast = CleveRoids.spell_tracking[CleveRoids.playerGuid]
if not playerCast or playerCast.type ~= "CHANNEL" then
return false
end
local timeLeft = playerCast.expires - GetTime()
local check = conditionals.channeltime
if type(check) == "table" and check.operator and check.amount then
return CleveRoids.comparators[check.operator](timeLeft, check.amount)
end
return false
end,
targeting = function(conditionals)
return Or(conditionals.targeting, function (unit)
return (UnitIsUnit("targettarget", unit) == 1)
+9
View File
@@ -233,6 +233,14 @@ Icons and tooltips automatically update to the first action with passing conditi
/use 2288
```
### Channel Time Conditional
Recast channeled spells when time remaining is below threshold:
```lua
#showtooltip Arcane Missiles
/cast [channeltime:<0.5] Arcane Missiles
```
This will recast Arcane Missiles only when less than 0.5 seconds remain on the current channel, preventing early cancellation and maximizing damage.
### Macro References
Macro 1 shows Macro 2's icon when out of combat:
```lua
@@ -487,6 +495,7 @@ Default `[noimmune]` checks the debuff school (bleed).
|-------------|--------|:-----:|:------:|-----------|
| cdgcd | [cdgcd:"Name">X] | * | * | Cooldown **INCLUDING** GCD |
| channeled | [channeled] | | * | Player channeling |
| channeltime | [channeltime:<0.5] | * | | Remaining channel time |
| checkchanneled | [checkchanneled] | | | Prevent recasting channel |
| combo | [combo:>#3] | * | * | Combo points |
| cooldown | [cooldown:"Name"<X] | * | * | Cooldown **IGNORING** GCD |
+1 -1
View File
@@ -2,7 +2,7 @@
## Author: DWG, _brain, Torio, yani9o
## Title: [Super]CleveRoidMacros
## Notes: /cleveroid for settings
## Version: 1.3
## Version: 1.4
## OptionalDeps: ClassicFocus, FocusFrame, pfUI, SuperMacro, Bongos_ActionBar
## SavedVariables: CleveRoidMacros, CleveRoids_LearnedDurations, CleveRoids_AuraTextures, CleveRoids_ImmunityData, CleveRoids_ComboDurations
Localization.lua