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",
 | 
			
		||||
        "express": "^5",
 | 
			
		||||
        "mongoose": "^8.9.4",
 | 
			
		||||
        "warframe-public-export-plus": "^0.5.30",
 | 
			
		||||
        "warframe-public-export-plus": "^0.5.34",
 | 
			
		||||
        "warframe-riven-info": "^0.1.2",
 | 
			
		||||
        "winston": "^3.17.0",
 | 
			
		||||
        "winston-daily-rotate-file": "^5.0.0"
 | 
			
		||||
@ -4093,9 +4093,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/warframe-public-export-plus": {
 | 
			
		||||
      "version": "0.5.30",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.30.tgz",
 | 
			
		||||
      "integrity": "sha512-vzs+naEqp3iFZTbgIky4jiNbjNIovuR4oSimrFiuyIbrnfTlfXFzDfzT0hG2rgS8yEXBAbOcv2Zfm3fmWuZ0Kg=="
 | 
			
		||||
      "version": "0.5.34",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.34.tgz",
 | 
			
		||||
      "integrity": "sha512-sv6un4KohFEEJUbnmiWqf+KL4Th8r8HLI/owsutwni4R9g154JWEBScX7+6K7jH8eXWYxeKuCtPU9a5X2JFGHQ=="
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/warframe-riven-info": {
 | 
			
		||||
      "version": "0.1.2",
 | 
			
		||||
 | 
			
		||||
@ -17,7 +17,7 @@
 | 
			
		||||
    "copyfiles": "^2.4.1",
 | 
			
		||||
    "express": "^5",
 | 
			
		||||
    "mongoose": "^8.9.4",
 | 
			
		||||
    "warframe-public-export-plus": "^0.5.30",
 | 
			
		||||
    "warframe-public-export-plus": "^0.5.34",
 | 
			
		||||
    "warframe-riven-info": "^0.1.2",
 | 
			
		||||
    "winston": "^3.17.0",
 | 
			
		||||
    "winston-daily-rotate-file": "^5.0.0"
 | 
			
		||||
 | 
			
		||||
@ -367,17 +367,37 @@ export const addItem = async (
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
    if (typeName in ExportKeys) {
 | 
			
		||||
        // Note: "/Lotus/Types/Keys/" contains some EmailItems
 | 
			
		||||
        inventory.QuestKeys.push({ ItemType: typeName });
 | 
			
		||||
        return {
 | 
			
		||||
            InventoryChanges: {
 | 
			
		||||
                QuestKeys: [
 | 
			
		||||
                    {
 | 
			
		||||
                        ItemType: typeName
 | 
			
		||||
                    }
 | 
			
		||||
                ]
 | 
			
		||||
        if (ExportKeys[typeName].chainStages) {
 | 
			
		||||
            inventory.QuestKeys.push({ ItemType: typeName, Progress: [] });
 | 
			
		||||
| 
					
	
	
	
	
	
	
	
	 
					
					OrdisPrime marked this conversation as resolved
					
				 
				 | 
			||||
            return {
 | 
			
		||||
                InventoryChanges: {
 | 
			
		||||
                    QuestKeys: [
 | 
			
		||||
                        {
 | 
			
		||||
                            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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	
why add Progress? The game handles it itself normally.