fix awarding of party {up,on} achievs to update server

This commit is contained in:
Kaitlin Hipkin
2016-03-10 20:38:53 -05:00
parent b0fe5f4081
commit 792e8d8094
2 changed files with 2 additions and 14 deletions

View File

@@ -18,14 +18,14 @@ habitrpg.controller("PartyCtrl", ['$rootScope','$scope','Groups','Chat','User','
// Checks if user's party has reached 2 players for the first time. // Checks if user's party has reached 2 players for the first time.
if(!user.achievements.partyUp if(!user.achievements.partyUp
&& $scope.group.memberCount >= 2) { && $scope.group.memberCount >= 2) {
user.achievements.partyUp = true; User.set({'achievements.partyUp':true});
$rootScope.openModal('achievements/partyUp', {controller:'UserCtrl', size:'sm'}); $rootScope.openModal('achievements/partyUp', {controller:'UserCtrl', size:'sm'});
} }
// Checks if user's party has reached 4 players for the first time. // Checks if user's party has reached 4 players for the first time.
if(!user.achievements.partyOn if(!user.achievements.partyOn
&& $scope.group.memberCount >= 4) { && $scope.group.memberCount >= 4) {
user.achievements.partyOn = true; User.set({'achievements.partyOn':true});
$rootScope.openModal('achievements/partyOn', {controller:'UserCtrl', size:'sm'}); $rootScope.openModal('achievements/partyOn', {controller:'UserCtrl', size:'sm'});
} }
} }

View File

@@ -533,18 +533,6 @@ UserSchema.pre('save', function(next) {
this.achievements.triadBingo = true; this.achievements.triadBingo = true;
} }
// Determines if Party Up should be awarded
if (this.party.memberCount >= 2) {
this.achievements.partyUp = true;
}
// Determines if Party On should be awarded
if (this.party.memberCount >= 4) {
this.achievements.partyOn = true;
}
// Enable weekly recap emails for old users who sign in // Enable weekly recap emails for old users who sign in
if(this.flags.lastWeeklyRecapDiscriminator){ if(this.flags.lastWeeklyRecapDiscriminator){
// Enable weekly recap emails in 24 hours // Enable weekly recap emails in 24 hours