1
0
KF2-Dev-Scripts/KFGame/Classes/KFSeasonalEventStats.uc

83 lines
3.8 KiB
Ucode
Raw Normal View History

2020-12-13 15:01:13 +00:00
//=============================================================================
// 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);
2022-11-27 21:49:25 +00:00
final protected native function ResetSeasonalEventStat(int StatIdx);
2020-12-13 15:01:13 +00:00
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();
2022-11-27 21:49:25 +00:00
simulated event OnStatsInitialized()
{
}
2020-12-13 15:01:13 +00:00
final protected simulated function FinishedObjective(int EventIndex, int ObjectiveIndex)
{
local KFPlayerController KFPC;
2020-12-13 15:09:05 +00:00
local int year, month, dayofweek, day, hour, minute, second, msec;
2020-12-13 15:01:13 +00:00
if (!IsValid())
{
return;
}
KFPC = Outer.MyKFPC;
if (KFPC.WorldInfo.NetMode != NM_DedicatedServer && KFPC.IsLocalPlayerController() &&
!KFPC.PlayerReplicationInfo.bOnlySpectator && !Outer.HasCheated() &&
!Outer.IsEventObjectiveComplete(ObjectiveIndex))
{
2020-12-13 15:09:05 +00:00
GetSystemTime(year, month, dayofweek, day, hour, minute, second, msec);
Outer.UpdateSpecialEvent(EventIndex, ObjectiveIndex, year, month);
2020-12-13 15:01:13 +00:00
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<KFPawn_Monster> MonsterClass, int Difficulty, class<DamageType> DT);
simulated function OnZedKilledByHeadshot(class<KFPawn_Monster> MonsterClass, int Difficulty, class<DamageType> DT);
simulated function OnMapCollectibleFound(PlayerReplicationInfo FinderPRI, int CollectibleID);
simulated event OnGameWon(class<GameInfo> GameClass, int Difficulty, int GameLength, bool bCoOp);
simulated event OnGameEnd(class<GameInfo> GameClass);
simulated function OnBossDied();
simulated event OnWaveCompleted(class<GameInfo> GameClass, int Difficulty, int WaveNum);
simulated event OnTriggerUsed(class<Trigger_PawnsOnly> TriggerClass);
2021-03-02 11:56:51 +00:00
simulated event OnTryCompleteObjective(int ObjectiveIndex, int EventIndex);
2021-06-02 20:06:18 +00:00
simulated function OnHitTaken();
2021-11-16 17:03:42 +00:00
simulated function OnHitGiven(class<DamageType> DT);
simulated function OnWeaponPurchased(class<KFWeaponDefinition> WeaponDef, int Price);
2022-11-27 21:49:25 +00:00
simulated function OnAfflictionCaused(EAfflictionType Type);