fix: be less strict with required avatar type for personal synthesis (#1768)
Fixes #1766 Reviewed-on: #1768 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
ad2f143f15
commit
6d93ae9f2d
@ -55,6 +55,7 @@ import { Loadout } from "../models/inventoryModels/loadoutModel";
|
|||||||
import { ILoadoutConfigDatabase } from "../types/saveLoadoutTypes";
|
import { ILoadoutConfigDatabase } from "../types/saveLoadoutTypes";
|
||||||
import { getLiteSortie, getWorldState, idToWeek } from "./worldStateService";
|
import { getLiteSortie, getWorldState, idToWeek } from "./worldStateService";
|
||||||
import { config } from "./configService";
|
import { config } from "./configService";
|
||||||
|
import libraryDailyTasks from "@/static/fixed_responses/libraryDailyTasks.json";
|
||||||
|
|
||||||
const getRotations = (rewardInfo: IRewardInfo, tierOverride?: number): number[] => {
|
const getRotations = (rewardInfo: IRewardInfo, tierOverride?: number): number[] => {
|
||||||
// For Spy missions, e.g. 3 vaults cracked = A, B, C
|
// For Spy missions, e.g. 3 vaults cracked = A, B, C
|
||||||
@ -331,35 +332,36 @@ export const addMissionInventoryUpdates = async (
|
|||||||
case "LibraryScans":
|
case "LibraryScans":
|
||||||
value.forEach(scan => {
|
value.forEach(scan => {
|
||||||
let synthesisIgnored = true;
|
let synthesisIgnored = true;
|
||||||
if (
|
if (inventory.LibraryPersonalTarget) {
|
||||||
inventory.LibraryPersonalTarget &&
|
const taskAvatar = libraryPersonalTargetToAvatar[inventory.LibraryPersonalTarget];
|
||||||
libraryPersonalTargetToAvatar[inventory.LibraryPersonalTarget] == scan.EnemyType
|
const taskAvatars = libraryDailyTasks.find(x => x.indexOf(taskAvatar) != -1)!;
|
||||||
) {
|
if (taskAvatars.indexOf(scan.EnemyType) != -1) {
|
||||||
let progress = inventory.LibraryPersonalProgress.find(
|
let progress = inventory.LibraryPersonalProgress.find(
|
||||||
x => x.TargetType == inventory.LibraryPersonalTarget
|
x => x.TargetType == inventory.LibraryPersonalTarget
|
||||||
);
|
);
|
||||||
if (!progress) {
|
if (!progress) {
|
||||||
progress =
|
progress =
|
||||||
inventory.LibraryPersonalProgress[
|
inventory.LibraryPersonalProgress[
|
||||||
inventory.LibraryPersonalProgress.push({
|
inventory.LibraryPersonalProgress.push({
|
||||||
TargetType: inventory.LibraryPersonalTarget,
|
TargetType: inventory.LibraryPersonalTarget,
|
||||||
Scans: 0,
|
Scans: 0,
|
||||||
Completed: false
|
Completed: false
|
||||||
}) - 1
|
}) - 1
|
||||||
];
|
];
|
||||||
|
}
|
||||||
|
progress.Scans += scan.Count;
|
||||||
|
if (
|
||||||
|
progress.Scans >=
|
||||||
|
(inventory.LibraryPersonalTarget ==
|
||||||
|
"/Lotus/Types/Game/Library/Targets/DragonframeQuestTarget"
|
||||||
|
? 3
|
||||||
|
: 10)
|
||||||
|
) {
|
||||||
|
progress.Completed = true;
|
||||||
|
}
|
||||||
|
logger.debug(`synthesis of ${scan.EnemyType} added to personal target progress`);
|
||||||
|
synthesisIgnored = false;
|
||||||
}
|
}
|
||||||
progress.Scans += scan.Count;
|
|
||||||
if (
|
|
||||||
progress.Scans >=
|
|
||||||
(inventory.LibraryPersonalTarget ==
|
|
||||||
"/Lotus/Types/Game/Library/Targets/DragonframeQuestTarget"
|
|
||||||
? 3
|
|
||||||
: 10)
|
|
||||||
) {
|
|
||||||
progress.Completed = true;
|
|
||||||
}
|
|
||||||
logger.debug(`synthesis of ${scan.EnemyType} added to personal target progress`);
|
|
||||||
synthesisIgnored = false;
|
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
inventory.LibraryActiveDailyTaskInfo &&
|
inventory.LibraryActiveDailyTaskInfo &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user