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

◆ GetSlotIndexByAttachmentSlot()

int ItemBase::GetSlotIndexByAttachmentSlot ( string att_slot)
inlineprivate

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

753 {
754 int slot_index = -1;
755
756 int start = "SeedBase_".Length();
757 int end = att_slot.Length();//start + 2;
758 int len = end - start;
759
760 string num_str = att_slot.Substring( start, len );
761 slot_index = num_str.ToInt();
762
763 return slot_index;
764 }
proto native int Length()
Returns length of string.
proto native int ToInt()
Converts string to integer.
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.

Перекрестные ссылки string::Length(), string::Substring() и string::ToInt().

Используется в EEItemAttached().