Tabs to spaces
This commit is contained in:
@@ -190,18 +190,18 @@ function LevelUpAnnouncer:PLAYER_LOGIN()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function LevelUpAnnouncer:PLAYER_LEVEL_UP()
|
function LevelUpAnnouncer:PLAYER_LEVEL_UP()
|
||||||
self.tmpPercIndex = 0
|
self.tmpPercIndex = 0
|
||||||
self.curLevel = self.curLevel + 1
|
self.curLevel = self.curLevel + 1
|
||||||
if self.db.profile.playSound then
|
if self.db.profile.playSound then
|
||||||
PlaySoundKitID(self.db.profile.soundID)
|
PlaySoundKitID(self.db.profile.soundID)
|
||||||
end
|
end
|
||||||
if self.db.profile.chatAnnounce then
|
if self.db.profile.chatAnnounce then
|
||||||
sendToChat(replaceFormats(self.db.profile.dingFormat, 0, self.curLevel))
|
sendToChat(replaceFormats(self.db.profile.dingFormat, 0, self.curLevel))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function LevelUpAnnouncer:PLAYER_XP_UPDATE()
|
function LevelUpAnnouncer:PLAYER_XP_UPDATE()
|
||||||
self.xpPct = UnitXP("player")/UnitXPMax("player")
|
self.xpPct = UnitXP("player")/UnitXPMax("player")
|
||||||
if not self.db.profile.chatPercAnnounce then return end
|
if not self.db.profile.chatPercAnnounce then return end
|
||||||
local stc = function(p) return sendToChat(replaceFormats(self.db.profile.percFormat, p, self.curLevel)) end
|
local stc = function(p) return sendToChat(replaceFormats(self.db.profile.percFormat, p, self.curLevel)) 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.db.profile.reversePerc then stc = function(p) return sendToChat(replaceFormats(self.db.profile.reversePercFormat, 100 - p, self.curLevel)) end end
|
||||||
@@ -212,5 +212,5 @@ function LevelUpAnnouncer:PLAYER_XP_UPDATE()
|
|||||||
elseif self.xpPct>=0.75 and self.tmpPercIndex<3 then
|
elseif 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)
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user