Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_XPHandlerComponent.c File Reference

Go to the source code of this file.

Data Structures

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
}
 

Functions

SCR_XPHandlerComponentClass SCR_BaseGameModeComponentClass Attribute ("{E6FC4537B53EA00B}Configs/Campaign/XPRewards.conf")
 
override void OnPlayerSpawned (int playerId, IEntity controlledEntity)
 
override void OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout)
 
override void OnPlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator killer)
 
override void OnControllableDestroyed (IEntity entity, IEntity killerEntity, notnull Instigator killer)
 
protected void OnCompartmentLeft (IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 
protected void OnStatPointsAdded (int playerId, SCR_EDataStats stat, float amount, bool temp)
 
void ProcessSuicide (int playerId)
 
protected void AwardTransportXP (int playerId)
 
protected 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)
 
int GetXPRewardAmount (SCR_EXPRewards reward)
 
float GetXPMultiplier ()
 
string GetXPRewardName (SCR_EXPRewards reward)
 
bool AllowNotification (SCR_EXPRewards reward)
 
override void OnPostInit (IEntity owner)
 Called on PostInit when all components are added. More...
 

Variables

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

Enumeration Type Documentation

◆ SCR_EXPRewards

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 

Definition at line 403 of file SCR_XPHandlerComponent.c.

Function Documentation

◆ AllowNotification()

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

Definition at line 356 of file SCR_XPHandlerComponent.c.

◆ Attribute()

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

Definition at line 7 of file SCR_XPHandlerComponent.c.

◆ AwardTransportXP()

protected void AwardTransportXP ( int  playerId)

Definition at line 222 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 
)

Add XP to given playerId

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

Definition at line 254 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 
)

Add XP to given controller

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

Definition at line 272 of file SCR_XPHandlerComponent.c.

◆ GetXPMultiplier()

float GetXPMultiplier ( )

Returns XP reward amount

Returns

Definition at line 330 of file SCR_XPHandlerComponent.c.

◆ GetXPRewardAmount()

int GetXPRewardAmount ( SCR_EXPRewards  reward)

Returns XP reward amount

Parameters
[in]reward
Returns

Definition at line 314 of file SCR_XPHandlerComponent.c.

◆ GetXPRewardName()

string GetXPRewardName ( SCR_EXPRewards  reward)

Returns XP reward name

Parameters
[in]reward
Returns
XP reward name

Definition at line 339 of file SCR_XPHandlerComponent.c.

◆ IsProxy()

protected bool IsProxy ( )

Definition at line 240 of file SCR_XPHandlerComponent.c.

◆ OnControllableDestroyed()

override void OnControllableDestroyed ( IEntity  entity,
IEntity  killerEntity,
notnull Instigator  killer 
)

When a controllable entity is destroyed, this event is raised. Entity is destroyed when DamageManager.OnStateChanged -> EDamageState.Destroyed

Parameters
[in]entityDestroyed entity that raised this event
[in]killerEntityInstigator entity that destroyed our victim
[in]killerInstigator of the kill

Definition at line 94 of file SCR_XPHandlerComponent.c.

◆ OnStatPointsAdded()

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

Definition at line 150 of file SCR_XPHandlerComponent.c.

◆ ProcessSuicide()

void ProcessSuicide ( int  playerId)
Parameters
[in]playerId

Definition at line 182 of file SCR_XPHandlerComponent.c.

◆ VeterancyAward()

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

Definition at line 305 of file SCR_XPHandlerComponent.c.

Variable Documentation

◆ m_fXpMultiplier

protected float m_fXpMultiplier = 1

Definition at line 29 of file SCR_XPHandlerComponent.c.

◆ m_mPlayerTransportPoints

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

Definition at line 27 of file SCR_XPHandlerComponent.c.