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

◆ ChangeIntoOnDetach()

override string InventoryItem::ChangeIntoOnDetach ( )
inlineprivate

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

1424 {
1425 int idx = -1;
1426 string slot;
1427
1428 TStringArray inventory_slots = new TStringArray;
1429 TStringArray detach_types = new TStringArray;
1430
1431 this.ConfigGetTextArray("ChangeInventorySlot",inventory_slots);
1432 if (inventory_slots.Count() < 1) //is string
1433 {
1434 inventory_slots.Insert(this.ConfigGetString("ChangeInventorySlot"));
1435 detach_types.Insert(this.ConfigGetString("ChangeIntoOnDetach"));
1436 }
1437 else //is array
1438 {
1439 this.ConfigGetTextArray("ChangeIntoOnDetach",detach_types);
1440 if (detach_types.Count() < 1)
1441 detach_types.Insert(this.ConfigGetString("ChangeIntoOnDetach"));
1442 }
1443
1444 for (int i = 0; i < inventory_slots.Count(); i++)
1445 {
1446 slot = inventory_slots.Get(i);
1447 }
1448
1449 if (slot != "")
1450 {
1451 if (detach_types.Count() == 1)
1452 idx = 0;
1453 else
1454 idx = inventory_slots.Find(slot);
1455 }
1456 if (idx < 0)
1457 return "";
1458
1459 return detach_types.Get(idx);
1460 }
array< string > TStringArray
Определения EnScript.c:685