WIP: fix: LevelKeys items added to QuestKeys #986
							
								
								
									
										8
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										8
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -12,7 +12,7 @@
 | 
				
			|||||||
        "copyfiles": "^2.4.1",
 | 
					        "copyfiles": "^2.4.1",
 | 
				
			||||||
        "express": "^5",
 | 
					        "express": "^5",
 | 
				
			||||||
        "mongoose": "^8.9.4",
 | 
					        "mongoose": "^8.9.4",
 | 
				
			||||||
        "warframe-public-export-plus": "^0.5.30",
 | 
					        "warframe-public-export-plus": "^0.5.34",
 | 
				
			||||||
        "warframe-riven-info": "^0.1.2",
 | 
					        "warframe-riven-info": "^0.1.2",
 | 
				
			||||||
        "winston": "^3.17.0",
 | 
					        "winston": "^3.17.0",
 | 
				
			||||||
        "winston-daily-rotate-file": "^5.0.0"
 | 
					        "winston-daily-rotate-file": "^5.0.0"
 | 
				
			||||||
@ -4093,9 +4093,9 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/warframe-public-export-plus": {
 | 
					    "node_modules/warframe-public-export-plus": {
 | 
				
			||||||
      "version": "0.5.30",
 | 
					      "version": "0.5.34",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.30.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.34.tgz",
 | 
				
			||||||
      "integrity": "sha512-vzs+naEqp3iFZTbgIky4jiNbjNIovuR4oSimrFiuyIbrnfTlfXFzDfzT0hG2rgS8yEXBAbOcv2Zfm3fmWuZ0Kg=="
 | 
					      "integrity": "sha512-sv6un4KohFEEJUbnmiWqf+KL4Th8r8HLI/owsutwni4R9g154JWEBScX7+6K7jH8eXWYxeKuCtPU9a5X2JFGHQ=="
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/warframe-riven-info": {
 | 
					    "node_modules/warframe-riven-info": {
 | 
				
			||||||
      "version": "0.1.2",
 | 
					      "version": "0.1.2",
 | 
				
			||||||
 | 
				
			|||||||
@ -17,7 +17,7 @@
 | 
				
			|||||||
    "copyfiles": "^2.4.1",
 | 
					    "copyfiles": "^2.4.1",
 | 
				
			||||||
    "express": "^5",
 | 
					    "express": "^5",
 | 
				
			||||||
    "mongoose": "^8.9.4",
 | 
					    "mongoose": "^8.9.4",
 | 
				
			||||||
    "warframe-public-export-plus": "^0.5.30",
 | 
					    "warframe-public-export-plus": "^0.5.34",
 | 
				
			||||||
    "warframe-riven-info": "^0.1.2",
 | 
					    "warframe-riven-info": "^0.1.2",
 | 
				
			||||||
    "winston": "^3.17.0",
 | 
					    "winston": "^3.17.0",
 | 
				
			||||||
    "winston-daily-rotate-file": "^5.0.0"
 | 
					    "winston-daily-rotate-file": "^5.0.0"
 | 
				
			||||||
 | 
				
			|||||||
@ -367,17 +367,37 @@ export const addItem = async (
 | 
				
			|||||||
        };
 | 
					        };
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (typeName in ExportKeys) {
 | 
					    if (typeName in ExportKeys) {
 | 
				
			||||||
        // Note: "/Lotus/Types/Keys/" contains some EmailItems
 | 
					        if (ExportKeys[typeName].chainStages) {
 | 
				
			||||||
        inventory.QuestKeys.push({ ItemType: typeName });
 | 
					            inventory.QuestKeys.push({ ItemType: typeName, Progress: [] });
 | 
				
			||||||
| 
							
							
								
									
	
	
	
	
	
	
	
	 
					
					OrdisPrime marked this conversation as resolved
					
				 
				 | 
					|||||||
            return {
 | 
					            return {
 | 
				
			||||||
                InventoryChanges: {
 | 
					                InventoryChanges: {
 | 
				
			||||||
                    QuestKeys: [
 | 
					                    QuestKeys: [
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                        ItemType: typeName
 | 
					                            ItemType: typeName,
 | 
				
			||||||
 | 
					                            Progress: []
 | 
				
			||||||
| 
						
							
	
	
	
	
	
	
	
	 
					
					OrdisPrime marked this conversation as resolved
					
				 
				
				
					
						OrdisPrime
						commented  
			
		do you have a log where this is actually returned? I never saw it and I don't think its necessary do you have a log where this is actually returned? I never saw it and I don't think its necessary 
			
			
		 | 
				|||||||
                        }
 | 
					                        }
 | 
				
			||||||
                    ]
 | 
					                    ]
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            const itemIndex = inventory.LevelKeys.findIndex(i => i.ItemType === typeName);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (itemIndex !== -1) {
 | 
				
			||||||
 | 
					                inventory.LevelKeys[itemIndex].ItemCount += quantity;
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                inventory.LevelKeys.push({ ItemType: typeName, ItemCount: quantity });
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return {
 | 
				
			||||||
 | 
					                InventoryChanges: {
 | 
				
			||||||
 | 
					                    LevelKeys: [
 | 
				
			||||||
 | 
					                        {
 | 
				
			||||||
 | 
					                            ItemType: typeName,
 | 
				
			||||||
 | 
					                            ItemCount: quantity
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    ]
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Path-based duck typing
 | 
					    // Path-based duck typing
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	
why add Progress? The game handles it itself normally.