Dayz 1.25
Dayz Code 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:52
string m_Text
Definition ActionBase.c:49
float m_SpecialtyWeight
Definition ActionBase.c:68
int m_StanceMask
Definition ActionBase.c:53
Definition ActionCraftBoltsFeather.c:2
int m_CommandUID
Definition AnimatedActionBase.c:135
m_CallbackClass
Definition AnimatedActionBase.c:137
Definition ActionConstants.c:119
const float ROUGH_HIGH
Definition ActionConstants.c:122
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

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

Методы

◆ 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
Definition EntityAI.c:95

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

◆ CreateConditionComponents()

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

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

◆ IsFeatherType()

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

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

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)
inlineprotected
62 {
65
66 bool added = false;
67
69 {
70 //feather in hands
71 feather = action_data.m_MainItem;
72 bolt = Ammunition_Base.Cast(action_data.m_Target.GetObject());
73 }
74 else
75 {
76 // bolt in hands
77 bolt = Ammunition_Base.Cast(action_data.m_MainItem);
78 feather = ItemBase.Cast(action_data.m_Target.GetObject());
79 }
80
81 if (!bolt || !feather)
82 return;
83
84 float dmg;
85 string type;
86
87 bolt.ServerAcquireCartridge(dmg, type);
88
90 {
91 type = m_ResultEntity.ConfigGetString("Ammo");
92 if (m_ResultEntity.GetAmmoCount() < m_ResultEntity.GetAmmoMax())
93 {
94 m_ResultEntity.ServerStoreCartridge(dmg, type);
95 added = true;
96 }
97 }
98
99 if (!added)
100 {
101 m_ResultEntity = Ammunition_Base.Cast(action_data.m_Player.SpawnEntityOnGroundPos("Ammo_ImprovisedBolt_2", action_data.m_Player.GetPosition()));
102 type = m_ResultEntity.ConfigGetString("Ammo");
103 m_ResultEntity.ServerSetAmmoCount(0);
104 m_ResultEntity.ServerStoreCartridge(dmg, type);
105 m_ResultEntity.SetHealth01("", "", bolt.GetHealth01("", ""));
106 }
107
108 feather.AddQuantity(-1);
109 }
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 m_IsFeatherInHands = IsFeatherType(action_data.m_MainItem.ClassName());
59 }

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

Поля

◆ m_IsFeatherInHands

bool m_IsFeatherInHands
protected

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

◆ m_ResultEntity

Ammunition_Base m_ResultEntity
protected

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


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