85 {
88 PlayerBase player = action_data.
m_Player;
89 string typeName;
90
91 if (item_to_pack)
92 {
94 g_Game.GetInventoryItemSize( item_to_pack,
x,
y );
95 int rnd = Math.RandomIntInclusive(1, 4);
96
97 ReplaceWithNewReciveCargoLambda lambda;
98
99 if(
x <= 2 &&
y <= 2 )
100 {
101 typeName = "GiftBox_Small_" + rnd;
102 }
103 else if(
x <= 3 &&
y <= 3 )
104 {
105 typeName = "GiftBox_Medium_" + rnd;
106 }
107 else if(
x <= 5 &&
y <= 5 )
108 {
109 typeName = "GiftBox_Large_" + rnd;
110 }
111 else return;
112
113
114 if (!
g_Game.IsDedicatedServer())
115 {
116 player.RemoveQuickBarEntityShortcut(item_to_pack);
118 }
119 else
120 {
122 }
123
124 lambda = new ReplaceWithNewReciveCargoLambda( item, typeName, player,item_to_pack);
125 player.ServerReplaceItemWithNew(lambda);
126
127 }
128
129
130 }
void ClearInventoryReservationEx(ActionData action_data)
void ClearActionJuncture(ActionData action_data)
class GP5GasMask extends MaskBase ItemBase
ref ActionTarget m_Target