38 if ( !item_to_pack.
IsTakeable() )
return false;
39 if ( item_to_pack.IsBeingPlaced() )
return false;
49 if ( item_to_pack.GetInventory().IsAttachment() )
51 if ( !item_to_pack.
CanDetachAttachment(tgt_parent) || !tgt_parent.CanReleaseAttachment(item_to_pack) )
56 if ( !item_to_pack.
CanRemoveFromCargo(tgt_parent) || !tgt_parent.CanReleaseCargo(item_to_pack) )
61 if ( item_to_pack.GetInventory().GetCargo() && item_to_pack.GetInventory().GetCargo().GetItemCount() > 0)
64 if ( !item_to_pack.IsWeapon() && item_to_pack.GetInventory().AttachmentCount() > 0)
82 player.RemoveQuickBarEntityShortcut(item_to_pack);
101 if(
x <= 2 &&
y <= 2 )
103 typeName =
"GiftBox_Small_" + rnd;
105 else if(
x <= 3 &&
y <= 3 )
107 typeName =
"GiftBox_Medium_" + rnd;
109 else if(
x <= 5 &&
y <= 5 )
111 typeName =
"GiftBox_Large_" + rnd;
116 if(!
GetGame().IsDedicatedServer())
117 player.RemoveQuickBarEntityShortcut(item_to_pack);
120 player.ServerReplaceItemWithNew(lambda);
138 super.OnSuccess(new_item);
141 m_ItemToCargo.GetInventory().GetCurrentInventoryLocation(src);
148 if(
GetGame().IsDedicatedServer())
protected float m_SpecialtyWeight
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
protected int m_StanceMask
class ActionTargets ActionTarget
protected ActionData m_ActionData
ref CABase m_ActionComponent
ref ActionTarget m_Target
override void CreateActionComponent()
override void OnFinishProgressServer(ActionData action_data)
override void CreateConditionComponents()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void OnFinishProgressClient(ActionData action_data)
override bool HasTarget()
protected int m_CommandUID
protected m_CallbackClass
proto void GetInventoryItemSize(InventoryItem item, out int width, out int height)
proto native bool IsValid()
verify current set inventory location
proto native void SetCargo(notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip)
sets current inventory location type to Cargo with coordinates (idx, row, col)
override bool CanPutInCargo(EntityAI parent)
override bool CanRemoveFromCargo(EntityAI parent)
override bool IsTakeable()
override bool CanDetachAttachment(EntityAI parent)
override void OnSuccess(EntityAI new_item)
void ReplaceWithNewReciveCargoLambda(EntityAI old_item, string new_item_type, PlayerBase player, EntityAI item_to_cargo)
protected EntityAI m_ItemToCargo
DayZPlayerConstants
defined in C++
proto native CGame GetGame()
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].