mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
fix awarding of party {up,on} achievs to update server
This commit is contained in:
@@ -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.
|
||||
if(!user.achievements.partyUp
|
||||
&& $scope.group.memberCount >= 2) {
|
||||
user.achievements.partyUp = true;
|
||||
User.set({'achievements.partyUp':true});
|
||||
$rootScope.openModal('achievements/partyUp', {controller:'UserCtrl', size:'sm'});
|
||||
}
|
||||
|
||||
// Checks if user's party has reached 4 players for the first time.
|
||||
if(!user.achievements.partyOn
|
||||
&& $scope.group.memberCount >= 4) {
|
||||
user.achievements.partyOn = true;
|
||||
User.set({'achievements.partyOn':true});
|
||||
$rootScope.openModal('achievements/partyOn', {controller:'UserCtrl', size:'sm'});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -533,18 +533,6 @@ UserSchema.pre('save', function(next) {
|
||||
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
|
||||
if(this.flags.lastWeeklyRecapDiscriminator){
|
||||
// Enable weekly recap emails in 24 hours
|
||||
|
||||
Reference in New Issue
Block a user