From 48aee817aedecd540f2fcba3cdcbf77763cc86b6 Mon Sep 17 00:00:00 2001 From: rootcoma Date: Mon, 6 Jan 2014 17:08:33 -0800 Subject: [PATCH] Add streak without adding to pointsAdded --- plugin.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin.py b/plugin.py index 2d91b73..aaa22e4 100644 --- a/plugin.py +++ b/plugin.py @@ -1479,7 +1479,6 @@ class TriviaTime(callbacks.Plugin): streakBonus = pointsAdded * .01 * (self.streak-1) if streakBonus > pointsAdded: streakBonus = pointsAdded - pointsAdded += streakBonus threadStorage.updateGameStreak(self.channel, self.lastWinner, self.streak) threadStorage.updateUserHighestStreak(self.lastWinner, self.streak) threadStorage.updateGameLongestStreak(self.channel, username, self.streak) @@ -1487,7 +1486,7 @@ class TriviaTime(callbacks.Plugin): pointsAdded = int(pointsAdded) # report correct guess, and show players streak - threadStorage.updateUserLog(username, self.channel, pointsAdded,1, timeElapsed) + threadStorage.updateUserLog(username, self.channel, (pointsAdded+streakBonus), 1, timeElapsed) self.lastAnswer = time.time() self.sendMessage('DING DING DING, \x02%s\x02 got the correct answer, \x02%s\x02, in \x02%0.4f\x02 seconds for \x02%d(+%d)\x02 points!' % (username, correctAnswer, timeElapsed, pointsAdded, streakBonus))