fix: give corresponding weapon when crafting Hound #1816
@ -17,7 +17,7 @@ import { getDefaultUpgrades } from "@/src/services/itemDataService";
|
|||||||
import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper";
|
import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper";
|
||||||
import { IEquipmentDatabase } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import { IEquipmentDatabase } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
import { getRandomInt } from "@/src/services/rngService";
|
import { getRandomInt } from "@/src/services/rngService";
|
||||||
import { ExportSentinels, IDefaultUpgrade } from "warframe-public-export-plus";
|
import { ExportSentinels, ExportWeapons, IDefaultUpgrade } from "warframe-public-export-plus";
|
||||||
import { Status } from "@/src/types/inventoryTypes/inventoryTypes";
|
import { Status } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||||
|
|
||||||
interface IModularCraftRequest {
|
interface IModularCraftRequest {
|
||||||
@ -138,6 +138,18 @@ export const modularWeaponCraftingController: RequestHandler = async (req, res)
|
|||||||
} else {
|
} else {
|
||||||
defaultUpgrades = getDefaultUpgrades(data.Parts);
|
defaultUpgrades = getDefaultUpgrades(data.Parts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (category == "MoaPets") {
|
||||||
|
const weapon = ExportSentinels[data.WeaponType].defaultWeapon;
|
||||||
|
if (weapon) {
|
||||||
|
const category = ExportWeapons[weapon].productCategory;
|
||||||
|
addEquipment(inventory, category, weapon, undefined, inventoryChanges);
|
||||||
|
combineInventoryChanges(
|
||||||
|
inventoryChanges,
|
||||||
|
occupySlot(inventory, productCategoryToInventoryBin(category)!, !!data.isWebUi)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
defaultOverwrites.Configs = applyDefaultUpgrades(inventory, defaultUpgrades);
|
defaultOverwrites.Configs = applyDefaultUpgrades(inventory, defaultUpgrades);
|
||||||
addEquipment(inventory, category, data.WeaponType, data.Parts, inventoryChanges, defaultOverwrites);
|
addEquipment(inventory, category, data.WeaponType, data.Parts, inventoryChanges, defaultOverwrites);
|
||||||
combineInventoryChanges(
|
combineInventoryChanges(
|
||||||
|
@ -66,7 +66,7 @@ const getItemListsController: RequestHandler = (req, response) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
for (const [uniqueName, item] of Object.entries(ExportSentinels)) {
|
for (const [uniqueName, item] of Object.entries(ExportSentinels)) {
|
||||||
if (item.productCategory != "SpecialItems") {
|
if (item.productCategory == "Sentinels" || item.productCategory == "KubrowPets") {
|
||||||
Sainan marked this conversation as resolved
|
|||||||
res[item.productCategory].push({
|
res[item.productCategory].push({
|
||||||
uniqueName,
|
uniqueName,
|
||||||
name: getString(item.name, lang),
|
name: getString(item.name, lang),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user
Not really related to this PR, but alongside this, maybe the MoaPets array should be removed from
res
again.