//============================================================================= // KFSeasonalEventStats //============================================================================= // Tracks event-specific challenges/accomplishments //============================================================================= // Killing Floor 2 // Copyright (C) 2018 Tripwire Interactive LLC //============================================================================= class KFSeasonalEventStats extends Object within KFOnlineStatsWrite native abstract; var protected int bObjectiveIsValidForMap[5]; /***************************************************************************************************** * @name Native ****************************************************************************************************/ // whether this seasonal stats object is the stats object that is being tracked right now final native function bool IsValid(); final protected native function IncrementSeasonalEventStat(int StatIdx, int Inc); final protected native function ResetSeasonalEventStat(int StatIdx); final protected native function SetSeasonalEventStatsMax(int StatMax1, int StatMax2, int StatMax3, int StatMax4, int StatMax5); final protected native function GrantEventItem(int ItemId); /***************************************************************************************************** * @name Script ****************************************************************************************************/ private event Initialize(string MapName); static private event bool AllowEventBossOverrideForMap(string MapName); private event GrantEventItems(); simulated event OnStatsInitialized() { } final protected simulated function FinishedObjective(int EventIndex, int ObjectiveIndex) { local KFPlayerController KFPC; local int year, month, dayofweek, day, hour, minute, second, msec; if (!IsValid()) { return; } KFPC = Outer.MyKFPC; if (KFPC.WorldInfo.NetMode != NM_DedicatedServer && KFPC.IsLocalPlayerController() && !KFPC.PlayerReplicationInfo.bOnlySpectator && !Outer.HasCheated() && !Outer.IsEventObjectiveComplete(ObjectiveIndex)) { GetSystemTime(year, month, dayofweek, day, hour, minute, second, msec); Outer.UpdateSpecialEvent(EventIndex, ObjectiveIndex, year, month); if (KFPC.MyGFxHUD != none && KFPC.MyGFxHUD.LevelUpNotificationWidget != none && ((class'KFGameEngine'.static.GetSeasonalEventID() % 10) == EventIndex)) { KFPC.MyGFxHUD.LevelUpNotificationWidget.FinishedSpecialEvent(EventIndex, ObjectiveIndex); } if (KFPC.MyGFxManager != none && KFPC.MyGFxManager.StartMenu != none && KFPC.MyGFxManager.StartMenu.MissionObjectiveContainer != none) { KFPC.MyGFxManager.StartMenu.MissionObjectiveContainer.Refresh(); } } } simulated function OnMapObjectiveDeactivated(Actor ObjectiveInterfaceActor); simulated function OnZedKilled(class MonsterClass, int Difficulty, class DT, bool bKiller); simulated function OnZedKilledByHeadshot(class MonsterClass, int Difficulty, class DT); simulated function OnMapCollectibleFound(PlayerReplicationInfo FinderPRI, int CollectibleID); simulated event OnGameWon(class GameClass, int Difficulty, int GameLength, bool bCoOp); simulated event OnGameEnd(class GameClass); simulated function OnBossDied(); simulated event OnWaveCompleted(class GameClass, int Difficulty, int WaveNum); simulated event OnTriggerUsed(class TriggerClass); simulated event OnTryCompleteObjective(int ObjectiveIndex, int EventIndex); simulated function OnHitTaken(); simulated function OnHitGiven(class DT); simulated function OnWeaponPurchased(class WeaponDef, int Price); simulated function OnAfflictionCaused(EAfflictionType Type); simulated function OnCollectibleFound(int Limit);