Skip to content

Commit

Permalink
[Statuses\Auras] Attempt to Fix Aura Status for Wrath
Browse files Browse the repository at this point in the history
China now has wrath servers
  • Loading branch information
doadin committed Jul 10, 2024
1 parent d85400e commit 0e7c911
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions Statuses/Auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,12 @@ end

function PlexusStatusAuras:OnStatusEnable(status)
self:RegisterMessage("Plexus_UnitJoined")
self:RegisterEvent("UNIT_AURA", "UpdateUnitAuras")
if not Plexus:IsWrathWow() then
self:RegisterEvent("UNIT_AURA", "UpdateUnitAuras")
end
if Plexus:IsWrathWow() then
self:RegisterEvent("UNIT_AURA", "ScanUnitAuras")
end
self:RegisterEvent("SPELLS_CHANGED", "UpdateDispellable")
--self:ScheduleRepeatingTimer("UpdateAllUnitAuras", 1) --UNIT_AURA fires every 5s this is a problem for duration color

Expand Down Expand Up @@ -1716,13 +1721,25 @@ function PlexusStatusAuras:DeleteAura(status)
end

function PlexusStatusAuras:UpdateAllUnitAuras()
for guid, unitid in PlexusRoster:IterateRoster() do
self:UpdateUnitAuras("UpdateAllUnitAuras", unitid, {isFullUpdate = true})
if not Plexus:IsWrathWow() then
for guid, unitid in PlexusRoster:IterateRoster() do
self:UpdateUnitAuras("UpdateAllUnitAuras", unitid, {isFullUpdate = true})
end
end
if Plexus:IsWrathWow() then
for guid, unitid in PlexusRoster:IterateRoster() do
self:ScanUnitAuras("UpdateAllUnitAuras", unitid, guid)
end
end
end

function PlexusStatusAuras:Plexus_UnitJoined(event, guid, unitid)
self:UpdateUnitAuras(event, unitid, {isFullUpdate = true})
if not Plexus:IsWrathWow() then
self:UpdateUnitAuras(event, unitid, {isFullUpdate = true})
end
if Plexus:IsWrathWow() then
self:ScanUnitAuras("UpdateAllUnitAuras", unitid, guid)
end
end

function PlexusStatusAuras:UpdateDispellable() --luacheck: ignore 212
Expand Down

0 comments on commit 0e7c911

Please sign in to comment.