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

◆ ProcessItemsWetness()

void ProcessItemsWetness ( array< int > pSlotIds)
protected

Soak items at specific Slot ID(s)

Аргументы
pSlotIdsInventory Slot IDs to process

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

698 {
699 EntityAI attachment;
700
701 int playerAttachmentCount = m_Player.GetInventory().AttachmentCount();
702
703 #ifdef ENABLE_LOGGING
704 LogDryWetProcess(string.Format("Environment :: ProcessItemsWetness (update interval=%1s)", GameConstants.ENVIRO_TICK_RATE));
705 #endif
706 for (int attIdx = 0; attIdx < playerAttachmentCount; ++attIdx)
707 {
708 attachment = m_Player.GetInventory().GetAttachmentFromIndex(attIdx);
709 if (attachment.IsItemBase())
710 {
711 int attachmentSlotsCount = attachment.GetInventory().GetSlotIdCount();
712 for (int attachmentSlotId = 0; attachmentSlotId < attachmentSlotsCount; ++attachmentSlotId)
713 {
714 int attachmentSlot = attachment.GetInventory().GetSlotId(attachmentSlotId);
715 for (int i = 0; i < pSlotIds.Count(); ++i)
716 {
717 if (attachmentSlot == pSlotIds.Get(i))
718 {
719 ApplyWetnessToItem(ItemBase.Cast(attachment));
720 break;
721 }
722 }
723 }
724 }
725 }
726
727 if (m_Player.GetItemInHands())
728 ApplyWetnessToItem(m_Player.GetItemInHands());
729
730 #ifdef ENABLE_LOGGING
731 LogDryWetProcess("==========");
732 #endif
733 }
map m_Player
void ApplyWetnessToItem(ItemBase pItem)
Определения Environment.c:735
const float ENVIRO_TICK_RATE
Определения 3_Game/DayZ/constants.c:723

Перекрестные ссылки ApplyWetnessToItem() и GameConstants::ENVIRO_TICK_RATE.

Используется в ProcessWetnessByRain(), ProcessWetnessByWaterLevel() и Update().