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

◆ OnItemAttached()

override void OnItemAttached ( notnull Entity entity,
int slotId,
notnull Entity parent )

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

28 {
29 EntityAI item = EntityAI.Cast(entity);
30 ECachedEquipmentItemCategory category = item.GetCachedEquipmentCategory();
31 if (category != ECachedEquipmentItemCategory.NONE && !IsStored(entity, category))
32 {
33 CachedEquipmentItemAttribute newItemAttributes = new CachedEquipmentItemAttribute();
34 newItemAttributes.m_Entity = entity;
35 newItemAttributes.m_Parent = parent;
36 newItemAttributes.m_InventoryDepth = item.GetHierarchyLevel();
37 newItemAttributes.m_SlotIndex = slotId;
38 newItemAttributes.m_InventoryPlacement = ECachedEquipmentPlacement.ATTACHMENT;
39
40 #ifdef ENABLE_LOGGING
41 LogMessage(string.Format("parent:%1 entity:%2 (slot:%3)", parent, entity, InventorySlots.GetSlotName(slotId)), "OnItemAttached");
42 #endif
43
44 Insert(category, newItemAttributes);
45 }
46
47 CachedEquipmentStorageInventoryEntry params = new CachedEquipmentStorageInventoryEntry();
48 params.m_Entity = item;
49 params.m_GameInventory = item.GetInventory();
50 params.m_SlotId = slotId;
51 params.m_CallerMethod = "OnItemAttached";
52 params.m_OperationMode = ECachedEquipmentOperationMode.INSERT;
53
55 }
void ProcessItemInventory(CachedEquipmentStorageInventoryEntry params)
Определения CachedEquipmentStorage.c:141
ECachedEquipmentItemCategory
Определения ECachedEquipmentItemCategory.c:2
ECachedEquipmentOperationMode
Определения ECachedEquipmentOperationMode.c:2
ECachedEquipmentPlacement
Определения ECachedEquipmentPlacement.c:2
static proto native owned string GetSlotName(int id)
converts slot_id to string
provides access to slot configuration
Определения InventorySlots.c:6

Перекрестные ссылки InventorySlots::GetSlotName(), CachedEquipmentStorageBase::Insert() и ProcessItemInventory().