better version of estimated score
René Welbers [01-18-16 - 15:08]
better version of estimated score
diff --git a/RaidTimer.lua b/RaidTimer.lua
index 23e7047..988bd6d 100644
--- a/RaidTimer.lua
+++ b/RaidTimer.lua
@@ -444,7 +444,12 @@ end
function RaidTimer.EstimatedScore(currentPoints, maxPoints, timeLimit, raidDuration)
-- old formula
--zo_max(zo_round(((timeLimit - (raidDuration * maxPoints / currentPoints)) * (maxPoints / 1000)) + maxPoints), zo_floor(currentPoints / 100))
- return (currentPoints+((maxPoints)*((timeLimit-raidDuration)/10000)))
+ local halfPoints = maxPoints / 2
+ local calcPoints = currentPoints
+ if currentPoints < halfPoints then
+ calcPoints = maxPoints - currentPoints
+ end
+ return (calcPoints+((maxPoints)*((timeLimit-raidDuration)/10000)))
end
-------Saving the location of the labels when /rt show-------
@@ -477,7 +482,7 @@ function RaidTimer.Commands(text)
if self.tempVars.instance then
local raidName = GetRaidName(GetCurrentParticipatingRaidId())
if #raidName == 0 then raidName = GetString(RAIDTIMER_TRIALNAME_UNKNOWN) end
- local raidScore = GetCurrentRaidScore()
+ local raidScore = GetCurrentRaidScore()
local totalTime
if HasRaidEnded() and WasRaidSuccessful() then
totalTime = GetGameTimeMilliseconds() - self.raidStart