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

◆ InitLegacySlotExclusionValuesImplicit()

void Entity::InitLegacySlotExclusionValuesImplicit ( )
inlineprotected

adding base one-directional relations between headgear, masks, eyewear, and headstraps (exception)

Заметки
: 'InitLegacyConfigExclusionValues' adds them the other way if the item does not have any script-side exclusions AND has some legacy config parameter.

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

4366 {
4367 int slotId;
4368 GameInventory gameInventory = GetInventory();
4369 int slotCount = gameInventory.GetSlotIdCount();
4370 for (int i = 0; i < slotCount; i++)
4371 {
4372 slotId = gameInventory.GetSlotId(i);
4373 set<int> tmp;
4374 switch (slotId)
4375 {
4376 case InventorySlots.HEADGEAR:
4377 {
4378 tmp = new set<int>;
4379 tmp.Copy(GetAttachmentExclusionInitSlotValue(slotId));
4380 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_MASK);
4381 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_HEADSTRAP);
4382 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_EYEWEWEAR);
4384 break;
4385 }
4386
4387 case InventorySlots.MASK:
4388 {
4389 tmp = new set<int>;
4390 tmp.Copy(GetAttachmentExclusionInitSlotValue(slotId));
4391 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADGEAR);
4392 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADSTRAP);
4393 tmp.Insert(EAttExclusions.LEGACY_MASK_EYEWEWEAR);
4395 break;
4396 }
4397
4398 case InventorySlots.EYEWEAR:
4399 {
4400 tmp = new set<int>;
4401 tmp.Copy(GetAttachmentExclusionInitSlotValue(slotId));
4402 if (ConfigGetBool("isStrap"))
4403 {
4404 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_HEADGEAR);
4405 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_MASK);
4406 }
4407 else
4408 {
4409 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_HEADGEAR);
4410 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_MASK);
4411 }
4413 break;
4414 }
4415 }
4416 }
4417 }
void SetAttachmentExclusionMaskSlot(int slotId, set< int > values)
sets values for specific slot
proto native GameInventory GetInventory()
set< int > GetAttachmentExclusionInitSlotValue(int slotId)
override this to modify slot behavior for specific items, or just set 'm_AttachmentExclusionMaskGloba...
proto native int GetSlotId(int index)
attachments
proto native int GetSlotIdCount()

Перекрестные ссылки GetAttachmentExclusionInitSlotValue(), GetInventory(), GameInventory::GetSlotId(), GameInventory::GetSlotIdCount() и SetAttachmentExclusionMaskSlot().

Используется в InitLegacyConfigExclusionValues().