fix: items from enemy caches not showing "identified" #1016

Merged
OrdisPrime merged 1 commits from identified into main 2025-02-25 04:42:49 -08:00
2 changed files with 8 additions and 8 deletions

View File

@ -252,9 +252,7 @@ export const addMissionRewards = async (
} }
//TODO: check double reward merging //TODO: check double reward merging
const MissionRewards = getRandomMissionDrops(rewardInfo).map(drop => { const MissionRewards: IMissionReward[] = getRandomMissionDrops(rewardInfo);
return { StoreItem: drop.type, ItemCount: drop.itemCount };
});
logger.debug("random mission drops:", MissionRewards); logger.debug("random mission drops:", MissionRewards);
const inventoryChanges: IInventoryChanges = {}; const inventoryChanges: IInventoryChanges = {};
@ -389,8 +387,8 @@ function getLevelCreditRewards(nodeName: string): number {
//TODO: get dark sektor fixed credit rewards and railjack bonus //TODO: get dark sektor fixed credit rewards and railjack bonus
} }
function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] { function getRandomMissionDrops(RewardInfo: IRewardInfo): IMissionReward[] {
const drops: IRngResult[] = []; const drops: IMissionReward[] = [];
if (RewardInfo.node in ExportRegions) { if (RewardInfo.node in ExportRegions) {
const region = ExportRegions[RewardInfo.node]; const region = ExportRegions[RewardInfo.node];
const rewardManifests = region.rewardManifests; const rewardManifests = region.rewardManifests;
@ -412,7 +410,7 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] {
const rotationRewards = table[rotation]; const rotationRewards = table[rotation];
const drop = getRandomRewardByChance(rotationRewards); const drop = getRandomRewardByChance(rotationRewards);
if (drop) { if (drop) {
drops.push(drop); drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount });
} }
} }
}); });
@ -422,7 +420,7 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] {
for (let rotation = 0; rotation != RewardInfo.EnemyCachesFound; ++rotation) { for (let rotation = 0; rotation != RewardInfo.EnemyCachesFound; ++rotation) {
const drop = getRandomRewardByChance(deck[rotation]); const drop = getRandomRewardByChance(deck[rotation]);
if (drop) { if (drop) {
drops.push(drop); drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount, FromEnemyCache: true });
} }
} }
} }
@ -441,7 +439,7 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] {
const drop = getRandomRewardByChance(deck[rotation]); const drop = getRandomRewardByChance(deck[rotation]);
if (drop) { if (drop) {
drops.push(drop); drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount });
} }
} }
} }

View File

@ -8,4 +8,6 @@ export interface IMissionReward {
ItemCount: number; ItemCount: number;
TweetText?: string; TweetText?: string;
ProductCategory?: string; ProductCategory?: string;
FromEnemyCache?: boolean;
IsStrippedItem?: boolean;
} }