Compare commits
No commits in common. "521a8998bc1b5c6a8b3a5e609b57f508a1255eb5" and "71d1b6094c60be7b9f20bd64338ca44cc072b6c4" have entirely different histories.
521a8998bc
...
71d1b6094c
@ -30,14 +30,15 @@ export const fishmongerController: RequestHandler = async (req, res) => {
|
|||||||
miscItemChanges.push({ ItemType: fish.ItemType, ItemCount: fish.ItemCount * -1 });
|
miscItemChanges.push({ ItemType: fish.ItemType, ItemCount: fish.ItemCount * -1 });
|
||||||
}
|
}
|
||||||
addMiscItems(inventory, miscItemChanges);
|
addMiscItems(inventory, miscItemChanges);
|
||||||
if (gainedStanding && syndicateTag) addStanding(inventory, syndicateTag, gainedStanding);
|
let affiliationMod;
|
||||||
|
if (gainedStanding && syndicateTag) affiliationMod = addStanding(inventory, syndicateTag, gainedStanding);
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
res.json({
|
res.json({
|
||||||
InventoryChanges: {
|
InventoryChanges: {
|
||||||
MiscItems: miscItemChanges
|
MiscItems: miscItemChanges
|
||||||
},
|
},
|
||||||
SyndicateTag: syndicateTag,
|
SyndicateTag: syndicateTag,
|
||||||
StandingChange: gainedStanding
|
StandingChange: affiliationMod?.Standing || 0
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import { IMiscItem, InventorySlot } from "@/src/types/inventoryTypes/inventoryTy
|
|||||||
import { IOid } from "@/src/types/commonTypes";
|
import { IOid } from "@/src/types/commonTypes";
|
||||||
import { ExportSyndicates, ExportWeapons } from "warframe-public-export-plus";
|
import { ExportSyndicates, ExportWeapons } from "warframe-public-export-plus";
|
||||||
import { logger } from "@/src/utils/logger";
|
import { logger } from "@/src/utils/logger";
|
||||||
import { IAffiliationMods, IInventoryChanges } from "@/src/types/purchaseTypes";
|
import { IInventoryChanges } from "@/src/types/purchaseTypes";
|
||||||
import { EquipmentFeatures } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
import { EquipmentFeatures } from "@/src/types/inventoryTypes/commonInventoryTypes";
|
||||||
|
|
||||||
export const syndicateStandingBonusController: RequestHandler = async (req, res) => {
|
export const syndicateStandingBonusController: RequestHandler = async (req, res) => {
|
||||||
@ -54,14 +54,13 @@ export const syndicateStandingBonusController: RequestHandler = async (req, res)
|
|||||||
inventoryChanges[slotBin] = { count: -1, platinum: 0, Slots: 1 };
|
inventoryChanges[slotBin] = { count: -1, platinum: 0, Slots: 1 };
|
||||||
}
|
}
|
||||||
|
|
||||||
const affiliationMods: IAffiliationMods[] = [];
|
const affiliationMod = addStanding(inventory, request.Operation.AffiliationTag, gainedStanding, true);
|
||||||
addStanding(inventory, request.Operation.AffiliationTag, gainedStanding, affiliationMods, true);
|
|
||||||
|
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
|
|
||||||
res.json({
|
res.json({
|
||||||
InventoryChanges: inventoryChanges,
|
InventoryChanges: inventoryChanges,
|
||||||
AffiliationMods: affiliationMods
|
AffiliationMods: [affiliationMod]
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1202,10 +1202,8 @@ export const addStanding = (
|
|||||||
inventory: TInventoryDatabaseDocument,
|
inventory: TInventoryDatabaseDocument,
|
||||||
syndicateTag: string,
|
syndicateTag: string,
|
||||||
gainedStanding: number,
|
gainedStanding: number,
|
||||||
affiliationMods: IAffiliationMods[] = [],
|
isMedallion: boolean = false
|
||||||
isMedallion: boolean = false,
|
): IAffiliationMods => {
|
||||||
propagateAlignments: boolean = true
|
|
||||||
): void => {
|
|
||||||
let syndicate = inventory.Affiliations.find(x => x.Tag == syndicateTag);
|
let syndicate = inventory.Affiliations.find(x => x.Tag == syndicateTag);
|
||||||
const syndicateMeta = ExportSyndicates[syndicateTag];
|
const syndicateMeta = ExportSyndicates[syndicateTag];
|
||||||
|
|
||||||
@ -1225,16 +1223,10 @@ export const addStanding = (
|
|||||||
}
|
}
|
||||||
|
|
||||||
syndicate.Standing += gainedStanding;
|
syndicate.Standing += gainedStanding;
|
||||||
affiliationMods.push({
|
return {
|
||||||
Tag: syndicateTag,
|
Tag: syndicateTag,
|
||||||
Standing: gainedStanding
|
Standing: gainedStanding
|
||||||
});
|
};
|
||||||
|
|
||||||
if (syndicateMeta.alignments && propagateAlignments) {
|
|
||||||
for (const [tag, factor] of Object.entries(syndicateMeta.alignments)) {
|
|
||||||
addStanding(inventory, tag, gainedStanding * factor, affiliationMods, isMedallion, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: AffiliationMods support (Nightwave).
|
// TODO: AffiliationMods support (Nightwave).
|
||||||
|
@ -1236,18 +1236,19 @@ export const addMissionRewards = async (
|
|||||||
SyndicateXPItemReward = medallionAmount;
|
SyndicateXPItemReward = medallionAmount;
|
||||||
} else {
|
} else {
|
||||||
if (rewardInfo.JobTier! >= 0) {
|
if (rewardInfo.JobTier! >= 0) {
|
||||||
|
AffiliationMods.push(
|
||||||
addStanding(
|
addStanding(
|
||||||
inventory,
|
inventory,
|
||||||
syndicateEntry.Tag,
|
syndicateEntry.Tag,
|
||||||
Math.floor(currentJob.xpAmounts[rewardInfo.JobStage] / (rewardInfo.Q ? 0.8 : 1)),
|
Math.floor(currentJob.xpAmounts[rewardInfo.JobStage] / (rewardInfo.Q ? 0.8 : 1))
|
||||||
AffiliationMods
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
if (jobType.endsWith("Heists/HeistProfitTakerBountyOne") && rewardInfo.JobStage === 2) {
|
if (jobType.endsWith("Heists/HeistProfitTakerBountyOne") && rewardInfo.JobStage === 2) {
|
||||||
addStanding(inventory, syndicateEntry.Tag, 1000, AffiliationMods);
|
AffiliationMods.push(addStanding(inventory, syndicateEntry.Tag, 1000));
|
||||||
}
|
}
|
||||||
if (jobType.endsWith("Hunts/AllTeralystsHunt") && rewardInfo.JobStage === 2) {
|
if (jobType.endsWith("Hunts/AllTeralystsHunt") && rewardInfo.JobStage === 2) {
|
||||||
addStanding(inventory, syndicateEntry.Tag, 5000, AffiliationMods);
|
AffiliationMods.push(addStanding(inventory, syndicateEntry.Tag, 5000));
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
[
|
[
|
||||||
@ -1258,7 +1259,7 @@ export const addMissionRewards = async (
|
|||||||
"Heists/HeistExploiterBountyOne"
|
"Heists/HeistExploiterBountyOne"
|
||||||
].some(ending => jobType.endsWith(ending))
|
].some(ending => jobType.endsWith(ending))
|
||||||
) {
|
) {
|
||||||
addStanding(inventory, syndicateEntry.Tag, 1000, AffiliationMods);
|
AffiliationMods.push(addStanding(inventory, syndicateEntry.Tag, 1000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1283,7 +1284,7 @@ export const addMissionRewards = async (
|
|||||||
let standingAmount = (tier + 1) * 1000;
|
let standingAmount = (tier + 1) * 1000;
|
||||||
if (tier > 5) standingAmount = 7500; // InfestedLichBounty
|
if (tier > 5) standingAmount = 7500; // InfestedLichBounty
|
||||||
if (isSteelPath) standingAmount *= 1.5;
|
if (isSteelPath) standingAmount *= 1.5;
|
||||||
addStanding(inventory, syndicateTag, standingAmount, AffiliationMods);
|
AffiliationMods.push(addStanding(inventory, syndicateTag, standingAmount));
|
||||||
}
|
}
|
||||||
if (syndicateTag == "HexSyndicate" && chemistry && tier < 6) {
|
if (syndicateTag == "HexSyndicate" && chemistry && tier < 6) {
|
||||||
const seed = getWorldState().SyndicateMissions.find(x => x.Tag == "HexSyndicate")!.Seed;
|
const seed = getWorldState().SyndicateMissions.find(x => x.Tag == "HexSyndicate")!.Seed;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user