DayZ 1.27
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( GetGame().ConfigIsExisting( path ) && GetGame().ConfigIsExisting( path + " Resources") )
46 {
47 path = path + " Resources";
49 for (int i = 0; i < count; i++)
50 {
51 GetGame().ConfigGetChildName ( path, i, child_name );
52
53 if ( GetGame().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 = GetGame().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 }
string path
Определения OptionSelectorMultistate.c:142
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
proto native CGame GetGame()

Перекрестные ссылки ActionData, CGame::ConfigGetChildName(), CGame::ConfigGetChildrenCount(), CGame::ConfigGetInt(), GetGame() и path.