From e10f837594250649787752b79688e49974277e21 Mon Sep 17 00:00:00 2001 From: Xruptor Date: Wed, 13 Mar 2013 19:47:47 -0400 Subject: [PATCH] -Updated TOC for patch 5.2 -Added a small fix for timed discrepency. -Updated hours played this session -Updated levels gained this session --- XanEXP.lua | 6 +++--- XanEXP.toc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/XanEXP.lua b/XanEXP.lua index 502d5b4..63c9bfc 100644 --- a/XanEXP.lua +++ b/XanEXP.lua @@ -169,7 +169,7 @@ function f:CreateEXP_Frame() local sessionTime = GetTime() - starttime local xpGainedSession = (cur - start) - local xpPerSecond = xpGainedSession / sessionTime + local xpPerSecond = ceil(xpGainedSession / sessionTime) local xpPerMinute = ceil(xpPerSecond * 60) local xpPerHour = ceil(xpPerSecond * 3600) local timeToLevel @@ -185,9 +185,9 @@ function f:CreateEXP_Frame() GameTooltip:AddDoubleLine("XP/Minute:", xpPerMinute, nil,nil,nil, 1,1,1) GameTooltip:AddDoubleLine("XP/Hour:", xpPerHour, nil,nil,nil, 1,1,1) GameTooltip:AddDoubleLine("Time To Level:", FormatTime(timeToLevel), nil,nil,nil, 1,1,1) - GameTooltip:AddLine(string.format("%.1f hours played this session", sessionTime/3600), 1,1,1) + GameTooltip:AddLine(string.format("%s hours played this session", ceil(sessionTime/3600)), 1,1,1) GameTooltip:AddLine(xpGainedSession.." EXP gained this session", 1,1,1) - GameTooltip:AddLine(string.format("%.1f levels gained this session", UnitLevel("player") + cur/max - startlevel), 1,1,1) + GameTooltip:AddLine(string.format("%s levels gained this session", ceil(UnitLevel("player") + cur/max - startlevel)), 1,1,1) GameTooltip:Show() end) diff --git a/XanEXP.toc b/XanEXP.toc index 4944e57..26e1bcb 100644 --- a/XanEXP.toc +++ b/XanEXP.toc @@ -1,8 +1,8 @@ -## Interface: 50001 +## Interface: 50200 ## Title: xanEXP ## Notes: A small window display current xp and other xp information ## Author: Xruptor -## Version: 2.5 +## Version: 2.8 ## SavedVariablesPerCharacter: XanEXP_DB xanEXP.lua -- 1.7.9.5