DayZ 1.29
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 строка 4298

4299 {
4300 int slotId;
4301 GameInventory gameInventory = GetInventory();
4302 int slotCount = gameInventory.GetSlotIdCount();
4303 for (int i = 0; i < slotCount; i++)
4304 {
4305 slotId = gameInventory.GetSlotId(i);
4306 set<int> tmp;
4307 switch (slotId)
4308 {
4309 case InventorySlots.HEADGEAR:
4310 {
4311 tmp = new set<int>;
4312 tmp.Copy(GetAttachmentExclusionInitSlotValue(slotId));
4313 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_MASK);
4314 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_HEADSTRAP);
4315 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_EYEWEWEAR);
4317 break;
4318 }
4319
4320 case InventorySlots.MASK:
4321 {
4322 tmp = new set<int>;
4323 tmp.Copy(GetAttachmentExclusionInitSlotValue(slotId));
4324 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADGEAR);
4325 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADSTRAP);
4326 tmp.Insert(EAttExclusions.LEGACY_MASK_EYEWEWEAR);
4328 break;
4329 }
4330
4331 case InventorySlots.EYEWEAR:
4332 {
4333 tmp = new set<int>;
4334 tmp.Copy(GetAttachmentExclusionInitSlotValue(slotId));
4335 if (ConfigGetBool("isStrap"))
4336 {
4337 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_HEADGEAR);
4338 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_MASK);
4339 }
4340 else
4341 {
4342 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_HEADGEAR);
4343 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_MASK);
4344 }
4346 break;
4347 }
4348 }
4349 }
4350 }
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().