fix: add MoaPets into sellController (#1813)
Reviewed-on: #1813 Reviewed-by: Sainan <sainan@calamity.inc> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
This commit is contained in:
parent
a67f99b665
commit
8c32dc2670
@ -45,7 +45,7 @@ export const sellController: RequestHandler = async (req, res) => {
|
||||
if (payload.Items.SpaceGuns || payload.Items.SpaceMelee) {
|
||||
requiredFields.add(InventorySlot.SPACEWEAPONS);
|
||||
}
|
||||
if (payload.Items.Sentinels || payload.Items.SentinelWeapons) {
|
||||
if (payload.Items.Sentinels || payload.Items.SentinelWeapons || payload.Items.MoaPets) {
|
||||
requiredFields.add(InventorySlot.SENTINELS);
|
||||
}
|
||||
if (payload.Items.OperatorAmps) {
|
||||
@ -148,6 +148,12 @@ export const sellController: RequestHandler = async (req, res) => {
|
||||
freeUpSlot(inventory, InventorySlot.SENTINELS);
|
||||
});
|
||||
}
|
||||
if (payload.Items.MoaPets) {
|
||||
payload.Items.MoaPets.forEach(sellItem => {
|
||||
inventory.MoaPets.pull({ _id: sellItem.String });
|
||||
freeUpSlot(inventory, InventorySlot.SENTINELS);
|
||||
});
|
||||
}
|
||||
if (payload.Items.OperatorAmps) {
|
||||
payload.Items.OperatorAmps.forEach(sellItem => {
|
||||
inventory.OperatorAmps.pull({ _id: sellItem.String });
|
||||
@ -281,6 +287,7 @@ interface ISellRequest {
|
||||
SpaceMelee?: ISellItem[];
|
||||
Sentinels?: ISellItem[];
|
||||
SentinelWeapons?: ISellItem[];
|
||||
MoaPets?: ISellItem[];
|
||||
OperatorAmps?: ISellItem[];
|
||||
Hoverboards?: ISellItem[];
|
||||
Drones?: ISellItem[];
|
||||
|
Loading…
x
Reference in New Issue
Block a user