DayZ 1.24
Loading...
Searching...
No Matches
ActionUnfoldEntity.c
Go to the documentation of this file.
1
3{
5 {
6 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_PICKUP_HANDS;
7 }
8
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
30
32 {
33 if (!GetGame().IsMultiplayer())
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 {
43 lambda.SetTransferParams(true, true, true, false, 1);
44 action_data.m_Player.ServerReplaceItemInHandsWithNew(lambda);
45 }
46 }
47 }
48};
49
56
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
void ClearInventoryReservationEx(ActionData action_data)
Definition ActionBase.c:790
override bool ActionConditionContinue(ActionData action_data)
override bool HasTarget()
override void OnExecuteServer(ActionData action_data)
override void OnExecuteClient(ActionData action_data)
override void CreateConditionComponents()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
void UnfoldEntityLambda(EntityAI old_item, string new_item_type, PlayerBase player)
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
proto native CGame GetGame()