Valens-Progression/types/routers/EventOutputHolder.d.ts

42 lines
1.9 KiB
TypeScript
Raw Permalink Normal View History

2022-12-25 18:45:30 -05:00
import { ProfileHelper } from "../helpers/ProfileHelper";
2023-02-12 23:21:22 -05:00
import { IPmcData } from "../models/eft/common/IPmcData";
import { IHideoutImprovement, Productive } from "../models/eft/common/tables/IBotBase";
2022-12-25 18:45:30 -05:00
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
2023-02-12 23:21:22 -05:00
import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
2022-12-25 18:45:30 -05:00
export declare class EventOutputHolder {
protected jsonUtil: JsonUtil;
protected profileHelper: ProfileHelper;
2023-02-12 23:21:22 -05:00
protected timeUtil: TimeUtil;
/** What has client been informed of this game session */
protected clientActiveSessionStorage: Record<string, {
clientInformed: boolean;
}>;
constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil);
2022-12-25 18:45:30 -05:00
protected output: IItemEventRouterResponse;
getOutput(sessionID: string): IItemEventRouterResponse;
2023-02-12 23:21:22 -05:00
/**
* Reset the response object to a default state
* Occurs prior to event being handled by server
* @param sessionID Players id
*/
2022-12-25 18:45:30 -05:00
resetOutput(sessionID: string): void;
2023-02-12 23:21:22 -05:00
/**
* Update output object with most recent values from player profile
* @param sessionId Session id
*/
updateOutputProperties(sessionId: string): void;
/**
* Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true
* @param pmcData Player profile
* @returns dictionary of hideout improvements
*/
protected getImprovementsFromProfileAndFlagComplete(pmcData: IPmcData): Record<string, IHideoutImprovement>;
/**
* Return productions from player profile except those completed crafts the client has already seen
* @param pmcData Player profile
* @returns dictionary of hideout productions
*/
protected getProductionsFromProfileAndFlagComplete(productions: Record<string, Productive>): Record<string, Productive>;
2022-12-25 18:45:30 -05:00
}