Merge branch 'develop' into paglias/realtime-chat-v1

This commit is contained in:
Matteo Pagliazzi
2016-09-09 20:13:21 +02:00
63 changed files with 483 additions and 125 deletions

View File

@@ -1,7 +1,7 @@
'use strict';
habitrpg.controller("PartyCtrl", ['$rootScope','$scope','Groups','Chat','User','Challenges','$state','$compile','Analytics','Quests','Social',
function($rootScope, $scope, Groups, Chat, User, Challenges, $state, $compile, Analytics, Quests, Social) {
habitrpg.controller("PartyCtrl", ['$rootScope','$scope','Groups','Chat','User','Challenges','$state','$compile','Analytics','Quests','Social', 'Achievement',
function($rootScope, $scope, Groups, Chat, User, Challenges, $state, $compile, Analytics, Quests, Social, Achievement) {
var PARTY_LOADING_MESSAGES = 4;
@@ -47,14 +47,14 @@ habitrpg.controller("PartyCtrl", ['$rootScope','$scope','Groups','Chat','User','
if(!user.achievements.partyUp
&& $scope.group.memberCount >= 2) {
User.set({'achievements.partyUp':true});
$rootScope.openModal('achievements/partyUp', {controller:'UserCtrl', size:'sm'});
Achievement.displayAchievement('partyUp');
}
// Checks if user's party has reached 4 players for the first time.
if(!user.achievements.partyOn
&& $scope.group.memberCount >= 4) {
User.set({'achievements.partyOn':true});
$rootScope.openModal('achievements/partyOn', {controller:'UserCtrl', size:'sm'});
Achievement.displayAchievement('partyOn');
}
}