From be2def91f19263276595dc884c5d7db855bc161e Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Tue, 7 Jan 2014 11:14:34 -0600 Subject: [PATCH] Fix #2048 (streak bonuses not appearing to add up) --- public/js/controllers/notificationCtrl.js | 4 ++-- public/js/services/notificationServices.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/js/controllers/notificationCtrl.js b/public/js/controllers/notificationCtrl.js index b62c1af86d..98817ac7bb 100644 --- a/public/js/controllers/notificationCtrl.js +++ b/public/js/controllers/notificationCtrl.js @@ -19,10 +19,10 @@ habitrpg.controller('NotificationCtrl', if (after == before) return; if (User.user.stats.lvl == 0) return; var money = after - before; - Notification.gp(money); + var bonus = User.user._tmp.streakBonus; + Notification.gp(money, bonus || 0); //Append Bonus - var bonus = User.user._tmp.streakBonus; if ((money > 0) && !!bonus) { if (bonus < 0.01) bonus = 0.01; diff --git a/public/js/services/notificationServices.js b/public/js/services/notificationServices.js index 2d5b89eb16..733f0281e3 100644 --- a/public/js/services/notificationServices.js +++ b/public/js/services/notificationServices.js @@ -51,8 +51,8 @@ angular.module("notificationServices", []) if (val < -50) return; // don't show when they level up (resetting their exp) growl(" " + sign(val) + " " + round(val) + " XP", 'xp'); }, - gp: function(val) { - growl(sign(val) + " " + coins(val), 'gp'); + gp: function(val, bonus) { + growl(sign(val) + " " + coins(val - bonus), 'gp'); }, text: function(val){ growl(val);