返回提交历史
Modified
src/controllers/api/startRecipeController.ts
+4
-1
XFEstudio/SpaceNinjaServer
fix: incubator after PE+ update (#3011)
Seems the kubrow egg item type was changed in U40. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3011 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
3d57a76e
代码差异
1 个文件
+4
-1
@@ -45,7 +45,10 @@ export const startRecipeController: RequestHandler = async (req, res) => {
45
45
46
46
for (let i = 0; i != recipe.ingredients.length; ++i) {
47
47
if (startRecipeRequest.Ids[i] && startRecipeRequest.Ids[i][0] != "/") {
48
if (recipe.ingredients[i].ItemType == "/Lotus/Types/Game/KubrowPet/Eggs/KubrowPetEggItem") {
48
if (
49
recipe.ingredients[i].ItemType == "/Lotus/Types/Game/KubrowPet/Eggs/KubrowEgg" ||
50
recipe.ingredients[i].ItemType == "/Lotus/Types/Game/KubrowPet/Eggs/KubrowPetEggItem"
51
) {
49
52
const index = inventory.KubrowPetEggs.findIndex(x => x._id.equals(startRecipeRequest.Ids[i]));
50
53
if (index != -1) {
51
54
inventory.KubrowPetEggs.splice(index, 1);