DayZ 1.30
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 строка 4608

4609 {
4610 set<int> targetSlotValues = GetAttachmentExclusionMaskSlot(targetSlot);
4611 if (targetSlotValues) //can be null, if so, no conflict
4612 {
4613 set<int> additionalValues = new set<int>(); //NOT slot values
4614 additionalValues.InsertSet(GetAttachmentExclusionMaskGlobal());
4615 additionalValues.InsertSet(GetAttachmentExclusionMaskChildren());
4616
4617 if (additionalValues.Count() > 0)
4618 {
4619 int countTarget = targetSlotValues.Count();
4620 for (int i = 0; i < countTarget; i++)
4621 {
4622 if (additionalValues.Find(targetSlotValues[i]) != -1)
4623 {
4624 return true;
4625 }
4626 }
4627 }
4628 }
4629 return false;
4630 }
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().