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

◆ GetItemOnSlot()

ItemBase ManBase::GetItemOnSlot ( string slot_type)
inlineprotected

Returns item that's on this player's attachment slot. Parameter slot_type should be a string from config parameter 'itemInfo[]' like "Legs", "Headgear" and so on.

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

812 {
813 int slot_id = InventorySlots.GetSlotIdFromString(slot_type);
814 EntityAI item_EAI = this.GetInventory().FindAttachment(slot_id);
815 ItemBase item_IB = ItemBase.Cast(item_EAI);
816
817 if (item_EAI && !item_IB)
818 {
819 string str = "Warning! GetItemOnSlot() >> found item on slot " + slot_type + " can't be cast to ItemBase! Found item is " + item_EAI.GetType() + " and the player is " + GetType() + "!";
820 Error(str);
821 return null;
822 }
823
824 return item_IB;
825 }
class LogManager EntityAI
eBleedingSourceType GetType()
Определения BleedingSource.c:63
class GP5GasMask extends MaskBase ItemBase
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки Error(), InventorySlots::GetSlotIdFromString() и GetType().

Используется в BrokenLegForceProne(), GetItemOnHead() и IsWearingSplint().