返回提交历史
Modified
src/services/inventoryService.ts
+7
-0
XFEstudio/XFESpaceNinjaServer
chore: remove invalid pets from inventory (#3313)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3313 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
827f542b
代码差异
1 个文件
+7
-0
@@ -2658,6 +2658,13 @@ export const cleanupInventory = async (inventory: TInventoryDatabaseDocument): P
2658
2658
logger.debug(`fixed ${fixed} invalid skin upgrade ids`);
2659
2659
}
2660
2660
}
2661
2662
for (const pet of inventory.KubrowPets) {
2663
if (!pet.Details) {
2664
logger.debug(`removing invalid pet ${pet.ItemType} (${pet._id.toString()})`);
2665
inventory.KubrowPets.pull({ _id: pet._id });
2666
}
2667
}
2661
2668
};
2662
2669
2663
2670
const collectSkins = (skins: string[], weaponMap: Map<string, string>, itemsToAdd: Set<string>): void => {