DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ AddSpecialty()

void SoftSkillsManager::AddSpecialty ( float specialty_weight)
inlineprotected

См. определение в файле SoftSkillsManager.c строка 116

117 {
118 if( GetSoftSkillsState() )
119 {
120 if( !IsCoolDown() )
121 {
122 if( specialty_weight < 0 )
123 {
124 if( IsLinear() )
125 {
126 SetSpecialtyLevel( AddLinearPrecise( specialty_weight ) );
127 }
128 else
129 {
130 SetSpecialtyLevel( AddExponentialPrecise( specialty_weight ) );
131 }
132
133 m_Player.GetStatSpecialty().Set( m_SpecialtyLevel );
134 StartCoolDownTimer( Math.AbsFloat( ( specialty_weight * 100 ) ) * COOLDOWN_TIMER );
136 }
137 else if( specialty_weight > 0 )
138 {
139 if( IsLinear() )
140 {
141 SetSpecialtyLevel( AddLinearRough( specialty_weight ) );
142 }
143 else
144 {
145 SetSpecialtyLevel( AddExponentialRough( specialty_weight ) );
146 }
147
148 m_Player.GetStatSpecialty().Set( m_SpecialtyLevel );
149 StartCoolDownTimer( Math.AbsFloat( ( specialty_weight * 100 ) ) * COOLDOWN_TIMER );
151 }
152 else
153 {
154 //if the specialty weight for a recipe or UA is set to 0, it will increase neither specialty, nor UA counter
155 return;
156 }
157 }
158 else
159 {
160 StartCoolDownTimer( Math.AbsFloat( ( specialty_weight * 100 ) ) * COOLDOWN_TIMER );
161 }
162 }
163 }
void SynchSpecialtyLevel()
Определения SoftSkillsManager.c:302
const float COOLDOWN_TIMER
Определения SoftSkillsManager.c:17
PlayerBase m_Player
Определения SoftSkillsManager.c:3
bool GetSoftSkillsState()
Определения SoftSkillsManager.c:317
float AddLinearRough(float specialty_weight)
Определения SoftSkillsManager.c:64
float m_SpecialtyLevel
Определения SoftSkillsManager.c:4
float AddExponentialPrecise(float specialty_weight)
Определения SoftSkillsManager.c:74
float AddLinearPrecise(float specialty_weight)
Определения SoftSkillsManager.c:54
bool IsLinear()
Определения SoftSkillsManager.c:329
float AddExponentialRough(float specialty_weight)
Определения SoftSkillsManager.c:95
bool IsCoolDown()
Определения SoftSkillsManager.c:363
void StartCoolDownTimer(float cooldown_value)
Определения SoftSkillsManager.c:355
void SetSpecialtyLevel(float specialty_level)
Определения SoftSkillsManager.c:290

Перекрестные ссылки Math::AbsFloat(), AddExponentialPrecise(), AddExponentialRough(), AddLinearPrecise(), AddLinearRough(), COOLDOWN_TIMER, GetSoftSkillsState(), IsCoolDown(), IsLinear(), m_Player, m_SpecialtyLevel, SetSpecialtyLevel(), StartCoolDownTimer() и SynchSpecialtyLevel().