Added party sync and request sync events (#8223)

* Added party sync and request sync events

* Changed party member sync to be handled locally

* Optimized assignment to only use member variables

* Removed party sync event
This commit is contained in:
Keith Holliday
2016-11-17 13:10:33 -06:00
committed by Matteo Pagliazzi
parent 3ea7b72024
commit 25c6691793
2 changed files with 12 additions and 0 deletions

View File

@@ -14,6 +14,10 @@ habitrpg.controller('NotificationCtrl',
if (after == before) return;
if (User.user.stats.lvl == 0) return;
Notification.hp(after - before, 'hp');
$rootScope.$broadcast('syncPartyRequest', {
type: 'user_update',
user: User.user,
}); // Sync party to update members
if (after < 0) $rootScope.playSound('Minus_Habit');
});