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

◆ ActionCondition()

override bool ActionRefuelTorch::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

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

17 {
18 Torch torch;
19 Rag rag;
20 Rag torchRag;
21
22 if ((Class.CastTo(torch,target.GetObject()) && Class.CastTo(rag,item)) || (Class.CastTo(rag,target.GetObject()) && Class.CastTo(torch,item)))
23 {
24 if (Class.CastTo(torchRag,torch.GetRag()))
25 {
26 int slotId = InventorySlots.INVALID;
27 InventoryLocation lcn = new InventoryLocation();
28 torchRag.GetInventory().GetCurrentInventoryLocation(lcn);
29 slotId = lcn.GetSlot();
30
31 return torch.GetInventory().GetSlotLock(slotId) && torch.GetRagQuantity() < torchRag.GetQuantityMax() && torch.IsRagDryEnough(rag);
32 }
33 }
34
35 return false;
36 }
proto native int GetSlot()
returns slot id if current type is Attachment

Перекрестные ссылки ActionTarget, Class::CastTo(), InventoryLocation::GetSlot() и InventorySlots::INVALID.