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

◆ UncoverHead()

void ActionUncoverHeadBase::UncoverHead ( PlayerBase target,
PlayerBase source )
inlineprivate

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

13 {
14 EntityAI attachment;
15 if (Class.CastTo(attachment, target.GetInventory().FindAttachment(InventorySlots.HEADGEAR)) && attachment.GetType() == "BurlapSackCover")
16 {
17 ItemBase new_item = null;
18 if (!source.GetHumanInventory().GetEntityInHands())
19 {
20 new_item = ItemBase.Cast(HumanInventory.Cast(source.GetInventory()).CreateInHands("BurlapSack"));
21 }
22 else
23 {
24 if (!Class.CastTo(new_item,source.GetInventory().CreateInInventory("BurlapSack")))//full inventory
25 {
26 vector m4[4];
27 source.GetTransformWS(m4);
28 InventoryLocation target_gnd = new InventoryLocation;
29 target_gnd.SetGround(null, m4);
30 new_item = ItemBase.Cast(GameInventory.LocationCreateEntity(target_gnd, "BurlapSack",ECE_IN_INVENTORY,RF_DEFAULT));
31 }
32 }
33
34 if (new_item)
35 {
36 MiscGameplayFunctions.TransferItemProperties(attachment,new_item,true,false,true);
37 attachment.Delete();
38 }
39 }
40 }
class LogManager EntityAI
const int ECE_IN_INVENTORY
Определения CentralEconomy.c:36
const int RF_DEFAULT
Определения CentralEconomy.c:65
class GP5GasMask extends MaskBase ItemBase
proto native void SetGround(EntityAI e, vector mat[4])
sets current inventory location type to Ground with transformation mat

Перекрестные ссылки Class::CastTo(), HumanInventory::CreateInHands(), ECE_IN_INVENTORY, GameInventory::LocationCreateEntity(), RF_DEFAULT и InventoryLocation::SetGround().

Используется в ActionUncoverHeadTarget::OnFinishProgressServer() и OnFinishProgressServer().