85 {
87 ItemBase item = action_data.m_MainItem;
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 player.RemoveQuickBarEntityShortcut(item_to_pack);
116
118
119 lambda = new ReplaceWithNewReciveCargoLambda( item, typeName, player,item_to_pack);
120 player.ServerReplaceItemWithNew(lambda);
121
122 }
123
124
125 }
class GP5GasMask extends MaskBase ItemBase
void ClearActionJuncture(ActionData action_data)