Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_XPHandlerComponent.c File Reference

Go to the source code of this file.

Classes

class  SCR_XPHandlerComponentClass

Enumerations

enum  SCR_EXPRewards {
  UNDEFINED , CHEAT , ENEMY_KILL , ENEMY_KILL_VEH ,
  FRIENDLY_KILL , RELAY_DISCOVERED , RELAY_RECONFIGURED , BASE_SEIZED ,
  BASE_DEFENDED , SUPPLIES_DELIVERED , SUPPORT_EVAC , SUPPORT_FUEL ,
  TASK_DEFEND , TASK_TRANSPORT , SERVICE_BUILD , SUICIDE ,
  VETERANCY , SPAWN_PROVIDER , FREE_ROAM_BUILDING_BUILT , CUSTOM_1 ,
  CUSTOM_2 , CUSTOM_3 , CUSTOM_4 , CUSTOM_5 ,
  CUSTOM_6 , CUSTOM_7 , CUSTOM_8 , CUSTOM_9 ,
  CUSTOM_10 , CUSTOM_11 , CUSTOM_12 , CUSTOM_13 ,
  CUSTOM_14 , CUSTOM_15 , CUSTOM_16 , CUSTOM_17 ,
  CUSTOM_18 , CUSTOM_19 , CUSTOM_20 , VALUABLE_INTEL_HANDIN_SMALL ,
  VALUABLE_INTEL_HANDIN_MEDIUM , VALUABLE_INTEL_HANDIN_LARGE , KILLING_WHILE_DISGUISED , WARCRIME ,
  SUPPORT_REPAIR_VEHICLE , MEDICAL_ASSISTANCE , ENEMY_COMMANDER_KILL , ENEMY_VEHICLE_DESTRUCTION ,
  SURVIVAL , GROUP_COHESION , REARM_TASK_COMPLETED , ATTACK_TASK_COMPLETED ,
  ATTACK_TASK_FAILED , REPAIR_TASK_COMPLETED , REINFORCE_TASK_COMPLETED , ESTABLISH_BASE_COMPLETED ,
  DISMANTLE_BASE_COMPLETED , SEIZE_TASK_COMPLETED , COMMANDER_TASK_COMPLETED , RECON_TASK_COMPLETED ,
  HOLD_TASK_COMPLETED , FIRE_SUPPORT_TASK_COMPLETED , PICKUP_TASK_COMPLETED , CLEAR_TASK_COMPLETED ,
  STARTING_RANK
}

Functions

SCR_XPHandlerComponentClass SCR_BaseGameModeComponentClass Attribute ("{E6FC4537B53EA00B}Configs/Campaign/XPRewards.conf")
int GetSurvivalRewardCooldown ()
int GetSurvivalScaleMaxCycleAmount ()
int GetSeizeBaseProgressionRewardTimer ()
int GetSeizeBaseProgressionXP (string baseFactionKey)
override void OnPlayerSpawnFinalize_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity)
override void OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout)
override void OnPlayerKilled (notnull SCR_InstigatorContextData instigatorContextData)
override void OnControllableDestroyed (notnull SCR_InstigatorContextData instigatorContextData)
void OnVehicleDestroyed (notnull SCR_InstigatorContextData instigatorContextData)
void OnCharacterKilled (notnull SCR_InstigatorContextData instigatorContextData)
void OnCompartmentLeft (IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
void OnStatPointsAdded (int playerId, SCR_EDataStats stat, float amount, bool temp)
void OnDrivingStatPointsAdded (int playerId, float amount)
void OnHealingStatPointsAdded (int playerId)
bool IsHealingFriendlyStatPoint (SCR_EDataStats stat)
void OnSupportStationExecuted (SCR_BaseSupportStationComponent supportStation, ESupportStationType supportStationType, IEntity actionTarget, IEntity actionUser, SCR_BaseUseSupportStationAction action)
void OnVehicleRepaired (SCR_BaseSupportStationComponent supportStation, ESupportStationType supportStationType, IEntity actionTarget, IEntity actionUser, SCR_BaseUseSupportStationAction action)
void OnCharacterHealed (SCR_BaseSupportStationComponent supportStation, ESupportStationType supportStationType, IEntity actionTarget, IEntity actionUser, SCR_BaseUseSupportStationAction action)
void OnBaseSeized (SCR_CampaignMilitaryBaseComponent baseComponent)
void OnBaseAttackStarted (notnull SCR_CampaignMilitaryBaseComponent base, Faction defendingFaction, Faction attackingFaction)
void OnBaseAttackEnded (notnull SCR_CampaignMilitaryBaseComponent base)
void EvaluateAllAttackedBasesAttackers ()
void EvaluateBaseAttackers (SCR_CampaignMilitaryBaseComponent base)
void ProcessSuicide (int playerId)
void AwardTransportXP (int playerId)
bool IsProxy ()
void AwardXP (int playerId, SCR_EXPRewards rewardID, float multiplier=1.0, bool volunteer=false, int customXP=0)
void AwardXP (notnull PlayerController controller, SCR_EXPRewards rewardID, float multiplier=1.0, bool volunteer=false, int customXP=0)
void VeterancyAward (notnull PlayerController controller, float multiplier)
SCR_XPRewardInfo GetXpRewardInfo (SCR_EXPRewards reward)
int GetXPRewardAmount (SCR_EXPRewards reward)
float GetXPMultiplier ()
string GetXPRewardName (SCR_EXPRewards reward)
bool AllowNotification (SCR_EXPRewards reward)
override void EOnFrame (IEntity owner, float timeSlice)
override void OnPostInit (IEntity owner)
 Editable Mine.
void ~SCR_XPHandlerComponent ()

Variables

ref map< int, floatm_mPlayerTransportPoints = new map<int, float>()
ref array< SCR_CampaignMilitaryBaseComponentm_aBasesBeingSeized = {}
float m_fBaseSeizingCheckTimer
float m_fXpMultiplier = 1
const int BASE_SEIZING_CHECK_INTERVAL = 5
const int RELAY_SEIZING_RADIUS = 50

Enumeration Type Documentation

◆ SCR_EXPRewards

enum SCR_EXPRewards
protected
Enumerator
UNDEFINED 
CHEAT 
ENEMY_KILL 
ENEMY_KILL_VEH 
FRIENDLY_KILL 
RELAY_DISCOVERED 
RELAY_RECONFIGURED 
BASE_SEIZED 
BASE_DEFENDED 
SUPPLIES_DELIVERED 
SUPPORT_EVAC 
SUPPORT_FUEL 
TASK_DEFEND 
TASK_TRANSPORT 
SERVICE_BUILD 
SUICIDE 
VETERANCY 
SPAWN_PROVIDER 
FREE_ROAM_BUILDING_BUILT 
CUSTOM_1 
CUSTOM_2 
CUSTOM_3 
CUSTOM_4 
CUSTOM_5 
CUSTOM_6 
CUSTOM_7 
CUSTOM_8 
CUSTOM_9 
CUSTOM_10 
CUSTOM_11 
CUSTOM_12 
CUSTOM_13 
CUSTOM_14 
CUSTOM_15 
CUSTOM_16 
CUSTOM_17 
CUSTOM_18 
CUSTOM_19 
CUSTOM_20 
VALUABLE_INTEL_HANDIN_SMALL 
VALUABLE_INTEL_HANDIN_MEDIUM 
VALUABLE_INTEL_HANDIN_LARGE 
KILLING_WHILE_DISGUISED 
WARCRIME 
SUPPORT_REPAIR_VEHICLE 
MEDICAL_ASSISTANCE 
ENEMY_COMMANDER_KILL 
ENEMY_VEHICLE_DESTRUCTION 
SURVIVAL 
GROUP_COHESION 
REARM_TASK_COMPLETED 
ATTACK_TASK_COMPLETED 
ATTACK_TASK_FAILED 
REPAIR_TASK_COMPLETED 
REINFORCE_TASK_COMPLETED 
ESTABLISH_BASE_COMPLETED 
DISMANTLE_BASE_COMPLETED 
SEIZE_TASK_COMPLETED 
COMMANDER_TASK_COMPLETED 
RECON_TASK_COMPLETED 
HOLD_TASK_COMPLETED 
FIRE_SUPPORT_TASK_COMPLETED 
PICKUP_TASK_COMPLETED 
CLEAR_TASK_COMPLETED 
STARTING_RANK 

Definition at line 825 of file SCR_XPHandlerComponent.c.

Function Documentation

◆ AllowNotification()

bool AllowNotification ( SCR_EXPRewards reward)
protected
Parameters
[in]reward
Returns

Definition at line 738 of file SCR_XPHandlerComponent.c.

◆ Attribute()

SCR_XPHandlerComponentClass SCR_BaseGameModeComponentClass Attribute ( "{E6FC4537B53EA00B}Configs/Campaign/XPRewards.conf" )

Definition at line 1 of file SCR_XPHandlerComponent.c.

◆ AwardTransportXP()

void AwardTransportXP ( int playerId)
protected

Definition at line 592 of file SCR_XPHandlerComponent.c.

◆ AwardXP() [1/2]

void AwardXP ( int playerId,
SCR_EXPRewards rewardID,
float multiplier = 1.0,
bool volunteer = false,
int customXP = 0 )
protected

Add XP to given playerId

Parameters
[in]playerId
[in]rewardID
[in]multiplier
[in]volunteer
[in]customXP

Definition at line 624 of file SCR_XPHandlerComponent.c.

◆ AwardXP() [2/2]

void AwardXP ( notnull PlayerController controller,
SCR_EXPRewards rewardID,
float multiplier = 1.0,
bool volunteer = false,
int customXP = 0 )
protected

Add XP to given controller

Parameters
[in]controller
[in]rewardID
[in]multiplier
[in]volunteer
[in]customXP

Definition at line 642 of file SCR_XPHandlerComponent.c.

◆ EOnFrame()

override void EOnFrame ( IEntity owner,
float timeSlice )
protected

Returns XP reward skill

Parameters
[in]reward
Returns

Definition at line 769 of file SCR_XPHandlerComponent.c.

◆ EvaluateAllAttackedBasesAttackers()

void EvaluateAllAttackedBasesAttackers ( )
protected

Definition at line 505 of file SCR_XPHandlerComponent.c.

◆ EvaluateBaseAttackers()

void EvaluateBaseAttackers ( SCR_CampaignMilitaryBaseComponent base)
protected

Definition at line 514 of file SCR_XPHandlerComponent.c.

◆ GetSeizeBaseProgressionRewardTimer()

int GetSeizeBaseProgressionRewardTimer ( )
protected

Definition at line 71 of file SCR_XPHandlerComponent.c.

◆ GetSeizeBaseProgressionXP()

int GetSeizeBaseProgressionXP ( string baseFactionKey)
protected

Definition at line 81 of file SCR_XPHandlerComponent.c.

◆ GetSurvivalRewardCooldown()

int GetSurvivalRewardCooldown ( )
protected

Definition at line 59 of file SCR_XPHandlerComponent.c.

◆ GetSurvivalScaleMaxCycleAmount()

int GetSurvivalScaleMaxCycleAmount ( )
protected

Definition at line 65 of file SCR_XPHandlerComponent.c.

◆ GetXPMultiplier()

float GetXPMultiplier ( )
protected

Returns XP reward amount

Returns

Definition at line 712 of file SCR_XPHandlerComponent.c.

◆ GetXPRewardAmount()

int GetXPRewardAmount ( SCR_EXPRewards reward)
protected

Returns XP reward amount

Parameters
[in]reward
Returns

Definition at line 696 of file SCR_XPHandlerComponent.c.

◆ GetXpRewardInfo()

SCR_XPRewardInfo GetXpRewardInfo ( SCR_EXPRewards reward)
protected

Definition at line 681 of file SCR_XPHandlerComponent.c.

◆ GetXPRewardName()

string GetXPRewardName ( SCR_EXPRewards reward)
protected

Returns XP reward name

Parameters
[in]reward
Returns
XP reward name

Definition at line 721 of file SCR_XPHandlerComponent.c.

◆ IsHealingFriendlyStatPoint()

bool IsHealingFriendlyStatPoint ( SCR_EDataStats stat)
protected

Returns true if stat corresponds to healing of friendly characters by any medical item

Parameters
[in]stat

Definition at line 348 of file SCR_XPHandlerComponent.c.

◆ OnBaseAttackEnded()

void OnBaseAttackEnded ( notnull SCR_CampaignMilitaryBaseComponent base)
protected

Definition at line 477 of file SCR_XPHandlerComponent.c.

◆ OnBaseAttackStarted()

void OnBaseAttackStarted ( notnull SCR_CampaignMilitaryBaseComponent base,
Faction defendingFaction,
Faction attackingFaction )
protected

Definition at line 468 of file SCR_XPHandlerComponent.c.

◆ OnBaseSeized()

void OnBaseSeized ( SCR_CampaignMilitaryBaseComponent baseComponent)
protected

Definition at line 418 of file SCR_XPHandlerComponent.c.

◆ OnCharacterHealed()

void OnCharacterHealed ( SCR_BaseSupportStationComponent supportStation,
ESupportStationType supportStationType,
IEntity actionTarget,
IEntity actionUser,
SCR_BaseUseSupportStationAction action )
protected

Award XP when heal action is finished

Parameters
[in]supportStation
[in]supportStationType
[in]actionTarget
[in]actionUser
[in]action

Definition at line 402 of file SCR_XPHandlerComponent.c.

◆ OnCharacterKilled()

void OnCharacterKilled ( notnull SCR_InstigatorContextData instigatorContextData)
protected

Definition at line 231 of file SCR_XPHandlerComponent.c.

◆ OnControllableDestroyed()

override void OnControllableDestroyed ( notnull SCR_InstigatorContextData instigatorContextData)
protected

When a controllable entity is destroyed, this event is raised.

Parameters
[in]instigatorContextDataHolds the data of the victim and killer

Definition at line 163 of file SCR_XPHandlerComponent.c.

◆ OnDrivingStatPointsAdded()

void OnDrivingStatPointsAdded ( int playerId,
float amount )
protected

Definition at line 318 of file SCR_XPHandlerComponent.c.

◆ OnHealingStatPointsAdded()

void OnHealingStatPointsAdded ( int playerId)
protected

Definition at line 340 of file SCR_XPHandlerComponent.c.

◆ OnPlayerDisconnected()

override void OnPlayerDisconnected ( int playerId,
KickCauseCode cause,
int timeout )
protected

Called after a player is disconnected.

Parameters
[in]playerIdPlayerId of disconnected player.
[in]causeReason player disconnected
[in]timeoutTimeout for when players are allowed to connect again. -1 means Ban without an assigned timeout

What happens when a player disconnects.

Parameters
[in]playerIDis a unique player identifier that defines which player has disconnected.
[in]cause
[in]timeout

Definition at line 119 of file SCR_XPHandlerComponent.c.

◆ OnPlayerKilled()

override void OnPlayerKilled ( notnull SCR_InstigatorContextData instigatorContextData)
protected

Called after a player gets killed.

Parameters
[in]instigatorContextDataHolds the data of the victim and killer
[in]playerId
[in]playerEntity
[in]killerEntity
[in]killer

Definition at line 127 of file SCR_XPHandlerComponent.c.

◆ OnPlayerSpawnFinalize_S()

override void OnPlayerSpawnFinalize_S ( SCR_SpawnRequestComponent requestComponent,
SCR_SpawnHandlerComponent handlerComponent,
SCR_SpawnData data,
IEntity entity )
protected
Parameters
[in]requestComponent
[in]handlerComponent
[in]data
[in]entity

Definition at line 91 of file SCR_XPHandlerComponent.c.

◆ OnStatPointsAdded()

void OnStatPointsAdded ( int playerId,
SCR_EDataStats stat,
float amount,
bool temp )
protected

Definition at line 306 of file SCR_XPHandlerComponent.c.

◆ OnSupportStationExecuted()

void OnSupportStationExecuted ( SCR_BaseSupportStationComponent supportStation,
ESupportStationType supportStationType,
IEntity actionTarget,
IEntity actionUser,
SCR_BaseUseSupportStationAction action )
protected

Support station was executed

Parameters
[in]supportStation
[in]supportStationType
[in]actionTarget
[in]actionUser
[in]action

Definition at line 362 of file SCR_XPHandlerComponent.c.

◆ OnVehicleDestroyed()

void OnVehicleDestroyed ( notnull SCR_InstigatorContextData instigatorContextData)
protected

Definition at line 181 of file SCR_XPHandlerComponent.c.

◆ OnVehicleRepaired()

void OnVehicleRepaired ( SCR_BaseSupportStationComponent supportStation,
ESupportStationType supportStationType,
IEntity actionTarget,
IEntity actionUser,
SCR_BaseUseSupportStationAction action )
protected

Award XP when repair action is finished

Parameters
[in]supportStation
[in]supportStationType
[in]actionTarget
[in]actionUser
[in]action

Definition at line 380 of file SCR_XPHandlerComponent.c.

◆ ProcessSuicide()

void ProcessSuicide ( int playerId)
protected
Parameters
[in]playerId

Definition at line 555 of file SCR_XPHandlerComponent.c.

◆ VeterancyAward()

void VeterancyAward ( notnull PlayerController controller,
float multiplier )
protected
Parameters
[in]controller
[in]multiplier

Definition at line 675 of file SCR_XPHandlerComponent.c.

◆ ~SCR_XPHandlerComponent()

void ~SCR_XPHandlerComponent ( )
protected

Definition at line 810 of file SCR_XPHandlerComponent.c.

Variable Documentation

◆ BASE_SEIZING_CHECK_INTERVAL

const int BASE_SEIZING_CHECK_INTERVAL = 5
protected

Definition at line 48 of file SCR_XPHandlerComponent.c.

◆ m_aBasesBeingSeized

ref array<SCR_CampaignMilitaryBaseComponent> m_aBasesBeingSeized = {}
protected

Definition at line 43 of file SCR_XPHandlerComponent.c.

◆ m_fBaseSeizingCheckTimer

float m_fBaseSeizingCheckTimer
protected

Definition at line 44 of file SCR_XPHandlerComponent.c.

◆ m_fXpMultiplier

float m_fXpMultiplier = 1
protected

Definition at line 46 of file SCR_XPHandlerComponent.c.

◆ m_mPlayerTransportPoints

ref map<int, float> m_mPlayerTransportPoints = new map<int, float>()
protected

Definition at line 41 of file SCR_XPHandlerComponent.c.

◆ RELAY_SEIZING_RADIUS

const int RELAY_SEIZING_RADIUS = 50
protected

Definition at line 49 of file SCR_XPHandlerComponent.c.