This commit is contained in:
Master 2024-07-04 08:48:25 +08:00
parent 03a212f36a
commit b1ed6ba969
3 changed files with 16 additions and 12 deletions

View File

@ -82,14 +82,14 @@ export const combineInventoryChanges = (InventoryChanges: IInventoryChanges, del
InventoryChanges[key] = delta[key];
} else if (Array.isArray(delta[key])) {
const left = InventoryChanges[key] as object[];
const right: object[] = delta[key] as object[];
const right: object[] = delta[key];
for (const item of right) {
left.push(item);
}
} else {
console.assert(key.substring(-3) == "Bin");
const left = InventoryChanges[key] as IBinChanges;
const right: IBinChanges = delta[key] as IBinChanges;
const right: IBinChanges = delta[key];
left.count += right.count;
left.platinum += right.platinum;
left.Slots += right.Slots;

View File

@ -105,20 +105,24 @@ export const giveKeyChainTriggeredItems = async (accountId: string, keyChain: st
if (itemType in ExportRecipes) {
return {
Recipes: [{
Recipes: [
{
ItemType: itemType,
ItemCount: 1
}]
}
]
};
}
if (itemType in ExportResources) {
return {
WishlistChanges: [itemType],
MiscItems: [{
MiscItems: [
{
ItemType: itemType,
ItemCount: 1
}]
}
]
};
}

View File

@ -47,7 +47,7 @@ export interface IInboxReponseClient {
url?: string;
highPriority: boolean;
lowPrioNewPlayers?: boolean;
CrossPlatform?: boolean
CrossPlatform?: boolean;
date: IMongoDate;
r: boolean;
countedAtt?: ICountedAttDatabase[];