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

◆ ChangeIntoOnDetach()

override string ChangeIntoOnDetach ( )
private

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

1375 {
1376 int idx = -1;
1377 string slot;
1378
1379 TStringArray inventory_slots = new TStringArray;
1380 TStringArray detach_types = new TStringArray;
1381
1382 this.ConfigGetTextArray("ChangeInventorySlot",inventory_slots);
1383 if (inventory_slots.Count() < 1) //is string
1384 {
1385 inventory_slots.Insert(this.ConfigGetString("ChangeInventorySlot"));
1386 detach_types.Insert(this.ConfigGetString("ChangeIntoOnDetach"));
1387 }
1388 else //is array
1389 {
1390 this.ConfigGetTextArray("ChangeIntoOnDetach",detach_types);
1391 if (detach_types.Count() < 1)
1392 detach_types.Insert(this.ConfigGetString("ChangeIntoOnDetach"));
1393 }
1394
1395 for (int i = 0; i < inventory_slots.Count(); i++)
1396 {
1397 slot = inventory_slots.Get(i);
1398 }
1399
1400 if (slot != "")
1401 {
1402 if (detach_types.Count() == 1)
1403 idx = 0;
1404 else
1405 idx = inventory_slots.Find(slot);
1406 }
1407 if (idx < 0)
1408 return "";
1409
1410 return detach_types.Get(idx);
1411 }
class array< Class T > TStringArray
proto string Get(int index)
Gets n-th character from string.

Перекрестные ссылки string::Get() и TStringArray.