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

fix: treat ExtraRemaining from U8 like an absolute value (#3770)

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

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

代码差异

1 个文件 +1 -2
Modified src/services/inventoryService.ts +1 -2
@@ -2234,7 +2234,7 @@ export const applyClientEquipmentUpdates = (
2234 2234 }
2235 2235
2236 2236 if (ExtraRemaining) {
2237 if (!buildLabel || version_compare(buildLabel, gameToBuildVersion["8.0.0"]) >= 0) {
2237 if (!buildLabel || version_compare(buildLabel, gameToBuildVersion["9.1.2"]) >= 0) {
2238 2238 if (ExtraRemaining > 0) {
2239 2239 throw new Error(
2240 2240 `unexpected value for ExtraRemaining (${ExtraRemaining}); expected a delta from this client`
@@ -2243,7 +2243,6 @@ export const applyClientEquipmentUpdates = (
2243 2243 item.ExtraRemaining ??= 4;
2244 2244 item.ExtraRemaining += ExtraRemaining;
2245 2245 } else {
2246 // U7 still provided an absolute value; unclear when this changed.
2247 2246 if (ExtraRemaining < 0) {
2248 2247 throw new Error(
2249 2248 `unexpected value for ExtraRemaining (${ExtraRemaining}); expected an absolute value from this client`