import { HealthHelper } from "https://deno.land/x/sptaki@1.2.0/helpers/HealthHelper.d.ts";
Constructors
new
HealthHelper(jsonUtil: JsonUtil,
logger: ILogger,
timeUtil: TimeUtil,
saveServer: SaveServer,
configServer: ConfigServer,
Properties
protected
configServer: ConfigServerprotected
healthConfig: IHealthConfigprotected
jsonUtil: JsonUtilprotected
logger: ILoggerprotected
saveServer: SaveServerprotected
timeUtil: TimeUtilMethods
protected
addEffect(): voidAdd effect to body part in profile
protected
isEmpty(map: Record<string, { Time: number; }>): booleanprotected
saveEffects(): voidSave effects to profile Works by removing all effects and adding them back from profile Removes empty 'Effects' objects if found
protected
saveHealth(pmcData: IPmcData, sessionID: string): voidAdjust hydration/energy/temperate and body part hp values in player profile to values in profile.vitality
resetVitality(sessionID: string): IAkiProfile
Resets the profiles vitality/health and vitality/effects properties to their defaults
saveVitality(): void
pmcData: IPmcData,
request: ISyncHealthRequestData,
sessionID: string,
addEffects?: boolean,
deleteExistingEffects?: boolean,
Update player profile with changes from request object