fix: refuse to give starting gear again (#1993)
Reviewed-on: #1993 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
005690daa4
commit
203b3e20d9
@ -149,6 +149,11 @@ export const addStartingGear = async (
|
||||
inventory: TInventoryDatabaseDocument,
|
||||
startingGear?: TPartialStartingGear
|
||||
): Promise<IInventoryChanges> => {
|
||||
if (inventory.ReceivedStartingGear) {
|
||||
throw new Error(`account has already received starting gear`);
|
||||
}
|
||||
inventory.ReceivedStartingGear = true;
|
||||
|
||||
const { LongGuns, Pistols, Suits, Melee } = startingGear || {
|
||||
LongGuns: [{ ItemType: "/Lotus/Weapons/Tenno/Rifle/Rifle" }],
|
||||
Pistols: [{ ItemType: "/Lotus/Weapons/Tenno/Pistol/Pistol" }],
|
||||
@ -197,11 +202,6 @@ export const addStartingGear = async (
|
||||
combineInventoryChanges(inventoryChanges, inventoryDelta);
|
||||
}
|
||||
|
||||
if (inventory.ReceivedStartingGear) {
|
||||
logger.warn(`account already had starting gear but asked for it again?!`);
|
||||
}
|
||||
inventory.ReceivedStartingGear = true;
|
||||
|
||||
return inventoryChanges;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user