DayZ 1.29
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 строка 949

950 {
951 int slot_id = InventorySlots.GetSlotIdFromString(slot_type);
952 EntityAI item_EAI = this.GetInventory().FindAttachment(slot_id);
953 ItemBase item_IB = ItemBase.Cast(item_EAI);
954
955 if (item_EAI && !item_IB)
956 {
957 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() + "!";
958 Error(str);
959 return null;
960 }
961
962 return item_IB;
963 }
class LogManager EntityAI
eBleedingSourceType GetType()
class GP5GasMask extends MaskBase ItemBase
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

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

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