From c634b58a388179cbadbaa13d6b21ad0b54f96c35 Mon Sep 17 00:00:00 2001 From: Ciscoh Bellic Date: Tue, 18 Jul 2023 09:06:14 -0400 Subject: [PATCH 1/3] ... --- scripts/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 scripts/.gitkeep diff --git a/scripts/.gitkeep b/scripts/.gitkeep deleted file mode 100644 index e69de29..0000000 From 728d427e414098250d0899e8f49cf49adf8d22bb Mon Sep 17 00:00:00 2001 From: Ciscoh Bellic Date: Tue, 18 Jul 2023 23:44:36 -0400 Subject: [PATCH 2/3] empowered stage check --- src/Unit/Unit.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/Unit/Unit.lua b/src/Unit/Unit.lua index 07182b0..400cb9c 100644 --- a/src/Unit/Unit.lua +++ b/src/Unit/Unit.lua @@ -1125,6 +1125,25 @@ function Unit:IsWithinCone(Target, Angle, Distance, rotation) return diff <= Angle and self:GetDistance(Target) <= Distance end +function Unit:GetEmpoweredStage() + local stage = 0 + local _, _, _, startTime, _, _, _, spellID, _, numStages = UnitChannelInfo(self:GetOMToken()) + + if numStages and numStages > 0 then + startTime = startTime / 1000 + local currentTime = GetTime() + local stageDuration = 0 + for i = 1, numStages do + stageDuration = stageDuration + GetUnitEmpowerStageDuration((self:GetOMToken()), i - 1) / 1000 + if startTime + stageDuration > currentTime then + break + end + stage = i + end + end + return stage +end + -- local empowering = {} -- Bastion.EventManager:RegisterWoWEvent("UNIT_SPELLCAST_EMPOWER_START", function(...) From 81f7e371cd6d9b4a6b668a2963ab54cdd185ad9a Mon Sep 17 00:00:00 2001 From: Ciscoh Bellic Date: Wed, 19 Jul 2023 00:02:02 -0400 Subject: [PATCH 3/3] readded gitkeep --- scripts/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 scripts/.gitkeep diff --git a/scripts/.gitkeep b/scripts/.gitkeep new file mode 100644 index 0000000..e69de29