From fa4048b56e56060c5e99341405253b817d926b64 Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 5 Apr 2018 19:55:07 +0200 Subject: [PATCH] debuffs: persist remaining pending spells --- modules/debuffs.lua | 6 +++++- pfUI.toc | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/debuffs.lua b/modules/debuffs.lua index 0623b9f4..b201fe1f 100644 --- a/modules/debuffs.lua +++ b/modules/debuffs.lua @@ -11,6 +11,7 @@ pfUI:RegisterModule("debuffs", function () pfUI.debuffs:RegisterEvent("CHAT_MSG_SPELL_SELF_DAMAGE") pfUI.debuffs:RegisterEvent("PLAYER_TARGET_CHANGED") + pfUI.debuffs:RegisterEvent("SPELLCAST_STOP") pfUI.debuffs:RegisterEvent("UNIT_AURA") pfUI.debuffs.active = true @@ -73,6 +74,9 @@ pfUI:RegisterModule("debuffs", function () return end end + elseif event == "SPELLCAST_STOP" then + -- Persist all spells that have not been removed till here + pfUI.debuffs:PersistPending() end end) @@ -147,7 +151,7 @@ pfUI:RegisterModule("debuffs", function () end function pfUI.debuffs:PersistPending(effect) - if pfUI.debuffs.pending[3] == effect then + if pfUI.debuffs.pending[3] == effect or ( effect == nil and pfUI.debuffs.pending[3] ) then local unit = pfUI.debuffs.pending[1] local unitlevel = pfUI.debuffs.pending[2] diff --git a/pfUI.toc b/pfUI.toc index 6ed05769..dab5ce2c 100644 --- a/pfUI.toc +++ b/pfUI.toc @@ -2,7 +2,7 @@ ## Title: |cff33ffccpf|cffffffffUI ## Author: Shagu ## Notes: A complete user interface replacement. -## Version: 3.8.1 +## Version: 3.8.2 ## SavedVariables: pfUI_profiles, pfUI_gold ## SavedVariablesPerCharacter: pfUI_config, pfUI_init, pfUI_playerDB