Small fix for percentage announcing.

This commit is contained in:
2017-10-31 18:51:52 +01:00
parent bae2a4a6e5
commit 6797bc2221
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -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.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 if self.xpPct>=0.25 and self.tmpPercIndex<1 then
stc(25) 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) 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) stc(75)
end end
self.tmpPercIndex = math.floor(self.xpPct * 4) self.tmpPercIndex = math.floor(self.xpPct * 4)
+1 -1
View File
@@ -1,6 +1,6 @@
## Interface: 70300 ## Interface: 70300
## Title: Level Up |cff2D8D0BAnnouncer|r ## Title: Level Up |cff2D8D0BAnnouncer|r
## Version: 2.0.3 ## Version: 2.0.4
## Author: oskar3123 ## Author: oskar3123
## Notes: A simple addon to play a sound and/or yell in chat when you level up ## Notes: A simple addon to play a sound and/or yell in chat when you level up
## Dependencies: ## Dependencies: