feat: handle KeyToRemove in EOM upload #1491
@ -22,6 +22,7 @@ import {
 | 
				
			|||||||
    addFusionTreasures,
 | 
					    addFusionTreasures,
 | 
				
			||||||
    addGearExpByCategory,
 | 
					    addGearExpByCategory,
 | 
				
			||||||
    addItem,
 | 
					    addItem,
 | 
				
			||||||
 | 
					    addLevelKeys,
 | 
				
			||||||
    addMiscItems,
 | 
					    addMiscItems,
 | 
				
			||||||
    addMissionComplete,
 | 
					    addMissionComplete,
 | 
				
			||||||
    addMods,
 | 
					    addMods,
 | 
				
			||||||
@ -89,6 +90,16 @@ export const addMissionInventoryUpdates = async (
 | 
				
			|||||||
                ]);
 | 
					                ]);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        if (inventoryUpdates.KeyToRemove) {
 | 
				
			||||||
 | 
					            if (!inventoryUpdates.KeyOwner || inventory.accountOwnerId.equals(inventoryUpdates.KeyOwner)) {
 | 
				
			||||||
 | 
					                addLevelKeys(inventory, [
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        ItemType: inventoryUpdates.KeyToRemove,
 | 
				
			||||||
 | 
					                        ItemCount: -1
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                ]);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        if (
 | 
					        if (
 | 
				
			||||||
            inventoryUpdates.MissionFailed &&
 | 
					            inventoryUpdates.MissionFailed &&
 | 
				
			||||||
            inventoryUpdates.MissionStatus == "GS_FAILURE" &&
 | 
					            inventoryUpdates.MissionStatus == "GS_FAILURE" &&
 | 
				
			||||||
 | 
				
			|||||||
@ -49,6 +49,9 @@ export type IMissionInventoryUpdateRequest = {
 | 
				
			|||||||
    rewardsMultiplier?: number;
 | 
					    rewardsMultiplier?: number;
 | 
				
			||||||
    GoalTag: string;
 | 
					    GoalTag: string;
 | 
				
			||||||
    LevelKeyName: string;
 | 
					    LevelKeyName: string;
 | 
				
			||||||
 | 
					    KeyOwner?: string;
 | 
				
			||||||
 | 
					    KeyRemovalHash?: string;
 | 
				
			||||||
 | 
					    KeyToRemove?: string;
 | 
				
			||||||
    ActiveBoosters?: IBooster[];
 | 
					    ActiveBoosters?: IBooster[];
 | 
				
			||||||
    RawUpgrades?: IRawUpgrade[];
 | 
					    RawUpgrades?: IRawUpgrade[];
 | 
				
			||||||
    FusionTreasures?: IFusionTreasure[];
 | 
					    FusionTreasures?: IFusionTreasure[];
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user