Added handling of Railjack Abandoned Caches
Including warning
This commit is contained in:
		
							parent
							
								
									9cc0c76ef5
								
							
						
					
					
						commit
						52960da3e4
					
				@ -1936,6 +1936,36 @@ function getRandomMissionDrops(
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        // Railjack Abandoned Cache Rewards, Rotation A (Mandatory Objectives)
 | 
			
		||||
        if (RewardInfo.POICompletions) {
 | 
			
		||||
            if(region.cacheRewardManifest){
 | 
			
		||||
                const deck = ExportRewards[region.cacheRewardManifest];
 | 
			
		||||
                for (let cache = 0; cache != RewardInfo.POICompletions; ++cache) {
 | 
			
		||||
                    const drop = getRandomRewardByChance(deck[0]);
 | 
			
		||||
                    if (drop) {
 | 
			
		||||
                        drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount, FromEnemyCache: true });
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            } else {
 | 
			
		||||
                logger.error(`POI completed, but there was no cache reward manifest at ${RewardInfo.node}`);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Railjack Abandoned Cache Rewards, Rotation B (Optional Objectives)
 | 
			
		||||
        if (RewardInfo.LootDungeonCompletions) {
 | 
			
		||||
            if(region.cacheRewardManifest){
 | 
			
		||||
                const deck = ExportRewards[region.cacheRewardManifest];
 | 
			
		||||
                for (let cache = 0; cache != RewardInfo.LootDungeonCompletions; ++cache) {
 | 
			
		||||
                    const drop = getRandomRewardByChance(deck[1]);
 | 
			
		||||
                    if (drop) {
 | 
			
		||||
                        drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount, FromEnemyCache: true });
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            } else {
 | 
			
		||||
                logger.error(`Loot dungeon completed, but there was no cache reward manifest at ${RewardInfo.node}`);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (region.cacheRewardManifest && RewardInfo.EnemyCachesFound) {
 | 
			
		||||
            const deck = ExportRewards[region.cacheRewardManifest];
 | 
			
		||||
            for (let rotation = 0; rotation != RewardInfo.EnemyCachesFound; ++rotation) {
 | 
			
		||||
 | 
			
		||||
@ -187,6 +187,8 @@ export interface IRewardInfo {
 | 
			
		||||
    rewardQualifications?: string; // did a Survival for 5 minutes and this was "1"
 | 
			
		||||
    rewardTierOverrides?: number[]; // Disruption
 | 
			
		||||
    PurgatoryRewardQualifications?: string;
 | 
			
		||||
    POICompletions?: number;
 | 
			
		||||
    LootDungeonCompletions?: number;
 | 
			
		||||
    rewardSeed?: number | bigint;
 | 
			
		||||
    periodicMissionTag?: string;
 | 
			
		||||
    T?: number; // Duviri
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user