mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
lint common
This commit is contained in:
@@ -62,9 +62,11 @@ export default function randomDrop (user, options, req = {}, analytics) {
|
||||
dropMultiplier = 1;
|
||||
}
|
||||
|
||||
const maxDropCount = dropMultiplier * (5 + Math.floor(statsComputed(user).per / 25) + (user.contributor.level || 0)); // eslint-disable-line max-len
|
||||
|
||||
if (
|
||||
daysSince(user.items.lastDrop.date, user.preferences) === 0
|
||||
&& user.items.lastDrop.count >= dropMultiplier * (5 + Math.floor(statsComputed(user).per / 25) + (user.contributor.level || 0))
|
||||
&& user.items.lastDrop.count >= maxDropCount
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user