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

◆ ChangeIntoOnDetach()

override string InventoryItem::ChangeIntoOnDetach ( )
inlineprivate

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

1447 {
1448 int idx = -1;
1449 string slot;
1450
1451 TStringArray inventory_slots = new TStringArray;
1452 TStringArray detach_types = new TStringArray;
1453
1454 this.ConfigGetTextArray("ChangeInventorySlot",inventory_slots);
1455 if (inventory_slots.Count() < 1) //is string
1456 {
1457 inventory_slots.Insert(this.ConfigGetString("ChangeInventorySlot"));
1458 detach_types.Insert(this.ConfigGetString("ChangeIntoOnDetach"));
1459 }
1460 else //is array
1461 {
1462 this.ConfigGetTextArray("ChangeIntoOnDetach",detach_types);
1463 if (detach_types.Count() < 1)
1464 detach_types.Insert(this.ConfigGetString("ChangeIntoOnDetach"));
1465 }
1466
1467 for (int i = 0; i < inventory_slots.Count(); i++)
1468 {
1469 slot = inventory_slots.Get(i);
1470 }
1471
1472 if (slot != "")
1473 {
1474 if (detach_types.Count() == 1)
1475 idx = 0;
1476 else
1477 idx = inventory_slots.Find(slot);
1478 }
1479 if (idx < 0)
1480 return "";
1481
1482 return detach_types.Get(idx);
1483 }
array< string > TStringArray
Определения EnScript.c:712