add allDailyAffiliationKeys
This commit is contained in:
parent
d8845bc478
commit
42bcab790e
@ -15,6 +15,7 @@ import {
|
||||
ExportVirtuals
|
||||
} from "warframe-public-export-plus";
|
||||
import { handleSubsumeCompletion } from "./infestedFoundryController";
|
||||
import { allDailyAffiliationKeys } from "@/src/services/inventoryService";
|
||||
|
||||
export const inventoryController: RequestHandler = async (request, response) => {
|
||||
const account = await getAccountForRequest(request);
|
||||
@ -32,20 +33,9 @@ export const inventoryController: RequestHandler = async (request, response) =>
|
||||
account.LastLoginDay = today;
|
||||
await account.save();
|
||||
|
||||
inventory.DailyAffiliation = 16000 + inventory.PlayerLevel * 500;
|
||||
inventory.DailyAffiliationPvp = 16000 + inventory.PlayerLevel * 500;
|
||||
inventory.DailyAffiliationLibrary = 16000 + inventory.PlayerLevel * 500;
|
||||
inventory.DailyAffiliationCetus = 16000 + inventory.PlayerLevel * 500;
|
||||
inventory.DailyAffiliationQuills = 16000 + inventory.PlayerLevel * 500;
|
||||
inventory.DailyAffiliationSolaris = 16000 + inventory.PlayerLevel * 500;
|
||||
inventory.DailyAffiliationVentkids = 16000 + inventory.PlayerLevel * 500;
|
||||
inventory.DailyAffiliationVox = 16000 + inventory.PlayerLevel * 500;
|
||||
inventory.DailyAffiliationEntrati = 16000 + inventory.PlayerLevel * 500;
|
||||
inventory.DailyAffiliationNecraloid = 16000 + inventory.PlayerLevel * 500;
|
||||
inventory.DailyAffiliationZariman = 16000 + inventory.PlayerLevel * 500;
|
||||
inventory.DailyAffiliationKahl = 16000 + inventory.PlayerLevel * 500;
|
||||
inventory.DailyAffiliationCavia = 16000 + inventory.PlayerLevel * 500;
|
||||
inventory.DailyAffiliationHex = 16000 + inventory.PlayerLevel * 500;
|
||||
for (const key of allDailyAffiliationKeys) {
|
||||
inventory[key] = 16000 + inventory.PlayerLevel * 500;
|
||||
}
|
||||
inventory.DailyFocus = 250000 + inventory.PlayerLevel * 5000;
|
||||
await inventory.save();
|
||||
}
|
||||
|
@ -514,6 +514,10 @@ const standingLimitBinToInventoryKey: Record<
|
||||
STANDING_LIMIT_BIN_HEX: "DailyAffiliationHex"
|
||||
};
|
||||
|
||||
export const allDailyAffiliationKeys: (keyof IDailyAffiliations)[] = Object.entries(standingLimitBinToInventoryKey).map(
|
||||
arr => arr[1]
|
||||
);
|
||||
|
||||
export const getStandingLimit = (inventory: IDailyAffiliations, bin: TStandingLimitBin): number => {
|
||||
if (bin == "STANDING_LIMIT_BIN_NONE") {
|
||||
return Number.MAX_SAFE_INTEGER;
|
||||
|
Loading…
x
Reference in New Issue
Block a user