DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnFinishProgressServer()

override void ActionPackGift::OnFinishProgressServer ( ActionData action_data)
inlineprivate

См. определение в файле ActionPackGift.c строка 84

85 {
86 ItemBase item_to_pack = ItemBase.Cast(action_data.m_Target.GetObject());
87 ItemBase item = action_data.m_MainItem;
88 PlayerBase player = action_data.m_Player;
89 string typeName;
90
91 if (item_to_pack)
92 {
93 int x,y;
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
117 ClearActionJuncture(action_data);
118
119 lambda = new ReplaceWithNewReciveCargoLambda( item, typeName, player,item_to_pack);
120 player.ServerReplaceItemWithNew(lambda);
121
122 }
123
124
125 }
DayZGame g_Game
Определения DayZGame.c:3942
class GP5GasMask extends MaskBase ItemBase
Icon x
Icon y
void ClearActionJuncture(ActionData action_data)
Определения ActionBase.c:1104

Перекрестные ссылки ActionData, ActionBase::ClearActionJuncture(), g_Game, Math::RandomIntInclusive(), x и y.