remove markModified for schema'd types
This commit is contained in:
parent
0dd4cec541
commit
8d5f2f0883
@ -906,7 +906,6 @@ export const addShipDecorations = (
|
|||||||
|
|
||||||
if (itemIndex !== -1) {
|
if (itemIndex !== -1) {
|
||||||
ShipDecorations[itemIndex].ItemCount += ItemCount;
|
ShipDecorations[itemIndex].ItemCount += ItemCount;
|
||||||
inventory.markModified(`ShipDecorations.${itemIndex}.ItemCount`);
|
|
||||||
} else {
|
} else {
|
||||||
ShipDecorations.push({ ItemCount, ItemType });
|
ShipDecorations.push({ ItemCount, ItemType });
|
||||||
}
|
}
|
||||||
@ -921,7 +920,6 @@ export const addConsumables = (inventory: TInventoryDatabaseDocument, itemsArray
|
|||||||
|
|
||||||
if (itemIndex !== -1) {
|
if (itemIndex !== -1) {
|
||||||
Consumables[itemIndex].ItemCount += ItemCount;
|
Consumables[itemIndex].ItemCount += ItemCount;
|
||||||
inventory.markModified(`Consumables.${itemIndex}.ItemCount`);
|
|
||||||
} else {
|
} else {
|
||||||
Consumables.push({ ItemCount, ItemType });
|
Consumables.push({ ItemCount, ItemType });
|
||||||
}
|
}
|
||||||
@ -967,7 +965,6 @@ export const addRecipes = (inventory: TInventoryDatabaseDocument, itemsArray: IT
|
|||||||
|
|
||||||
if (itemIndex !== -1) {
|
if (itemIndex !== -1) {
|
||||||
Recipes[itemIndex].ItemCount += ItemCount;
|
Recipes[itemIndex].ItemCount += ItemCount;
|
||||||
inventory.markModified(`Recipes.${itemIndex}.ItemCount`);
|
|
||||||
} else {
|
} else {
|
||||||
Recipes.push({ ItemCount, ItemType });
|
Recipes.push({ ItemCount, ItemType });
|
||||||
}
|
}
|
||||||
@ -1006,7 +1003,6 @@ export const addFusionTreasures = (
|
|||||||
|
|
||||||
if (itemIndex !== -1) {
|
if (itemIndex !== -1) {
|
||||||
FusionTreasures[itemIndex].ItemCount += ItemCount;
|
FusionTreasures[itemIndex].ItemCount += ItemCount;
|
||||||
inventory.markModified(`FusionTreasures.${itemIndex}.ItemCount`);
|
|
||||||
} else {
|
} else {
|
||||||
FusionTreasures.push({ ItemCount, ItemType, Sockets });
|
FusionTreasures.push({ ItemCount, ItemType, Sockets });
|
||||||
}
|
}
|
||||||
@ -1077,7 +1073,6 @@ export const addChallenges = (
|
|||||||
|
|
||||||
if (itemIndex !== -1) {
|
if (itemIndex !== -1) {
|
||||||
category[itemIndex].Progress += Progress;
|
category[itemIndex].Progress += Progress;
|
||||||
inventory.markModified(`ChallengeProgress.${itemIndex}.ItemCount`);
|
|
||||||
} else {
|
} else {
|
||||||
category.push({ Name, Progress });
|
category.push({ Name, Progress });
|
||||||
}
|
}
|
||||||
@ -1105,7 +1100,6 @@ export const addBooster = (ItemType: string, time: number, inventory: TInventory
|
|||||||
if (itemIndex !== -1) {
|
if (itemIndex !== -1) {
|
||||||
const existingBooster = Boosters[itemIndex];
|
const existingBooster = Boosters[itemIndex];
|
||||||
existingBooster.ExpiryDate = Math.max(existingBooster.ExpiryDate, currentTime) + time;
|
existingBooster.ExpiryDate = Math.max(existingBooster.ExpiryDate, currentTime) + time;
|
||||||
inventory.markModified(`Boosters.${itemIndex}.ExpiryDate`);
|
|
||||||
} else {
|
} else {
|
||||||
Boosters.push({ ItemType, ExpiryDate: currentTime + time });
|
Boosters.push({ ItemType, ExpiryDate: currentTime + time });
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user