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

◆ GetSlotIndexByAttachmentSlot()

int ItemBase::GetSlotIndexByAttachmentSlot ( string att_slot)
inlineprivate

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

695 {
696 int slot_index = -1;
697
698 int start = "SeedBase_".Length();
699 int end = att_slot.Length();//start + 2;
700 int len = end - start;
701
702 string num_str = att_slot.Substring( start, len );
703 slot_index = num_str.ToInt();
704
705 return slot_index;
706 }
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().