From 1ae33d5082436c5b0d4a9868697c07be1bec44b7 Mon Sep 17 00:00:00 2001 From: atomaka Date: Tue, 9 Mar 2021 22:36:04 +0000 Subject: [PATCH] Start the stopwatch when in combat (#19) --- MyAddon.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/MyAddon.lua b/MyAddon.lua index 3e115b3..baff163 100755 --- a/MyAddon.lua +++ b/MyAddon.lua @@ -144,6 +144,20 @@ function events:PLAYER_LOGIN(...) ChatFrame1:SetUserPlaced(true) end +function events:PLAYER_REGEN_DISABLED(...) + StopwatchFrame:Show() + Stopwatch_Clear() + Stopwatch_Play() +end + +function events:PLAYER_REGEN_ENABLED(...) + Stopwatch_Pause() +end + +function events:PLAYER_DEAD(...) + Stopwatch_Pause() +end + function events:PLAYER_ROLES_ASSIGNED(...) if MyAddon.amTankInParty() then MyAddon.markSelfSquare() end end