Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionunfoldentity.c
Go to the documentation of this file.
1 
3 {
4  void ActionUnfoldEntity ()
5  {
6  m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_PICKUP_HANDS;
7  }
8 
9  override void CreateConditionComponents ()
10  {
13  }
14 
15  override bool HasTarget () { return false; }
16 
17  override bool ActionCondition ( PlayerBase player, ActionTarget target, ItemBase item )
18  {
19  if (item)
20  return true;
21  return false;
22  }
23 
24  override bool ActionConditionContinue ( ActionData action_data ) { return true; }
25 
26  override void OnExecuteClient ( ActionData action_data )
27  {
28  ClearInventoryReservationEx(action_data);
29  }
30 
31  override void OnExecuteServer ( ActionData action_data )
32  {
33  if ( !GetGame().IsMultiplayer() )
34  ClearInventoryReservationEx(action_data);
35 
36  ItemBase old_item = action_data.m_MainItem;
37  if (old_item.ConfigIsExisting("ChangeIntoOnDetach"))
38  {
39  string str = old_item.ChangeIntoOnDetach();
40  if (str != "")
41  {
42  UnfoldEntityLambda lambda = new UnfoldEntityLambda(action_data.m_MainItem, str, action_data.m_Player);
43  lambda.SetTransferParams(true, true, true, false, 1);
44  action_data.m_Player.ServerReplaceItemInHandsWithNew(lambda);
45  }
46  }
47  }
48 };
49 
51 {
52  void UnfoldEntityLambda (EntityAI old_item, string new_item_type, PlayerBase player)
53  {
54  }
55 };
56 
ItemBase
Definition: inventoryitem.c:730
GetGame
proto native CGame GetGame()
CCTNone
Definition: cctnone.c:1
ClearInventoryReservationEx
void ClearInventoryReservationEx(ActionData action_data)
Definition: actionbase.c:862
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
ActionUnfoldEntity
Definition: actionunfoldentity.c:2
ActionSingleUseBase
Definition: actionsingleusebase.c:41
UnfoldEntityLambda
Definition: actionunfoldentity.c:50
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
CCINonRuined
Definition: ccinonruined.c:1
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
TurnItemIntoItemLambda
Definition: miscgameplayfunctions.c:91
EntityAI
Definition: building.c:5