Skip to content

Commit

Permalink
add eclipseDirection to power trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbuds authored and InfusOnWoW committed Mar 31, 2024
1 parent 1f738ea commit 7836ba7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
15 changes: 15 additions & 0 deletions WeakAuras/Prototypes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3203,6 +3203,9 @@ Private.event_prototypes = {
if WeakAuras.IsClassicEraOrWrath() and trigger.use_showCost and trigger.unit == "player" then
tinsert(result, "WA_UNIT_QUEUED_SPELL_CHANGED");
end
if WeakAuras.IsCataClassic() and trigger.unit == "player" and trigger.use_powertype and trigger.powertype == 26 then
tinsert(result, "ECLIPSE_DIRECTION_CHANGE");
end
return result
end,
loadFunc = function(trigger)
Expand Down Expand Up @@ -3438,6 +3441,18 @@ Private.event_prototypes = {
end,
test = "true"
},
{
name = "eclipseDirection",
display = L["Eclipse Direction"],
type = "select",
values = "eclipse_direction_types",
init = "GetEclipseDirection()",
conditionType = "select",
store = true,
enable = function(trigger)
return WeakAuras.IsCataClassic() and trigger.unit == "player" and trigger.use_powertype and trigger.powertype == 26
end,
},
{
name = "power",
display = L["Power"],
Expand Down
8 changes: 8 additions & 0 deletions WeakAuras/Types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1450,6 +1450,14 @@ elseif WeakAuras.IsCataClassic() then
Private.power_types[17] = nil
Private.power_types[18] = nil
Private.power_types[26] = L["Eclipse"] -- couldn't find a localised global

---@class Private
---@field eclipse_direction_types table<string, string>
Private.eclipse_direction_types = {
none = L["None"],
sun = L["Sun"],
moon = L["Moon"]
}
end

---@class Private
Expand Down

0 comments on commit 7836ba7

Please sign in to comment.