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

◆ EEItemDetached()

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

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

1200 {
1201 int slotId = InventorySlots.GetSlotIdFromString(slot_name);
1202 ClearExclusionValueRecursive(item.GetAttachmentExclusionMaskAll(slotId), slotId); //Performed from parent to avoid event order issues on swap
1204
1205 Man player = GetHierarchyRootPlayer();
1206 if (player)
1207 player.GetCachedEquipment().OnItemDetached(item, slotId, this);
1208
1209 if ( m_ComponentsBank != NULL )
1210 {
1211 for ( int comp_key = 0; comp_key < COMP_TYPE_COUNT; ++comp_key )
1212 {
1213 if ( m_ComponentsBank.IsComponentAlreadyExist(comp_key) )
1214 {
1215 m_ComponentsBank.GetComponent(comp_key).Event_OnItemDetached(item, slot_name);
1216 }
1217 }
1218 }
1219
1220 // Energy Manager
1221 if (m_EM && item.GetCompEM())
1222 m_EM.OnAttachmentRemoved(item);
1223
1224 if ( m_AttachmentsWithCargo.Find( item ) > -1 )
1225 m_AttachmentsWithCargo.RemoveItem( item );
1226
1227 if ( m_AttachmentsWithAttachments.Find( item ) > -1 )
1228 m_AttachmentsWithAttachments.RemoveItem( item );
1229
1230 if ( m_OnItemDetached )
1231 m_OnItemDetached.Invoke( item, slot_name, this );
1232 }
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().