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

◆ SendRPCUpdate()

void HudDebugWinHorticulture::SendRPCUpdate ( bool isTarget)
inlineprotected

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

116 {
117 int slotID = -1;
118 GardenBase garden;
119 int maturity = m_FullMaturityEditBox.GetText().ToInt();
120 int spoil = m_SpoilEditBox.GetText().ToInt();
121 int spoilRemove = m_SpoilRemoveEditBox.GetText().ToInt();
122 int dryRemove = m_DryRemoveEditBox.GetText().ToInt();
123
124 Param6<int, GardenBase, int, int, int, int> params;
125 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
126
127 if (isTarget && player && player.GetActionManager())
128 {
129 ActionTarget at = player.GetActionManager().FindActionTarget();
130 if (at)
131 garden = GardenBase.Cast(at.GetObject());
132
133 if (garden)
134 {
135 array<string> selections = new array<string>;
136 garden.GetActionComponentNameList(at.GetComponentIndex(), selections);
137
138 for (int s = 0; s < selections.Count(); s++)
139 {
140 string selection = selections[s];
141 Slot slot = garden.GetSlotBySelection( selection );
142 if (slot && slot.GetPlant())
143 {
144 slotID = slot.GetSlotIndex();
145 }
146 }
147 }
148 }
149
150 params = new Param6<int, GardenBase, int, int, int, int>(slotID, garden, maturity, spoil, spoilRemove, dryRemove);
151
152 if (!GetGame().IsMultiplayer())
153 {
154 if (slotID != -1 && garden)
155 {
156 Slot gSlot = garden.GetSlotByIndex(slotID);
157 if (gSlot && gSlot.GetPlant())
158 gSlot.GetPlant().DebugSetTimes(maturity, spoil, spoilRemove, dryRemove);
159 }
160 else
161 PlantBase.DebugSetGlobalTimes(params.param3, params.param4, params.param5, params.param6);
162 }
163 else if (player)
164 player.RPCSingleParam(ERPCs.DEV_RPC_HORTICULTURE_UPDATE, params, true);
165 }
class ActionTargets ActionTarget
ERPCs
Определения ERPCs.c:2
PlayerBase GetPlayer()
Определения ModifierBase.c:51
void PlantBase()
Определения PlantBase.c:54
EditBoxWidget m_DryRemoveEditBox
Определения HudDebugWinHorticulture.c:6
EditBoxWidget m_SpoilRemoveEditBox
Определения HudDebugWinHorticulture.c:5
EditBoxWidget m_SpoilEditBox
Определения HudDebugWinHorticulture.c:4
EditBoxWidget m_FullMaturityEditBox
Определения HudDebugWinHorticulture.c:3
proto native CGame GetGame()

Перекрестные ссылки ActionTarget, GetGame(), GetPlayer(), m_DryRemoveEditBox, m_FullMaturityEditBox, m_SpoilEditBox, m_SpoilRemoveEditBox и PlantBase().

Используется в OnClick().