From 6797bc2221bda6b9db9df24e8690325bc5308de9 Mon Sep 17 00:00:00 2001 From: Oskar Date: Tue, 31 Oct 2017 18:51:52 +0100 Subject: [PATCH] Small fix for percentage announcing. --- Core.lua | 6 ++++-- LevelUpAnnouncer.toc | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Core.lua b/Core.lua index 1321d47..f12e7c3 100644 --- a/Core.lua +++ b/Core.lua @@ -208,9 +208,11 @@ function LevelUpAnnouncer:PLAYER_XP_UPDATE() if self.db.profile.reversePerc then stc = function(p) return sendToChat(replaceFormats(self.db.profile.reversePercFormat, 100 - p, self.curLevel)) end end if self.xpPct>=0.25 and self.tmpPercIndex<1 then stc(25) - elseif self.xpPct>=0.5 and self.tmpPercIndex<2 then + end + if self.xpPct>=0.5 and self.tmpPercIndex<2 then stc(50) - elseif self.xpPct>=0.75 and self.tmpPercIndex<3 then + end + if self.xpPct>=0.75 and self.tmpPercIndex<3 then stc(75) end self.tmpPercIndex = math.floor(self.xpPct * 4) diff --git a/LevelUpAnnouncer.toc b/LevelUpAnnouncer.toc index fdf52d3..25b3bf0 100644 --- a/LevelUpAnnouncer.toc +++ b/LevelUpAnnouncer.toc @@ -1,6 +1,6 @@ ## Interface: 70300 ## Title: Level Up |cff2D8D0BAnnouncer|r -## Version: 2.0.3 +## Version: 2.0.4 ## Author: oskar3123 ## Notes: A simple addon to play a sound and/or yell in chat when you level up ## Dependencies: