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

XFESpaceNinjaServer

A simple server for a small space ninja game

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

XFEstudio/XFESpaceNinjaServer

feat: handle droptable rewards from level key (#1492)

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

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

代码差异

3 个文件 +19 -5
Modified package-lock.json +4 -4
@@ -18,7 +18,7 @@
18 18 "morgan": "^1.10.0",
19 19 "ncp": "^2.0.0",
20 20 "typescript": ">=5.5 <5.6.0",
21 "warframe-public-export-plus": "^0.5.50",
21 "warframe-public-export-plus": "^0.5.51",
22 22 "warframe-riven-info": "^0.1.2",
23 23 "winston": "^3.17.0",
24 24 "winston-daily-rotate-file": "^5.0.0"
@@ -3789,9 +3789,9 @@
3789 3789 }
3790 3790 },
3791 3791 "node_modules/warframe-public-export-plus": {
3792 "version": "0.5.50",
3793 "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.50.tgz",
3794 "integrity": "sha512-KlhdY/Q5sRAIn/RhmdviKBoX3gk+Jtuen0cWnFB2zqK7eKYMDtd79bKOtTPtnK9zCNzh6gFug2wEeDVam3Bwlw=="
3792 "version": "0.5.51",
3793 "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.51.tgz",
3794 "integrity": "sha512-V1mMf3Q9711fBtE2LbbliGTemYIxMuuKlCOnv4juttKppVXI/e4zPNpVo/eSvTbqTP7RMm/WPsooOUxn42si7Q=="
3795 3795 },
3796 3796 "node_modules/warframe-riven-info": {
3797 3797 "version": "0.1.2",
Modified package.json +1 -1
@@ -24,7 +24,7 @@
24 24 "morgan": "^1.10.0",
25 25 "ncp": "^2.0.0",
26 26 "typescript": ">=5.5 <5.6.0",
27 "warframe-public-export-plus": "^0.5.50",
27 "warframe-public-export-plus": "^0.5.51",
28 28 "warframe-riven-info": "^0.1.2",
29 29 "winston": "^3.17.0",
30 30 "winston-daily-rotate-file": "^5.0.0"
Modified src/services/missionInventoryUpdateService.ts +14 -0
@@ -726,6 +726,20 @@ export const addFixedLevelRewards = (
726 726 MissionRewards.push(item);
727 727 }
728 728 }
729 if (rewards.droptable) {
730 if (rewards.droptable in ExportRewards) {
731 logger.debug(`rolling ${rewards.droptable} for level key rewards`);
732 const reward = getRandomRewardByChance(ExportRewards[rewards.droptable][0]);
733 if (reward) {
734 MissionRewards.push({
735 StoreItem: reward.type,
736 ItemCount: reward.itemCount
737 });
738 }
739 } else {
740 logger.error(`unknown droptable ${rewards.droptable}`);
741 }
742 }
729 743 return missionBonusCredits;
730 744 };
731 745