fix: failure to remove shard installed via webui
All checks were successful
Build / build (22) (pull_request) Successful in 1m10s
Build / build (18) (push) Successful in 43s
Build / build (22) (push) Successful in 59s
Build / build (20) (push) Successful in 1m5s
Build / build (20) (pull_request) Successful in 1m0s
Build / build (18) (pull_request) Successful in 41s
All checks were successful
Build / build (22) (pull_request) Successful in 1m10s
Build / build (18) (push) Successful in 43s
Build / build (22) (push) Successful in 59s
Build / build (20) (push) Successful in 1m5s
Build / build (20) (pull_request) Successful in 1m0s
Build / build (18) (pull_request) Successful in 41s
This commit is contained in:
parent
92d53e1c00
commit
99e13a96e9
@ -57,17 +57,18 @@ export const infestedFoundryController: RequestHandler = async (req, res) => {
|
||||
const inventory = await getInventory(accountId);
|
||||
const suit = inventory.Suits.find(suit => suit._id.toString() == request.SuitId.$oid)!;
|
||||
|
||||
// refund shard
|
||||
const shard = Object.entries(colorToShard).find(
|
||||
([color]) => color == suit.ArchonCrystalUpgrades![request.Slot].Color
|
||||
)![1];
|
||||
const miscItemChanges = [
|
||||
{
|
||||
const miscItemChanges: IMiscItem[] = [];
|
||||
if (suit.ArchonCrystalUpgrades![request.Slot].Color) {
|
||||
// refund shard
|
||||
const shard = Object.entries(colorToShard).find(
|
||||
([color]) => color == suit.ArchonCrystalUpgrades![request.Slot].Color
|
||||
)![1];
|
||||
miscItemChanges.push({
|
||||
ItemType: shard,
|
||||
ItemCount: 1
|
||||
}
|
||||
];
|
||||
addMiscItems(inventory, miscItemChanges);
|
||||
});
|
||||
addMiscItems(inventory, miscItemChanges);
|
||||
}
|
||||
|
||||
// remove from suit
|
||||
suit.ArchonCrystalUpgrades![request.Slot] = {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user