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

◆ HasInternalExclusionConflicts()

bool Entity::HasInternalExclusionConflicts ( int targetSlot)
inlineprivate

checks if any attachment or item state would interfere with this being attached into a different slot (Headgear -> Mask)

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

4542 {
4543 set<int> targetSlotValues = GetAttachmentExclusionMaskSlot(targetSlot);
4544 if (targetSlotValues) //can be null, if so, no conflict
4545 {
4546 set<int> additionalValues = new set<int>(); //NOT slot values
4547 additionalValues.InsertSet(GetAttachmentExclusionMaskGlobal());
4548 additionalValues.InsertSet(GetAttachmentExclusionMaskChildren());
4549
4550 if (additionalValues.Count() > 0)
4551 {
4552 int countTarget = targetSlotValues.Count();
4553 for (int i = 0; i < countTarget; i++)
4554 {
4555 if (additionalValues.Find(targetSlotValues[i]) != -1)
4556 {
4557 return true;
4558 }
4559 }
4560 }
4561 }
4562 return false;
4563 }
set< int > GetAttachmentExclusionMaskSlot(int slotId)
Specific slot behavior.
set< int > GetAttachmentExclusionMaskGlobal()
Global mask value, independent of slot-specific behavior!
set< int > GetAttachmentExclusionMaskChildren()
Mask value coming from the item's attachments.

Перекрестные ссылки GetAttachmentExclusionMaskChildren(), GetAttachmentExclusionMaskGlobal() и GetAttachmentExclusionMaskSlot().