mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 02:02:19 +00:00
fix awarding of party {up,on} achievs to update server
This commit is contained in:
parent
b0fe5f4081
commit
792e8d8094
2 changed files with 2 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue