feat: granum void/purgatory rewards #1663
							
								
								
									
										8
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										8
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -18,7 +18,7 @@
 | 
			
		||||
        "morgan": "^1.10.0",
 | 
			
		||||
        "ncp": "^2.0.0",
 | 
			
		||||
        "typescript": "^5.5",
 | 
			
		||||
        "warframe-public-export-plus": "^0.5.54",
 | 
			
		||||
        "warframe-public-export-plus": "^0.5.55",
 | 
			
		||||
        "warframe-riven-info": "^0.1.2",
 | 
			
		||||
        "winston": "^3.17.0",
 | 
			
		||||
        "winston-daily-rotate-file": "^5.0.0"
 | 
			
		||||
@ -3789,9 +3789,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/warframe-public-export-plus": {
 | 
			
		||||
      "version": "0.5.54",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.54.tgz",
 | 
			
		||||
      "integrity": "sha512-27r6qLErr3P8UVDiEzhDAs/BjdAS3vI2CQ58jSI+LClDlj6QL+y1jQe8va/npl3Ft2K8PywLkZ8Yso0j9YzvOA=="
 | 
			
		||||
      "version": "0.5.55",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.55.tgz",
 | 
			
		||||
      "integrity": "sha512-Gnd4FCBVuxm2xWGfu8xxxqPIPSnnTqiEWlpP3rsFpVlQs09RNFnW2PEX9rCZt0f3SvHBv5ssDDrFlzgBHS1yrA=="
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/warframe-riven-info": {
 | 
			
		||||
      "version": "0.1.2",
 | 
			
		||||
 | 
			
		||||
@ -25,7 +25,7 @@
 | 
			
		||||
    "morgan": "^1.10.0",
 | 
			
		||||
    "ncp": "^2.0.0",
 | 
			
		||||
    "typescript": "^5.5",
 | 
			
		||||
    "warframe-public-export-plus": "^0.5.54",
 | 
			
		||||
    "warframe-public-export-plus": "^0.5.55",
 | 
			
		||||
    "warframe-riven-info": "^0.1.2",
 | 
			
		||||
    "winston": "^3.17.0",
 | 
			
		||||
    "winston-daily-rotate-file": "^5.0.0"
 | 
			
		||||
 | 
			
		||||
@ -1131,6 +1131,32 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo, tierOverride: number | u
 | 
			
		||||
                drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount });
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (RewardInfo.PurgatoryRewardQualifications) {
 | 
			
		||||
            for (const encodedQualification of RewardInfo.PurgatoryRewardQualifications) {
 | 
			
		||||
                const qualification = parseInt(encodedQualification) - 1;
 | 
			
		||||
                if (qualification < 0 || qualification > 8) {
 | 
			
		||||
                    logger.error(`unexpected purgatory reward qualification: ${qualification}`);
 | 
			
		||||
                } else {
 | 
			
		||||
                    const drop = getRandomRewardByChance(
 | 
			
		||||
                        ExportRewards[
 | 
			
		||||
                            [
 | 
			
		||||
                                "/Lotus/Types/Game/MissionDecks/PurgatoryMissionRewards/PurgatoryBlackTokenRewards",
 | 
			
		||||
                                "/Lotus/Types/Game/MissionDecks/PurgatoryMissionRewards/PurgatoryGoldTokenRewards",
 | 
			
		||||
                                "/Lotus/Types/Game/MissionDecks/PurgatoryMissionRewards/PurgatoryBlueTokenRewards"
 | 
			
		||||
                            ][Math.trunc(qualification / 3)]
 | 
			
		||||
                        ][qualification % 3]
 | 
			
		||||
                    );
 | 
			
		||||
                    if (drop) {
 | 
			
		||||
                        drops.push({
 | 
			
		||||
                            StoreItem: drop.type,
 | 
			
		||||
                            ItemCount: drop.itemCount,
 | 
			
		||||
                            FromEnemyCache: true // to show "identified"
 | 
			
		||||
                        });
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return drops;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user