apiv2 handle notifications circular-dependency. migration

fixes. Rest=>Sleep fixes
This commit is contained in:
Tyler Renelle
2013-12-14 21:58:53 -07:00
parent ae4ca337c8
commit bc0034f022
8 changed files with 20 additions and 18 deletions

View File

@@ -5,16 +5,19 @@ habitrpg.controller('NotificationCtrl',
$rootScope.$watch('user.stats.hp', function(after, before) {
if (after == before) return;
if (User.user.stats.lvl == 0) return;
Notification.hp(after - before, 'hp');
});
$rootScope.$watch('user.stats.exp', function(after, before) {
if (after == before) return;
if (User.user.stats.lvl == 0) return;
Notification.exp(after - before);
});
$rootScope.$watch('user.stats.gp', function(after, before) {
if (after == before) return;
if (User.user.stats.lvl == 0) return;
var money = after - before;
Notification.gp(money);