mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Adventure Guide Prep (#11883)
* WIP(adventure): prereqs * WIP(drops): new modal * WIP(adventure): analytics fixes etc * feat(adventure): random egg+potion on 2nd task * fix(lint): noworkies * fix(modal): correctly construct classes * fix(tests): expectations and escape * fix(first-drops): address comments * fix(first-drops): don't give random drops until first drops * fix(drops): remove more Level 3 references * refactor(drops): no need for cloning * refactor(drops): unnecessary export * fix(first-drops): force sync * fix(first-drops): move to server * fix(first-drops): escape in case we get here with >0 items * fix(lint): line length * fix(pet-food): remove unused string
This commit is contained in:
@@ -66,24 +66,6 @@ export default function updateStats (user, stats, req = {}, analytics) {
|
||||
if (!user.flags.itemsEnabled && (user.stats.exp > 10 || user.stats.lvl > 1)) {
|
||||
user.flags.itemsEnabled = true;
|
||||
}
|
||||
if (!user.flags.dropsEnabled && user.stats.lvl >= 3) {
|
||||
user.flags.dropsEnabled = true;
|
||||
if (user.addNotification) user.addNotification('DROPS_ENABLED');
|
||||
|
||||
if (user.items.eggs.Wolf > 0) {
|
||||
user.items.eggs = {
|
||||
...user.items.eggs,
|
||||
Wolf: user.items.eggs.Wolf + 1,
|
||||
};
|
||||
} else {
|
||||
user.items.eggs = {
|
||||
...user.items.eggs,
|
||||
Wolf: 1,
|
||||
};
|
||||
}
|
||||
|
||||
if (user.markModified) user.markModified('items.eggs');
|
||||
}
|
||||
each({
|
||||
vice1: 30,
|
||||
atom1: 15,
|
||||
|
||||
Reference in New Issue
Block a user