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

◆ OnFinishProgressServer()

override void ActionUnpackBox::OnFinishProgressServer ( ActionData action_data)
inlineprivate

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

37 {
38 if ( action_data.m_MainItem && action_data.m_MainItem.GetHierarchyRootPlayer() == action_data.m_Player )
39 {
40 string path = "CfgVehicles " + action_data.m_MainItem.GetType();
41 string child_name = "";
42 int count;
43 array<string> resources = new array<string>;
44
45 if( g_Game.ConfigIsExisting( path ) && g_Game.ConfigIsExisting( path + " Resources") )
46 {
47 path = path + " Resources";
48 count = g_Game.ConfigGetChildrenCount ( path );
49 for (int i = 0; i < count; i++)
50 {
51 g_Game.ConfigGetChildName ( path, i, child_name );
52
53 if ( g_Game.ConfigGetInt( path + " " + child_name + " value" ) )
54 {
55 resources.Insert( child_name );
56 }
57 }
58
59 //TODO modify to allow for multiple ammo types spawning (if needed??)
60 string itemType = resources.Get(0);
61 int itemCount = g_Game.ConfigGetInt( path + " " + itemType + " value" );
62
63 UnboxLambda lambda = new UnboxLambda(action_data.m_MainItem, itemType, action_data.m_Player, itemCount);
64 action_data.m_Player.ServerReplaceItemInHandsWithNew(lambda);
65 }
66 }
67 }
DayZGame g_Game
Определения DayZGame.c:3942
string path
Определения OptionSelectorMultistate.c:142

Перекрестные ссылки ActionData, g_Game и path.