DayZ 1.24
Loading...
Searching...
No Matches
CASingleUseQuantityEdible.c
Go to the documentation of this file.
2{
7
9 {
10 if (m_SpentUnits)
11 {
14 }
15
16 PlayerBase ntarget = PlayerBase.Cast(action_data.m_Target.GetObject());
17 if (ntarget)
18 {
19 if (GetGame().IsServer())
20 {
21 //action_data.m_MainItem.Consume(ntarget, m_QuantityUsedPerAction);
22 ntarget.Consume(action_data.m_MainItem, m_QuantityUsedPerAction, EConsumeType.ITEM_SINGLE_TIME);
23 }
24 }
25 else
26 {
27 if (GetGame().IsServer())
28 {
29 //action_data.m_MainItem.Consume(action_data.m_Player, m_QuantityUsedPerAction);
30 action_data.m_Player.Consume(action_data.m_MainItem, m_QuantityUsedPerAction, EConsumeType.ITEM_SINGLE_TIME);
31 }
32 }
33 }
34};
EConsumeType
Definition EConsumeType.c:2
void SetACData(Param units)
Definition CABase.c:38
override void CalcAndSetQuantity(ActionData action_data)
void CASingleUseQuantityEdible(float quantity_used_per_action)
ref Param1< float > m_SpentUnits
proto native CGame GetGame()