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

◆ EEItemDetached()

void Entity::EEItemDetached ( EntityAI item,
string slot_name )
inlineprotected

См. определение в файле 3_Game/DayZ/Entities/EntityAI.c строка 1173

1174 {
1175 int slotId = InventorySlots.GetSlotIdFromString(slot_name);
1176 ClearExclusionValueRecursive(item.GetAttachmentExclusionMaskAll(slotId), slotId); //Performed from parent to avoid event order issues on swap
1178
1179 Man player = GetHierarchyRootPlayer();
1180 if (player)
1181 player.GetCachedEquipment().OnItemDetached(item, slotId, this);
1182
1183 if ( m_ComponentsBank != NULL )
1184 {
1185 for ( int comp_key = 0; comp_key < COMP_TYPE_COUNT; ++comp_key )
1186 {
1187 if ( m_ComponentsBank.IsComponentAlreadyExist(comp_key) )
1188 {
1189 m_ComponentsBank.GetComponent(comp_key).Event_OnItemDetached(item, slot_name);
1190 }
1191 }
1192 }
1193
1194 // Energy Manager
1195 if (m_EM && item.GetCompEM())
1196 m_EM.OnAttachmentRemoved(item);
1197
1198 if ( m_AttachmentsWithCargo.Find( item ) > -1 )
1199 m_AttachmentsWithCargo.RemoveItem( item );
1200
1201 if ( m_AttachmentsWithAttachments.Find( item ) > -1 )
1202 m_AttachmentsWithAttachments.RemoveItem( item );
1203
1204 if ( m_OnItemDetached )
1205 m_OnItemDetached.Invoke( item, slot_name, this );
1206 }
proto native Man GetHierarchyRootPlayer()
Returns root of current hierarchy cast to Man.
void ClearExclusionValueRecursive(set< int > values, int slotId)
ref array< EntityAI > m_AttachmentsWithCargo
ref array< EntityAI > m_AttachmentsWithAttachments
ref ScriptInvoker m_OnItemDetached
ref ComponentsBank m_ComponentsBank
ComponentEnergyManager m_EM
void SetWeightDirty()
const int COMP_TYPE_COUNT
Определения Component.c:12

Перекрестные ссылки ClearExclusionValueRecursive(), COMP_TYPE_COUNT, EntityAI(), GetHierarchyRootPlayer(), InventorySlots::GetSlotIdFromString(), m_AttachmentsWithAttachments, m_AttachmentsWithCargo, m_ComponentsBank, m_EM, m_OnItemDetached и SetWeightDirty().