XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

fix: handle login reward not being able to give any recipe (#1479)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1479 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

b93a4a6d
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +4 -0
Modified src/services/loginRewardService.ts +4 -0
@@ -99,6 +99,10 @@ const getRandomLoginReward = (rng: CRng, day: number, inventory: TInventoryDatab
99 99 eligibleRecipes.push(uniqueName);
100 100 }
101 101 }
102 if (eligibleRecipes.length == 0) {
103 // This account has all warframes and weapons already mastered (filthy cheater), need a different reward.
104 return getRandomLoginReward(rng, day, inventory);
105 }
102 106 reward.StoreItemType = toStoreItem(rng.randomElement(eligibleRecipes));
103 107 }
104 108 return {