Skip to content

Commit

Permalink
Drangonflying Load Option
Browse files Browse the repository at this point in the history
Use the power bar's visibility instead of CanGlide, because that appears
to be bugged.

Can't test it though.

Fixes: WeakAuras#4721
  • Loading branch information
InfusOnWoW committed Nov 26, 2023
1 parent b41db9a commit 28bba15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -3672,6 +3672,7 @@ globals = {
"UnitPosition",
"UnitPower",
"UnitPowerBarTimerInfo",
"UnitPowerBarID",
"UnitPowerDisplayMod",
"UnitPowerMax",
"UnitPartialPower",
Expand Down
5 changes: 3 additions & 2 deletions WeakAuras/Dragonriding.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ local function HandleEvent(self, event, arg1)
end

local frame = CreateFrame("Frame")
frame:RegisterEvent("PLAYER_CAN_GLIDE_CHANGED")
frame:RegisterEvent("UNIT_POWER_BAR_SHOW")
frame:RegisterEvent("UNIT_POWER_BAR_HIDE")
frame:RegisterEvent("PLAYER_ENTERING_WORLD")
frame:SetScript("OnEvent", HandleEvent)

Private.IsDragonriding = function ()
return select(2, C_PlayerInfo.GetGlidingInfo())
return UnitPowerBarID("player") == 631
end

0 comments on commit 28bba15

Please sign in to comment.