fix: handle login reward not being able to give any recipe
All checks were successful
Build / build (22) (push) Successful in 37s
Build / build (18) (push) Successful in 1m13s
Build / build (20) (push) Successful in 1m13s
Build / build (18) (pull_request) Successful in 39s
Build / build (20) (pull_request) Successful in 1m11s
Build / build (22) (pull_request) Successful in 1m13s
All checks were successful
Build / build (22) (push) Successful in 37s
Build / build (18) (push) Successful in 1m13s
Build / build (20) (push) Successful in 1m13s
Build / build (18) (pull_request) Successful in 39s
Build / build (20) (pull_request) Successful in 1m11s
Build / build (22) (pull_request) Successful in 1m13s
This commit is contained in:
parent
65306e0478
commit
31e806413f
@ -99,6 +99,10 @@ const getRandomLoginReward = (rng: CRng, day: number, inventory: TInventoryDatab
|
|||||||
eligibleRecipes.push(uniqueName);
|
eligibleRecipes.push(uniqueName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (eligibleRecipes.length == 0) {
|
||||||
|
// This account has all warframes and weapons already mastered (filthy cheater), need a different reward.
|
||||||
|
return getRandomLoginReward(rng, day, inventory);
|
||||||
|
}
|
||||||
reward.StoreItemType = toStoreItem(rng.randomElement(eligibleRecipes));
|
reward.StoreItemType = toStoreItem(rng.randomElement(eligibleRecipes));
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user