418d9f2a8f
- Ability to use @spt-aki path alias on the whole project. - Swapped all imports from relative paths, for imports using the path alias. Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/157 Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com> Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
41 lines
1.6 KiB
TypeScript
41 lines
1.6 KiB
TypeScript
import { inject, injectable } from "tsyringe";
|
|
|
|
import { RepairController } from "@spt-aki/controllers/RepairController";
|
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
|
import { IRepairActionDataRequest } from "@spt-aki/models/eft/repair/IRepairActionDataRequest";
|
|
import { ITraderRepairActionDataRequest } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest";
|
|
|
|
@injectable()
|
|
export class RepairCallbacks
|
|
{
|
|
constructor(
|
|
@inject("RepairController") protected repairController: RepairController)
|
|
{ }
|
|
|
|
/**
|
|
* Handle TraderRepair event
|
|
* use trader to repair item
|
|
* @param pmcData Player profile
|
|
* @param traderRepairRequest Request object
|
|
* @param sessionID Session id
|
|
* @returns IItemEventRouterResponse
|
|
*/
|
|
public traderRepair(pmcData: IPmcData, traderRepairRequest: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse
|
|
{
|
|
return this.repairController.traderRepair(sessionID, traderRepairRequest, pmcData);
|
|
}
|
|
|
|
/**
|
|
* Handle Repair event
|
|
* Use repair kit to repair item
|
|
* @param pmcData Player profile
|
|
* @param repairRequest Request object
|
|
* @param sessionID Session id
|
|
* @returns IItemEventRouterResponse
|
|
*/
|
|
public repair(pmcData: IPmcData, repairRequest: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse
|
|
{
|
|
return this.repairController.repairWithKit(sessionID, repairRequest, pmcData);
|
|
}
|
|
} |