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

◆ OnItemAttached()

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

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

29 {
30 EntityAI item = EntityAI.Cast(entity);
31 ECachedEquipmentItemCategory category = item.GetCachedEquipmentCategory();
32 if (category != ECachedEquipmentItemCategory.NONE && !IsStored(entity, category))
33 {
34 CachedEquipmentItemAttribute newItemAttributes = new CachedEquipmentItemAttribute();
35 newItemAttributes.m_Entity = entity;
36 newItemAttributes.m_Parent = parent;
37 newItemAttributes.m_InventoryDepth = item.GetHierarchyLevel();
38 newItemAttributes.m_SlotIndex = slotId;
39 newItemAttributes.m_InventoryPlacement = ECachedEquipmentPlacement.ATTACHMENT;
40
41 #ifdef ENABLE_LOGGING
42 LogMessage(string.Format("parent:%1 entity:%2 (slot:%3)", parent, entity, InventorySlots.GetSlotName(slotId)), "OnItemAttached");
43 #endif
44
45 Insert(category, newItemAttributes);
46 }
47
48 CachedEquipmentStorageInventoryEntry params = new CachedEquipmentStorageInventoryEntry();
49 params.m_Entity = item;
50 params.m_GameInventory = item.GetInventory();
51 params.m_SlotId = slotId;
52 params.m_CallerMethod = "OnItemAttached";
53 params.m_OperationMode = ECachedEquipmentOperationMode.INSERT;
54
57 }
class LogManager EntityAI
ECachedEquipmentItemCategory
Определения ECachedEquipmentItemCategory.c:2
ECachedEquipmentOperationMode
Определения ECachedEquipmentOperationMode.c:2
ECachedEquipmentPlacement
Определения ECachedEquipmentPlacement.c:2
void ProcessItemInventory(CachedEquipmentStorageInventoryEntry params)
Определения CachedEquipmentStorage.c:143
bool IsStored(Entity entity, ECachedEquipmentItemCategory category)
Определения CachedEquipmentStorageBase.c:129
void Insert(ECachedEquipmentItemCategory category, CachedEquipmentItemAttribute attributes)
Определения CachedEquipmentStorageBase.c:145

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