DayZ 1.28
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/Entities/EntityAI.c строка 4486

4487 {
4488 set<int> targetSlotValues = GetAttachmentExclusionMaskSlot(targetSlot);
4489 if (targetSlotValues) //can be null, if so, no conflict
4490 {
4491 set<int> additionalValues = new set<int>(); //NOT slot values
4492 additionalValues.InsertSet(GetAttachmentExclusionMaskGlobal());
4493 additionalValues.InsertSet(GetAttachmentExclusionMaskChildren());
4494
4495 if (additionalValues.Count() > 0)
4496 {
4497 int countTarget = targetSlotValues.Count();
4498 for (int i = 0; i < countTarget; i++)
4499 {
4500 if (additionalValues.Find(targetSlotValues[i]) != -1)
4501 {
4502 return true;
4503 }
4504 }
4505 }
4506 }
4507 return false;
4508 }
set< int > GetAttachmentExclusionMaskSlot(int slotId)
Specific slot behavior.
Определения 3_Game/Entities/EntityAI.c:4468
set< int > GetAttachmentExclusionMaskGlobal()
Global mask value, independent of slot-specific behavior!
Определения 3_Game/Entities/EntityAI.c:4474
set< int > GetAttachmentExclusionMaskChildren()
Mask value coming from the item's attachments.
Определения 3_Game/Entities/EntityAI.c:4480

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