diff --git a/website/public/js/controllers/notificationCtrl.js b/website/public/js/controllers/notificationCtrl.js index 5e4a4825dd..180dad860e 100644 --- a/website/public/js/controllers/notificationCtrl.js +++ b/website/public/js/controllers/notificationCtrl.js @@ -53,6 +53,15 @@ habitrpg.controller('NotificationCtrl', Notification.mp(mana); }); + $rootScope.$watch('user.stats.lvl', function(after, before) { + if ((after === before) || (User.user._tmp && User.user._tmp.drop && (User.user._tmp.drop.type === 'Quest'))) return; + if (after > before) { + Notification.lvl(); + $rootScope.playSound('Level_Up'); + $rootScope.openModal('levelUp', {controller:'UserCtrl', size:'sm'}); + } + }); + $rootScope.$watch('user._tmp.crit', function(after, before){ if (after == before || !after) return; var amount = User.user._tmp.crit * 100 - 100; @@ -148,15 +157,6 @@ habitrpg.controller('NotificationCtrl', } }); - $rootScope.$watch('user.stats.lvl', function(after, before) { - if (after == before) return; - if (after > before) { - Notification.lvl(); - $rootScope.playSound('Level_Up'); - $rootScope.openModal('levelUp', {controller:'UserCtrl', size:'sm'}); - } - }); - // Completed quest modal $scope.$watch('user.party.quest.completed', function(after, before){ if (!after) return;