Orb of Rebirth Updates (Count usage) (#15629)
* Update orb of rebirth to count every usage * Orb of rebirth modal UI updates * Fix rebirth modal showing again after page refresh * remove unused MAX_LEVEL * scale orb of rebirth on modal * UI & wording updates for Orb of Rebirth * UI & wording updates for Orb of Rebirth cont. * Orb of rebirth UI tweaks * Orb of rebirth UI tweaks * Orb of Rebirth modal UI tweak * Extend modal waves * Continued Orb of Rebirth UI Updates * Orb of rebirth margin tweak * rebirth-orb asset
This commit is contained in:
@@ -2,7 +2,6 @@ import each from 'lodash/each';
|
||||
import pick from 'lodash/pick';
|
||||
import i18n from '../i18n';
|
||||
import { capByLevel } from '../statHelpers';
|
||||
import { MAX_LEVEL } from '../constants';
|
||||
import {
|
||||
NotAuthorized,
|
||||
} from '../libs/errors';
|
||||
@@ -103,9 +102,9 @@ export default async function rebirth (user, tasks = [], req = {}, analytics) {
|
||||
if (!user.achievements.rebirths) {
|
||||
user.achievements.rebirths = 1;
|
||||
user.achievements.rebirthLevel = lvl;
|
||||
} else if (lvl > user.achievements.rebirthLevel || lvl === MAX_LEVEL) {
|
||||
} else {
|
||||
user.achievements.rebirths += 1;
|
||||
user.achievements.rebirthLevel = lvl;
|
||||
user.achievements.rebirthLevel = Math.max(user.achievements.rebirthLevel || 0, lvl);
|
||||
}
|
||||
|
||||
if (!notFree) {
|
||||
|
||||
Reference in New Issue
Block a user