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

Закрытые члены

void ActionGiveBloodSelf ()
 
override void CreateConditionComponents ()
 
override bool HasTarget ()
 
override ActionData CreateActionData ()
 
override bool SetupAction (PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
 
override void OnEndAnimationLoopServer (ActionData action_data)
 
override void OnEndServer (ActionData action_data)
 
- Закрытые члены унаследованные от 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)
 

Закрытые данные

const float CHEM_AGENT_BLOOD_REMOVAL_MODIFIER = 0.25
 

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

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

◆ ActionGiveBloodSelf()

void ActionGiveBloodSelf ( )
inlineprivate
20 {
23
24 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_SALINEBLOODBAG;
25 m_FullBody = true;
26 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
27 m_Text = "#give_blood";
28 }
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
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.

Методы

◆ CreateActionData()

override ActionData CreateActionData ( )
inlineprivate
42 {
44 return action_data;
45 }
Definition ActionGiveBloodSelf.c:2

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
31 {
34 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINotRuinedAndEmpty.c:2
Definition CCTSelf.c:2

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

◆ HasTarget()

override bool HasTarget ( )
inlineprivate
37 {
38 return false;
39 }

◆ OnEndAnimationLoopServer()

override void OnEndAnimationLoopServer ( ActionData action_data)
inlineprivate
61 {
62 //OnFinishProgressServer(action_data);
63
64 if ( action_data.m_MainItem.IsKindOf("BloodSyringe") )
65 {
66 SyringeLambda lambda = new SyringeLambda(action_data.m_MainItem, "Syringe", action_data.m_Player);
67 lambda.SetTransferParams(true, true, true);
68 MiscGameplayFunctions.TurnItemIntoItemEx(action_data.m_Player, lambda);
69 }
70 }
Definition ActionGiveBloodSelf.c:117

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)
inlineprivate
73 {
74 super.OnEndServer(action_data);
75
77 float blood_obtained = action_data_b.m_BloodAmount - action_data_b.m_MainItem.GetQuantity();
78
79 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(GetPlugin(PluginTransmissionAgents));
80 plugin.TransmitAgentsEx(action_data.m_MainItem, action_data.m_Player, AGT_UACTION_TO_PLAYER,blood_obtained ,action_data_b.m_Agents);
81
82
83 int bloodtypetarget = action_data_b.m_Player.GetStatBloodType().Get();
85
86 if ( !bloodmatch )
87 {
88
89
91 {
92 action_data_b.m_Player.m_UnconsciousEndTime = -60;
93 action_data_b.m_Player.SetHealth("","Shock",0);
94
96 {
97 action_data_b.m_Player.m_ModifiersManager.ActivateModifier(eModifiers.MDF_HEMOLYTIC_REACTION);
98 }
99 }
100 }
101
102 if ( action_data_b.m_MainItem && action_data_b.m_MainItem.GetQuantity() <= 0.01 )
103 {
104 action_data_b.m_MainItem.SetQuantity(0);
105 }
106
107 if (!(action_data_b.m_Agents & eAgents.CHEMICAL_POISON))//does bloodbag NOT contain nerve agent ?
108 {
110 action_data.m_Player.InsertAgent(eAgents.CHEMICAL_POISON, -remove_count_agents);
111
112 }
113 }
eAgents
Definition EAgents.c:3
PluginBase GetPlugin(typename plugin_type)
Definition PluginManager.c:316
const float CHEM_AGENT_BLOOD_REMOVAL_MODIFIER
Definition ActionGiveBloodSelf.c:18
Definition BloodType.c:2
static bool MatchBloodCompatibility(int bloodtypetarget, int bloodtype)
Definition BloodType.c:39
Definition PlayerConstants.c:2
static const float HEMOLYTIC_RISK_SHOCK_THRESHOLD
Definition PlayerConstants.c:108
static const float HEMOLYTIC_REACTION_THRESHOLD
Definition PlayerConstants.c:109
eModifiers
Definition eModifiers.c:2
const int AGT_UACTION_TO_PLAYER
Definition constants.c:481

Перекрестные ссылки AGT_UACTION_TO_PLAYER, CHEM_AGENT_BLOOD_REMOVAL_MODIFIER, GetPlugin(), PlayerConstants::HEMOLYTIC_REACTION_THRESHOLD, PlayerConstants::HEMOLYTIC_RISK_SHOCK_THRESHOLD и BloodTypes::MatchBloodCompatibility().

◆ SetupAction()

override bool SetupAction ( PlayerBase player,
ActionTarget target,
ItemBase item,
out ActionData action_data,
Param extra_data = NULL )
inlineprivate
48 {
49 if ( super.SetupAction(player, target, item, action_data, extra_data ) )
50 {
52 action_data_b.m_ItemBloodType = action_data.m_MainItem.GetLiquidType();
53 action_data_b.m_BloodAmount = action_data.m_MainItem.GetQuantity();
54 action_data_b.m_Agents = action_data.m_MainItem.GetAgents();
55 return true;
56 }
57 return false;
58 }

Поля

◆ CHEM_AGENT_BLOOD_REMOVAL_MODIFIER

const float CHEM_AGENT_BLOOD_REMOVAL_MODIFIER = 0.25
private

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


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