DayZ Enforce
Script API
Private Member Functions | Private Attributes | List of all members
ModuleExperience Class Reference

#include <ModuleExperience.h>

Inheritance diagram for ModuleExperience:
ModuleBase

Private Member Functions

void  ModuleExperience ()
 
void  ~ModuleExperience ()
 
void  LoadFromCfg ()
 
void  Store (PlayerBase player, int exp_id, int exp_value)
 
int  GetExperienceCategory (int exp_id)
 
void  DoAntiGrindDecrease (PlayerBase player, int current_category, float increase_value)
 
float  GetAntiGrindDecrease (int category1, int category2)
 
int  GetExpTypeByName (string exp_name)
 
float  GetExpPoints (PlayerBase player, int exp_id)
  Returns exp points for that skill. More...
 
float  Increase (PlayerBase player, int exp_id, float increase_value=1)
  Increases experience for the given skill by +1. More...
 
float  Decrease (PlayerBase player, int exp_id, float decrease_value=1)
 
int  GetLevel (float exp_value, int exp_id)
  Converts experience value into levels for the given skill. More...
 
float  GetExpParamNumber (PlayerBase player, int exp_type, string param)
 
string  GetExpParamString (PlayerBase player, int exp_type, string param)
 
float  GetTimeToCompleteEfficiency (PlayerBase player, int action_type)
 
float  GetQuantityEfficiency (PlayerBase player, int action_type)
 

Private Attributes

const int  EXP_CATEGORY_MEDIC = 100
 
const int  EXP_MEDIC_BANDAGING = 101
 
const int  EXP_MEDIC_FIXATING = 102
 
const int  EXP_MEDIC_TRANSFUSION_TEST = 103
 
const int  EXP_MEDIC_TRANSFUSION_COLLECT = 104
 
const int  EXP_MEDIC_TRANSFUSION_GIVE = 105
 
const int  EXP_MEDIC_SALINE_GIVE = 106
 
const int  EXP_CATEGORY_HUNTER = 200
 
const int  EXP_HUNTER_SKINNING = 201
 
const int  EXP_CATEGORY_TAILOR = 300
 
const int  EXP_TAILOR_REPAIRING = 301
 
const int  EXP_CATEGORY_COOK = 400
 
const int  EXP_CATEGORY_MECHANIC = 500
 
const int  EXP_CATEGORY_FARMER = 600
 
const int  EXP_FARMER_SOIL_PREPARATION = 601
 
const int  EXP_FARMER_FERTILIZATION = 602
 
const int  EXP_FARMER_HARVESTING = 603
 
const int  EXP_CATEGORY_BUILDER = 700
 
float  m_AntiGrind0 [7]
 
float  m_AntiGrind1 [7]
 
float  m_AntiGrind2 [7]
 
float  m_AntiGrind3 [7]
 
float  m_AntiGrind4 [7]
 
float  m_AntiGrind5 [7]
 
float  m_AntiGrind6 [7]
 
autoptr map< int, string >  m_ExpAccessName
 
autoptr map< int, Experience m_Experiences
 

Constructor & Destructor Documentation

void ModuleExperience::ModuleExperience ( )
private
void ModuleExperience::~ModuleExperience ( )
private

Member Function Documentation

void ModuleExperience::LoadFromCfg ( )
private
void ModuleExperience::Store ( PlayerBase  player,
int  exp_id,
int  exp_value 
)
private
int ModuleExperience::GetExperienceCategory ( int  exp_id )
private

Referenced by GetExpPoints(), Increase(), and Store().

void ModuleExperience::DoAntiGrindDecrease ( PlayerBase  player,
int  current_category,
float  increase_value 
)
private
float ModuleExperience::GetAntiGrindDecrease ( int  category1,
int  category2 
)
private
int ModuleExperience::GetExpTypeByName ( string  exp_name )
private

References m_ExpAccessName.

Referenced by LoadFromCfg().

float ModuleExperience::GetExpPoints ( PlayerBase  player,
int  exp_id 
)
private

Returns exp points for that skill.

Parameters
player User's character.
exp_id Experience ID (specific constant)
Returns
int Number of skill points for that experience type
ModuleExperience module_exp = (ModuleExperience)GetModule(Type("ModuleExperience"));
int exp_value = module_exp.GetExpPoints(module_exp.EXP_HUNTER_SKINNING);
Print(exp_value);
>> exp_value = 0

References GetExperienceCategory(), PlayerBase::GetSkill(), and Store().

Referenced by Decrease(), GetExpParamNumber(), GetExpParamString(), Increase(), and ModuleSkinning::SkinComplete().

float ModuleExperience::Increase ( PlayerBase  player,
int  exp_id,
float  increase_value = 1 
)
private

Increases experience for the given skill by +1.

Parameters
player User's character.
exp_id Experience ID (specific constant)
Returns
Increased experience value
ModuleExperience module_exp = (ModuleExperience)GetModule(Type("ModuleExperience"));
module_exp.Increase(player, module_exp.EXP_HUNTER_SKINNING);

References DoAntiGrindDecrease(), GetExperienceCategory(), GetExpPoints(), and Store().

Referenced by PlayerBase::IncreaseSkill(), ModuleRepairing::Repair(), and ModuleSkinning::SkinComplete().

float ModuleExperience::Decrease ( PlayerBase  player,
int  exp_id,
float  decrease_value = 1 
)
private

References GetExpPoints(), and Store().

Referenced by DoAntiGrindDecrease().

int ModuleExperience::GetLevel ( float  exp_value,
int  exp_id 
)
private

Converts experience value into levels for the given skill.

Parameters
player User's character.
exp_id Experience ID (specific constant)
Returns
Increased experience value
ModuleExperience module_exp = (ModuleExperience)GetModule(Type("ModuleExperience"));
module_exp.Increase(player, module_exp.EXP_HUNTER_SKINNING);

References CGame::ConfigGetChildName(), CGame::ConfigGetType(), g_Game, GetGame(), itoa(), m_ExpAccessName, and String().

Referenced by GetExpParamNumber(), GetExpParamString(), and ModuleSkinning::SkinComplete().

float ModuleExperience::GetExpParamNumber ( PlayerBase  player,
int  exp_type,
string  param 
)
private
string ModuleExperience::GetExpParamString ( PlayerBase  player,
int  exp_type,
string  param 
)
private
float ModuleExperience::GetTimeToCompleteEfficiency ( PlayerBase  player,
int  action_type 
)
private
float ModuleExperience::GetQuantityEfficiency ( PlayerBase  player,
int  action_type 
)
private

Member Data Documentation

const int ModuleExperience::EXP_CATEGORY_MEDIC = 100
private
const int ModuleExperience::EXP_MEDIC_BANDAGING = 101
private
const int ModuleExperience::EXP_MEDIC_FIXATING = 102
private
const int ModuleExperience::EXP_MEDIC_TRANSFUSION_TEST = 103
private
const int ModuleExperience::EXP_MEDIC_TRANSFUSION_COLLECT = 104
private
const int ModuleExperience::EXP_MEDIC_TRANSFUSION_GIVE = 105
private
const int ModuleExperience::EXP_MEDIC_SALINE_GIVE = 106
private
const int ModuleExperience::EXP_CATEGORY_HUNTER = 200
private
const int ModuleExperience::EXP_HUNTER_SKINNING = 201
private
const int ModuleExperience::EXP_CATEGORY_TAILOR = 300
private
const int ModuleExperience::EXP_TAILOR_REPAIRING = 301
private
const int ModuleExperience::EXP_CATEGORY_COOK = 400
private
const int ModuleExperience::EXP_CATEGORY_MECHANIC = 500
private
const int ModuleExperience::EXP_CATEGORY_FARMER = 600
private
const int ModuleExperience::EXP_FARMER_SOIL_PREPARATION = 601
private
const int ModuleExperience::EXP_FARMER_FERTILIZATION = 602
private
const int ModuleExperience::EXP_FARMER_HARVESTING = 603
private
const int ModuleExperience::EXP_CATEGORY_BUILDER = 700
private
float ModuleExperience::m_AntiGrind0[7]
private
float ModuleExperience::m_AntiGrind1[7]
private
float ModuleExperience::m_AntiGrind2[7]
private
float ModuleExperience::m_AntiGrind3[7]
private
float ModuleExperience::m_AntiGrind4[7]
private
float ModuleExperience::m_AntiGrind5[7]
private
float ModuleExperience::m_AntiGrind6[7]
private
autoptr map<int, string> ModuleExperience::m_ExpAccessName
private
autoptr map<int, Experience> ModuleExperience::m_Experiences
private

The documentation for this class was generated from the following files:
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)