Compare commits
14 Commits
key-to-rem
...
main
Author | SHA1 | Date | |
---|---|---|---|
2c552f7b8a | |||
e903dce307 | |||
5aedb579aa | |||
5702ab5f3b | |||
fac52bfda1 | |||
2ff535e7ab | |||
9698baa979 | |||
ceb7deec06 | |||
fe0b745066 | |||
8f41d3c13f | |||
f906cdb5e8 | |||
ea6facf3fc | |||
7a2c187d54 | |||
76e40685ab |
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 <5.6.0",
|
||||
"warframe-public-export-plus": "^0.5.50",
|
||||
"warframe-public-export-plus": "^0.5.52",
|
||||
"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.50",
|
||||
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.50.tgz",
|
||||
"integrity": "sha512-KlhdY/Q5sRAIn/RhmdviKBoX3gk+Jtuen0cWnFB2zqK7eKYMDtd79bKOtTPtnK9zCNzh6gFug2wEeDVam3Bwlw=="
|
||||
"version": "0.5.52",
|
||||
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.52.tgz",
|
||||
"integrity": "sha512-mJyQbTFMDwgBSkhUYJzcfJg9qrMTrL1pyZuAxV/Dov68xUikK5zigQSYM3ZkKYbhwBtg0Bx/+7q9GAmPzGaRhA=="
|
||||
},
|
||||
"node_modules/warframe-riven-info": {
|
||||
"version": "0.1.2",
|
||||
|
@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"start": "node --import ./build/src/pathman.js build/src/index.js",
|
||||
"dev": "ts-node-dev --openssl-legacy-provider -r tsconfig-paths/register src/index.ts ",
|
||||
"build": "tsc --incremental && ncp static/webui build/static/webui",
|
||||
"build": "tsc --incremental --sourceMap && ncp static/webui build/static/webui",
|
||||
"verify": "tsgo --noEmit",
|
||||
"lint": "eslint --ext .ts .",
|
||||
"lint:fix": "eslint --fix --ext .ts .",
|
||||
@ -24,7 +24,7 @@
|
||||
"morgan": "^1.10.0",
|
||||
"ncp": "^2.0.0",
|
||||
"typescript": ">=5.5 <5.6.0",
|
||||
"warframe-public-export-plus": "^0.5.50",
|
||||
"warframe-public-export-plus": "^0.5.52",
|
||||
"warframe-riven-info": "^0.1.2",
|
||||
"winston": "^3.17.0",
|
||||
"winston-daily-rotate-file": "^5.0.0"
|
||||
|
@ -77,8 +77,8 @@ export const placeDecoInComponentController: RequestHandler = async (req, res) =
|
||||
}
|
||||
}
|
||||
if (enoughMiscItems) {
|
||||
guild.VaultRegularCredits -= meta.price;
|
||||
deco.RegularCredits = meta.price;
|
||||
guild.VaultRegularCredits -= scaleRequiredCount(guild.Tier, meta.price);
|
||||
deco.RegularCredits = scaleRequiredCount(guild.Tier, meta.price);
|
||||
|
||||
deco.MiscItems = [];
|
||||
for (const ingredient of meta.ingredients) {
|
||||
|
@ -23,7 +23,7 @@ const trainingResultController: RequestHandler = async (req, res): Promise<void>
|
||||
|
||||
const trainingResults = getJSONfromString<ITrainingResultsRequest>(String(req.body));
|
||||
|
||||
const inventory = await getInventory(accountId);
|
||||
const inventory = await getInventory(accountId, "TrainingDate PlayerLevel TradesRemaining");
|
||||
|
||||
if (trainingResults.numLevelsGained == 1) {
|
||||
let time = Date.now();
|
||||
@ -33,6 +33,7 @@ const trainingResultController: RequestHandler = async (req, res): Promise<void>
|
||||
inventory.TrainingDate = new Date(time);
|
||||
|
||||
inventory.PlayerLevel += 1;
|
||||
inventory.TradesRemaining += 1;
|
||||
|
||||
await createMessage(accountId, [
|
||||
{
|
||||
|
@ -95,7 +95,6 @@ export const getGuildClient = async (guild: TGuildDatabaseDocument, accountId: s
|
||||
LongMOTD: guild.LongMOTD,
|
||||
Members: members,
|
||||
Ranks: guild.Ranks,
|
||||
TradeTax: guild.TradeTax,
|
||||
Tier: guild.Tier,
|
||||
Vault: getGuildVault(guild),
|
||||
ActiveDojoColorResearch: guild.ActiveDojoColorResearch,
|
||||
@ -104,6 +103,7 @@ export const getGuildClient = async (guild: TGuildDatabaseDocument, accountId: s
|
||||
IsContributor: !!guild.CeremonyContributors?.find(x => x.equals(accountId)),
|
||||
NumContributors: guild.CeremonyContributors?.length ?? 0,
|
||||
CeremonyResetDate: guild.CeremonyResetDate ? toMongoDate(guild.CeremonyResetDate) : undefined,
|
||||
AutoContributeFromVault: guild.AutoContributeFromVault,
|
||||
AllianceId: guild.AllianceId ? toOid(guild.AllianceId) : undefined
|
||||
};
|
||||
};
|
||||
@ -126,7 +126,11 @@ export const getDojoClient = async (
|
||||
const dojo: IDojoClient = {
|
||||
_id: { $oid: guild._id.toString() },
|
||||
Name: guild.Name,
|
||||
Tier: 1,
|
||||
Tier: guild.Tier,
|
||||
GuildEmblem: guild.Emblem,
|
||||
TradeTax: guild.TradeTax,
|
||||
NumContributors: guild.CeremonyContributors?.length ?? 0,
|
||||
CeremonyResetDate: guild.CeremonyResetDate ? toMongoDate(guild.CeremonyResetDate) : undefined,
|
||||
FixedContributions: true,
|
||||
DojoRevision: 1,
|
||||
Vault: getGuildVault(guild),
|
||||
|
@ -538,9 +538,15 @@ export const addItem = async (
|
||||
if (!key) return {};
|
||||
return { QuestKeys: [key] };
|
||||
} else {
|
||||
const levelKeyChanges = [{ ItemType: typeName, ItemCount: quantity }];
|
||||
addLevelKeys(inventory, levelKeyChanges);
|
||||
return { LevelKeys: levelKeyChanges };
|
||||
const key = { ItemType: typeName, ItemCount: quantity };
|
||||
|
||||
const index = inventory.LevelKeys.findIndex(levelKey => levelKey.ItemType == typeName);
|
||||
if (index != -1) {
|
||||
inventory.LevelKeys[index].ItemCount += quantity;
|
||||
} else {
|
||||
inventory.LevelKeys.push(key);
|
||||
}
|
||||
return { LevelKeys: [key] };
|
||||
}
|
||||
}
|
||||
if (typeName in ExportDrones) {
|
||||
@ -1234,10 +1240,6 @@ export const addRecipes = (inventory: TInventoryDatabaseDocument, itemsArray: IT
|
||||
applyArrayChanges(inventory.Recipes, itemsArray);
|
||||
};
|
||||
|
||||
export const addLevelKeys = (inventory: TInventoryDatabaseDocument, itemsArray: ITypeCount[]): void => {
|
||||
applyArrayChanges(inventory.LevelKeys, itemsArray);
|
||||
};
|
||||
|
||||
export const addMods = (inventory: TInventoryDatabaseDocument, itemsArray: IRawUpgrade[]): void => {
|
||||
const { RawUpgrades } = inventory;
|
||||
|
||||
|
@ -22,7 +22,6 @@ import {
|
||||
addFusionTreasures,
|
||||
addGearExpByCategory,
|
||||
addItem,
|
||||
addLevelKeys,
|
||||
addMiscItems,
|
||||
addMissionComplete,
|
||||
addMods,
|
||||
@ -78,52 +77,19 @@ export const addMissionInventoryUpdates = async (
|
||||
inventoryUpdates: IMissionInventoryUpdateRequest
|
||||
): Promise<IInventoryChanges> => {
|
||||
const inventoryChanges: IInventoryChanges = {};
|
||||
if (inventoryUpdates.EndOfMatchUpload) {
|
||||
if (inventoryUpdates.Missions && inventoryUpdates.Missions.Tag in ExportRegions) {
|
||||
const node = ExportRegions[inventoryUpdates.Missions.Tag];
|
||||
if (node.miscItemFee) {
|
||||
addMiscItems(inventory, [
|
||||
{
|
||||
ItemType: node.miscItemFee.ItemType,
|
||||
ItemCount: node.miscItemFee.ItemCount * -1
|
||||
}
|
||||
]);
|
||||
}
|
||||
}
|
||||
if (inventoryUpdates.KeyToRemove) {
|
||||
if (!inventoryUpdates.KeyOwner || inventory.accountOwnerId.equals(inventoryUpdates.KeyOwner)) {
|
||||
addLevelKeys(inventory, [
|
||||
{
|
||||
ItemType: inventoryUpdates.KeyToRemove,
|
||||
ItemCount: -1
|
||||
}
|
||||
]);
|
||||
}
|
||||
}
|
||||
if (
|
||||
inventoryUpdates.MissionFailed &&
|
||||
inventoryUpdates.MissionStatus == "GS_FAILURE" &&
|
||||
inventoryUpdates.ObjectiveReached &&
|
||||
!inventoryUpdates.LockedWeaponGroup
|
||||
) {
|
||||
const loadout = (await Loadout.findById(inventory.LoadOutPresets, "NORMAL"))!;
|
||||
const config = loadout.NORMAL.id(inventory.CurrentLoadOutIds[0].$oid)!;
|
||||
const SuitId = new Types.ObjectId(config.s!.ItemId.$oid);
|
||||
|
||||
inventory.BrandedSuits ??= [];
|
||||
if (!inventory.BrandedSuits.find(x => x.equals(SuitId))) {
|
||||
inventory.BrandedSuits.push(SuitId);
|
||||
|
||||
await createMessage(inventory.accountOwnerId, [
|
||||
{
|
||||
sndr: "/Lotus/Language/Menu/Mailbox_WarframeSender",
|
||||
msg: "/Lotus/Language/G1Quests/BrandedMessage",
|
||||
sub: "/Lotus/Language/G1Quests/BrandedTitle",
|
||||
att: ["/Lotus/Types/Recipes/Components/BrandRemovalBlueprint"],
|
||||
highPriority: true // TOVERIFY: I cannot find any content of this within the last 10 years so I can only assume that highPriority is set (it certainly would make sense), but I just don't know for sure that it is so on live.
|
||||
}
|
||||
]);
|
||||
}
|
||||
if (
|
||||
inventoryUpdates.EndOfMatchUpload &&
|
||||
inventoryUpdates.Missions &&
|
||||
inventoryUpdates.Missions.Tag in ExportRegions
|
||||
) {
|
||||
const node = ExportRegions[inventoryUpdates.Missions.Tag];
|
||||
if (node.miscItemFee) {
|
||||
addMiscItems(inventory, [
|
||||
{
|
||||
ItemType: node.miscItemFee.ItemType,
|
||||
ItemCount: node.miscItemFee.ItemCount * -1
|
||||
}
|
||||
]);
|
||||
}
|
||||
}
|
||||
if (inventoryUpdates.RewardInfo) {
|
||||
@ -144,6 +110,32 @@ export const addMissionInventoryUpdates = async (
|
||||
inventory.NemesisAbandonedRewards = inventoryUpdates.RewardInfo.NemesisAbandonedRewards;
|
||||
}
|
||||
}
|
||||
if (
|
||||
inventoryUpdates.MissionFailed &&
|
||||
inventoryUpdates.MissionStatus == "GS_FAILURE" &&
|
||||
inventoryUpdates.EndOfMatchUpload &&
|
||||
inventoryUpdates.ObjectiveReached &&
|
||||
!inventoryUpdates.LockedWeaponGroup
|
||||
) {
|
||||
const loadout = (await Loadout.findById(inventory.LoadOutPresets, "NORMAL"))!;
|
||||
const config = loadout.NORMAL.id(inventory.CurrentLoadOutIds[0].$oid)!;
|
||||
const SuitId = new Types.ObjectId(config.s!.ItemId.$oid);
|
||||
|
||||
inventory.BrandedSuits ??= [];
|
||||
if (!inventory.BrandedSuits.find(x => x.equals(SuitId))) {
|
||||
inventory.BrandedSuits.push(SuitId);
|
||||
|
||||
await createMessage(inventory.accountOwnerId, [
|
||||
{
|
||||
sndr: "/Lotus/Language/Menu/Mailbox_WarframeSender",
|
||||
msg: "/Lotus/Language/G1Quests/BrandedMessage",
|
||||
sub: "/Lotus/Language/G1Quests/BrandedTitle",
|
||||
att: ["/Lotus/Types/Recipes/Components/BrandRemovalBlueprint"],
|
||||
highPriority: true // TOVERIFY: I cannot find any content of this within the last 10 years so I can only assume that highPriority is set (it certainly would make sense), but I just don't know for sure that it is so on live.
|
||||
}
|
||||
]);
|
||||
}
|
||||
}
|
||||
for (const [key, value] of getEntriesUnsafe(inventoryUpdates)) {
|
||||
if (value === undefined) {
|
||||
logger.error(`Inventory update key ${key} has no value `);
|
||||
@ -449,7 +441,12 @@ export const addMissionInventoryUpdates = async (
|
||||
_id: new Types.ObjectId(ItemId.$oid),
|
||||
...loadoutConfigItemIdRemoved
|
||||
};
|
||||
loadout.NORMAL.id(loadoutId)!.overwrite(loadoutConfigDatabase);
|
||||
const dbConfig = loadout.NORMAL.id(loadoutId);
|
||||
if (dbConfig) {
|
||||
dbConfig.overwrite(loadoutConfigDatabase);
|
||||
} else {
|
||||
logger.warn(`couldn't update loadout because there's no config with id ${loadoutId}`);
|
||||
}
|
||||
}
|
||||
await loadout.save();
|
||||
}
|
||||
@ -729,6 +726,20 @@ export const addFixedLevelRewards = (
|
||||
MissionRewards.push(item);
|
||||
}
|
||||
}
|
||||
if (rewards.droptable) {
|
||||
if (rewards.droptable in ExportRewards) {
|
||||
logger.debug(`rolling ${rewards.droptable} for level key rewards`);
|
||||
const reward = getRandomRewardByChance(ExportRewards[rewards.droptable][0]);
|
||||
if (reward) {
|
||||
MissionRewards.push({
|
||||
StoreItem: reward.type,
|
||||
ItemCount: reward.itemCount
|
||||
});
|
||||
}
|
||||
} else {
|
||||
logger.error(`unknown droptable ${rewards.droptable}`);
|
||||
}
|
||||
}
|
||||
return missionBonusCredits;
|
||||
};
|
||||
|
||||
|
@ -177,6 +177,22 @@ export const completeQuest = async (inventory: TInventoryDatabaseDocument, quest
|
||||
await giveKeyChainMissionReward(inventory, { KeyChain: questKey, ChainStage: i });
|
||||
}
|
||||
|
||||
if (questKey == "/Lotus/Types/Keys/OrokinMoonQuest/OrokinMoonQuestKeyChain") {
|
||||
void createMessage(inventory.accountOwnerId, [
|
||||
{
|
||||
sndr: "/Lotus/Language/Bosses/Ordis",
|
||||
msg: "/Lotus/Language/G1Quests/SecondDreamFinishInboxMessage",
|
||||
att: [
|
||||
"/Lotus/Weapons/Tenno/Melee/Swords/StalkerTwo/StalkerTwoSmallSword",
|
||||
"/Lotus/Upgrades/Skins/Sigils/ScarSigil"
|
||||
],
|
||||
sub: "/Lotus/Language/G1Quests/SecondDreamFinishInboxTitle",
|
||||
icon: "/Lotus/Interface/Icons/Npcs/Ordis.png",
|
||||
highPriority: true
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
||||
const questCompletionItems = getQuestCompletionItems(questKey);
|
||||
logger.debug(`quest completion items`, questCompletionItems);
|
||||
if (questCompletionItems) {
|
||||
|
@ -10,7 +10,6 @@ export interface IGuildClient {
|
||||
LongMOTD?: ILongMOTD;
|
||||
Members: IGuildMemberClient[];
|
||||
Ranks: IGuildRank[];
|
||||
TradeTax: number;
|
||||
Tier: number;
|
||||
Vault: IGuildVault;
|
||||
ActiveDojoColorResearch: string;
|
||||
@ -143,6 +142,7 @@ export interface IDojoClient {
|
||||
_id: IOid; // ID of the guild
|
||||
Name: string;
|
||||
Tier: number;
|
||||
TradeTax?: number;
|
||||
FixedContributions: boolean;
|
||||
DojoRevision: number;
|
||||
AllianceId?: IOid;
|
||||
@ -155,6 +155,8 @@ export interface IDojoClient {
|
||||
ContentURL?: string;
|
||||
GuildEmblem?: boolean;
|
||||
DojoComponents: IDojoComponentClient[];
|
||||
NumContributors?: number;
|
||||
CeremonyResetDate?: IMongoDate;
|
||||
}
|
||||
|
||||
export interface IDojoComponentClient {
|
||||
|
@ -49,9 +49,6 @@ export type IMissionInventoryUpdateRequest = {
|
||||
rewardsMultiplier?: number;
|
||||
GoalTag: string;
|
||||
LevelKeyName: string;
|
||||
KeyOwner?: string;
|
||||
KeyRemovalHash?: string;
|
||||
KeyToRemove?: string;
|
||||
ActiveBoosters?: IBooster[];
|
||||
RawUpgrades?: IRawUpgrade[];
|
||||
FusionTreasures?: IFusionTreasure[];
|
||||
|
@ -5,5 +5,11 @@
|
||||
"ItemCount": 1
|
||||
}
|
||||
],
|
||||
"/Lotus/Types/Keys/InfestedMicroplanetQuest/InfestedMicroplanetQuestKeyChain": [{ "ItemType": "/Lotus/Types/Recipes/WarframeRecipes/BrokenFrameBlueprint", "ItemCount": 1 }]
|
||||
"/Lotus/Types/Keys/InfestedMicroplanetQuest/InfestedMicroplanetQuestKeyChain": [{ "ItemType": "/Lotus/Types/Recipes/WarframeRecipes/BrokenFrameBlueprint", "ItemCount": 1 }],
|
||||
"/Lotus/Types/Keys/OrokinMoonQuest/OrokinMoonQuestKeyChain": [
|
||||
{
|
||||
"ItemType": "/Lotus/Types/Keys/RailJackBuildQuest/RailjackBuildQuestEmailItem",
|
||||
"ItemCount": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ dict = {
|
||||
cheats_unlockArcanesEverywhere: `Arkana-Adapter überall`,
|
||||
cheats_noDailyStandingLimits: `Kein tägliches Ansehenslimit`,
|
||||
cheats_noArgonCrystalDecay: `Argon-Kristalle verschwinden niemals`,
|
||||
cheats_noMasteryRankUpCooldown: `[UNTRANSLATED] No Mastery Rank Up Cooldown`,
|
||||
cheats_noMasteryRankUpCooldown: `Keine Wartezeit beim Meisterschaftsrangaufstieg`,
|
||||
cheats_noVendorPurchaseLimits: `Keine Kaufbeschränkungen bei Händlern`,
|
||||
cheats_instantResourceExtractorDrones: `Sofortige Ressourcen-Extraktor-Drohnen`,
|
||||
cheats_noDojoRoomBuildStage: `Kein Dojo-Raum-Bauvorgang`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user