27 if (target_player.IsRestrained())
29 EntityAI item_in_hands_source = source_player.GetItemInHands();
31 ItemBase item_in_hands_target = target_player.GetItemInHands();
36 string item_in_hands_name = item_in_hands_source.GetType();
76 EntityAI item_in_hands_source = player.GetItemInHands();
78 if( other_player.IsRestrained() )
81 EntityAI item_in_hands_target = other_player.GetItemInHands();
85 if( item_in_hands_target )
89 string item_in_hands_name = item_in_hands_source.GetType();
115 EntityAI restraining_item = player_target.GetItemInHands();
117 player_target.SetRestrained(
false);
126 string item_in_hands_name = unrestraining_tool.GetType();
127 float damageToTool = 0;
139 MiscGameplayFunctions.DealAbsoluteDmg(action_data.
m_MainItem, damageToTool);
142 MiscGameplayFunctions.TransformRestrainItem(restraining_item, unrestraining_tool, player_source, player_target);
159 m_OldItem = old_item;
164 super.OnSuccess(new_item);
168 new_item.SetHealth(
"",
"",0);
182 EntityAI newItem = super.CreateNewEntity();
protected float m_SpecialtyWeight
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
bool CanReceiveAction(ActionTarget target)
protected bool m_FullBody
protected int m_StanceMask
class ActionTargets ActionTarget
const int ECE_PLACE_ON_SURFACE
class OptionSelectorMultistate extends OptionSelector class_name
protected ActionData m_ActionData
ref CABase m_ActionComponent
ref ActionTarget m_Target
override void CreateActionComponent()
const float DEFAULT_UNRESTRAIN_TIME
float ObtainUnrestrainTime()
override void OnFinishProgressServer(ActionData action_data)
void ActionUnrestrainTarget()
override void CreateConditionComponents()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
protected int m_CommandUID
protected m_CallbackClass
static ref TStringArray ARRAY_STRING
static ref TFloatArray ARRAY_FLOAT
void ReplaceAndDestroyLambdaEx(EntityAI old_item, string new_item_type, PlayerBase player, bool destroy=false, bool enableDrop=true)
override protected EntityAI CreateNewEntity()
PlayerBase m_TargetPlayer
override void OnSuccess(EntityAI new_item)
void ReplaceAndDestroyLambda(EntityAI old_item, string new_item_type, PlayerBase player, bool destroy=false)
DayZPlayerConstants
defined in C++
proto native CGame GetGame()
const float DEBUG_QUICK_UNRESTRAIN_TIME