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

◆ InitItemValues()

void CatchingContextFishingRodAction::InitItemValues ( EntityAI item)
inlineprotected

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

119 {
120 //skip ruined or deleted items entirely
121 if (item.IsRuined() || item.IsSetForDeletion())
122 return;
123
124 string path = "" + CFG_VEHICLESPATH + " " + item.GetType() + " Fishing";
125 if (GetGame().ConfigIsExisting(path))
126 {
127 if (GetGame().ConfigIsExisting(path + " resultQuantityBaseMod"))
128 m_QualityBaseMod += GetGame().ConfigGetFloat(path + " resultQuantityBaseMod");
129 if (GetGame().ConfigIsExisting(path + " resultQuantityDispersionMin"))
130 m_QualityDispersionMinMod += GetGame().ConfigGetFloat(path + " resultQuantityDispersionMin");
131 if (GetGame().ConfigIsExisting(path + " resultQuantityDispersionMax"))
132 m_QualityDispersionMaxMod += GetGame().ConfigGetFloat(path + " resultQuantityDispersionMax");
133 if (GetGame().ConfigIsExisting(path + " hookLossChanceMod"))
134 m_HookLossChanceMod += GetGame().ConfigGetFloat(path + " hookLossChanceMod");
135 if (GetGame().ConfigIsExisting(path + " baitLossChanceMod"))
136 m_BaitLossChanceMod += GetGame().ConfigGetFloat(path + " baitLossChanceMod");
137
138 if (GetGame().ConfigIsExisting(path + " signalDurationMin"))
139 {
140 if (m_SignalDurationMin == -1)
142 m_SignalDurationMin += GetGame().ConfigGetFloat(path + " signalDurationMin");
143 }
144 if (GetGame().ConfigIsExisting(path + " signalDurationMax"))
145 {
146 if (m_SignalDurationMax == -1)
148 m_SignalDurationMax += GetGame().ConfigGetFloat(path + " signalDurationMax");
149 }
150
151 if (GetGame().ConfigIsExisting(path + " signalCycleTargetAdjustment"))
152 m_SignalCycleTargetAdjustment += GetGame().ConfigGetFloat(path + " signalCycleTargetAdjustment");
153 if (GetGame().ConfigIsExisting(path + " signalCycleTargetEndAdjustment"))
154 m_SignalCycleTargetEndAdjustment += GetGame().ConfigGetFloat(path + " signalCycleTargetEndAdjustment");
155
156 int slotID;
157 string slotName;
158 if (item.GetInventory().GetCurrentAttachmentSlotInfo(slotID,slotName))
159 {
160 switch (slotName)
161 {
162 case "Bait":
163 m_Bait = item;
164 break;
165
166 case "Hook":
167 m_Hook = item;
168 break;
169 }
170 }
171 }
172 }
float m_QualityBaseMod
Определения CatchingContextBase.c:20
float m_QualityDispersionMinMod
Определения CatchingContextBase.c:21
float m_QualityDispersionMaxMod
Определения CatchingContextBase.c:22
PlayerSpawnPreset slotName
string path
Определения OptionSelectorMultistate.c:142
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native CGame GetGame()
const string CFG_VEHICLESPATH
Определения constants.c:220

Перекрестные ссылки CFG_VEHICLESPATH, CGame::ConfigGetFloat(), GetGame(), m_Bait, m_BaitLossChanceMod, m_Hook, m_HookLossChanceMod, m_QualityBaseMod, m_QualityDispersionMaxMod, m_QualityDispersionMinMod, m_SignalCycleTargetAdjustment, m_SignalCycleTargetEndAdjustment, m_SignalDurationMax, m_SignalDurationMin, path и slotName.