mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
fix(subscription): correctly award 3mo bennies (#7596)
This commit is contained in:
@@ -57,9 +57,10 @@ function grantEndOfTheMonthPerks (user, now) {
|
||||
|
||||
plan.consecutive.count++;
|
||||
|
||||
if (plan.consecutive.offset > 0) {
|
||||
if (plan.consecutive.offset > 1) {
|
||||
plan.consecutive.offset--;
|
||||
} else if (plan.consecutive.count % 3 === 0) { // every 3 months
|
||||
if (plan.consecutive.offset === 1) plan.consecutive.offset--;
|
||||
plan.consecutive.trinkets++;
|
||||
plan.consecutive.gemCapExtra += 5;
|
||||
if (plan.consecutive.gemCapExtra > 25) plan.consecutive.gemCapExtra = 25; // cap it at 50 (hard 25 limit + extra 25)
|
||||
|
||||
Reference in New Issue
Block a user