mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
Corrected triad bingo achievement for users that already had it
This commit is contained in:
parent
5246257f62
commit
5c8450ba1a
1 changed files with 2 additions and 7 deletions
|
|
@ -455,14 +455,9 @@ UserSchema.pre('save', function(next) {
|
|||
|
||||
// Determines if Triad Bingo should be awarded
|
||||
|
||||
var giveTriadBingo = function(pets) {
|
||||
for(var p in pets) {
|
||||
if(pets[p] == -1) return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
var triadCount = shared.countTriad(this.items.pets);
|
||||
|
||||
if ((mountCount >= 90 && giveTriadBingo(this.items.pets)) || this.achievements.triadBingoCount > 0) {
|
||||
if ((mountCount >= 90 && triadCount >= 90) || this.achievements.triadBingoCount > 0) {
|
||||
this.achievements.triadBingo = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue