DayZ 1.27
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.

См. определение в файле EntityAI.c строка 4240

4241 {
4242 int slotId;
4243 int slotCount = GetInventory().GetSlotIdCount();
4244 for (int i = 0; i < slotCount; i++)
4245 {
4246 slotId = GetInventory().GetSlotId(i);
4247 set<int> tmp;
4248 switch (slotId)
4249 {
4250 case InventorySlots.HEADGEAR:
4251 {
4252 tmp = new set<int>;
4253 tmp.Copy(GetAttachmentExclusionInitSlotValue(slotId));
4254 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_MASK);
4255 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_HEADSTRAP);
4256 tmp.Insert(EAttExclusions.LEGACY_HEADGEAR_EYEWEWEAR);
4258 break;
4259 }
4260
4261 case InventorySlots.MASK:
4262 {
4263 tmp = new set<int>;
4264 tmp.Copy(GetAttachmentExclusionInitSlotValue(slotId));
4265 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADGEAR);
4266 tmp.Insert(EAttExclusions.LEGACY_MASK_HEADSTRAP);
4267 tmp.Insert(EAttExclusions.LEGACY_MASK_EYEWEWEAR);
4269 break;
4270 }
4271
4272 case InventorySlots.EYEWEAR:
4273 {
4274 tmp = new set<int>;
4275 tmp.Copy(GetAttachmentExclusionInitSlotValue(slotId));
4276 if (ConfigGetBool("isStrap"))
4277 {
4278 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_HEADGEAR);
4279 tmp.Insert(EAttExclusions.LEGACY_HEADSTRAP_MASK);
4280 }
4281 else
4282 {
4283 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_HEADGEAR);
4284 tmp.Insert(EAttExclusions.LEGACY_EYEWEAR_MASK);
4285 }
4287 break;
4288 }
4289 }
4290 }
4291 }
void SetAttachmentExclusionMaskSlot(int slotId, set< int > values)
sets values for specific slot
Определения EntityAI.c:4401
proto native GameInventory GetInventory()
set< int > GetAttachmentExclusionInitSlotValue(int slotId)
override this to modify slot behavior for specific items, or just set 'm_AttachmentExclusionMaskGloba...
Определения EntityAI.c:4193
proto native int GetSlotId(int index)
attachments
proto native int GetSlotIdCount()

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

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