DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ActionCraftBoltsFeather
+ Граф наследования:ActionCraftBoltsFeather:

Защищенные члены

void ActionCraftBoltsFeather ()
 
override void CreateConditionComponents ()
 
bool IsFeatherType (string itemInHandsType)
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnStartServer (ActionData action_data)
 
override void OnFinishProgressServer (ActionData action_data)
 

Защищенные данные

bool m_IsFeatherInHands
 
Ammunition_Base m_ResultEntity
 

Дополнительные унаследованные члены

- Закрытые члены унаследованные от ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

Подробное описание

Конструктор(ы)

◆ ActionCraftBoltsFeather()

void ActionCraftBoltsFeather ( )
inlineprotected
17 {
19 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
20 m_FullBody = true;
21 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
23
24 m_Text = "#STR_CraftBolt1";
25
26 }
bool m_FullBody
Definition ActionBase.c:61
string m_Text
Definition ActionBase.c:58
float m_SpecialtyWeight
Definition ActionBase.c:77
int m_StanceMask
Definition ActionBase.c:62
Definition ActionCraftBoltsFeather.c:2
int m_CommandUID
Definition AnimatedActionBase.c:143
m_CallbackClass
Definition AnimatedActionBase.c:145
Definition EntityAI.c:95
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки AnimatedActionBase::m_CallbackClass, AnimatedActionBase::m_CommandUID, ActionBase::m_FullBody, ActionBase::m_SpecialtyWeight, ActionBase::m_StanceMask и ActionBase::m_Text.

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprotected
40 {
41 if (IsFeatherType(item.ClassName()))
42 {
43 //feather in hands
44 if (target.GetObject())
45 return (target.GetObject().ClassName() == "Ammo_ImprovisedBolt_1");
46 }
47 else if (target.GetObject())
48 {
49 // bolt in hands
50 return IsFeatherType(target.GetObject().ClassName());
51 }
52 return false;
53 }
bool IsFeatherType(string itemInHandsType)
Definition ActionCraftBoltsFeather.c:34

Перекрестные ссылки IsFeatherType().

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprotected
29 {
32 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINonRuined.c:2
Definition CCTNonRuined.c:2

Перекрестные ссылки ActionBase::m_ConditionItem и ActionBase::m_ConditionTarget.

◆ IsFeatherType()

bool IsFeatherType ( string itemInHandsType)
inlineprotected
35 {
36 return itemInHandsType == "ChickenFeather";
37 }

Используется в ActionCondition() и OnStartServer().

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
inlineprotected
64 {
67
68 bool added = false;
69
71 {
72 //feather in hands
73 feather = action_data.m_MainItem;
74 bolt = Ammunition_Base.Cast(action_data.m_Target.GetObject());
75 }
76 else
77 {
78 // bolt in hands
79 bolt = Ammunition_Base.Cast(action_data.m_MainItem);
80 feather = ItemBase.Cast(action_data.m_Target.GetObject());
81 }
82
83 if (!bolt || !feather)
84 return;
85
86 float dmg;
87 string type;
88
89 bolt.ServerAcquireCartridge(dmg, type);
90
92 {
93 type = m_ResultEntity.ConfigGetString("Ammo");
94 if (m_ResultEntity.GetAmmoCount() < m_ResultEntity.GetAmmoMax())
95 {
96 m_ResultEntity.ServerStoreCartridge(dmg, type);
97 added = true;
98 }
99 }
100
101 if (!added)
102 {
103 m_ResultEntity = Ammunition_Base.Cast(action_data.m_Player.SpawnEntityOnGroundPos("Ammo_ImprovisedBolt_2", action_data.m_Player.GetPosition()));
104 type = m_ResultEntity.ConfigGetString("Ammo");
105 m_ResultEntity.ServerSetAmmoCount(0);
106 m_ResultEntity.ServerStoreCartridge(dmg, type);
107 m_ResultEntity.SetHealth01("", "", bolt.GetHealth01("", ""));
108 }
109
110 feather.AddQuantity(-1);
111 }
Ammunition_Base m_ResultEntity
Definition ActionCraftBoltsFeather.c:14
bool m_IsFeatherInHands
Definition ActionCraftBoltsFeather.c:13
ammo pile base
Definition AmmunitionPiles.c:3
Definition InventoryItem.c:731

Перекрестные ссылки m_IsFeatherInHands и m_ResultEntity.

◆ OnStartServer()

override void OnStartServer ( ActionData action_data)
inlineprotected
56 {
57 super.OnStartServer(action_data);
58
59 m_IsFeatherInHands = IsFeatherType(action_data.m_MainItem.ClassName());
61 }

Перекрестные ссылки IsFeatherType(), m_IsFeatherInHands и m_ResultEntity.

Поля

◆ m_IsFeatherInHands

bool m_IsFeatherInHands
protected

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

◆ m_ResultEntity

Ammunition_Base m_ResultEntity
protected

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


Объявления и описания членов класса находятся в файле: