DayZ 1.24
Loading...
Searching...
No Matches
ActionGiveBloodSelf Class Reference
Inheritance diagram for ActionGiveBloodSelf:
[legend]
Collaboration diagram for ActionGiveBloodSelf:
[legend]

Private Member Functions

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)
 
- Private Member Functions inherited from 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)
 

Private Attributes

const float CHEM_AGENT_BLOOD_REMOVAL_MODIFIER = 0.25
 

Detailed Description

Definition at line 16 of file ActionGiveBloodSelf.c.

Constructor & Destructor Documentation

◆ ActionGiveBloodSelf()

void ActionGiveBloodSelf::ActionGiveBloodSelf ( )
inlineprivate

Definition at line 19 of file ActionGiveBloodSelf.c.

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:52
string m_Text
Definition ActionBase.c:49
float m_SpecialtyWeight
Definition ActionBase.c:68
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References AnimatedActionBase::m_CallbackClass, AnimatedActionBase::m_CommandUID, m_FullBody, m_SpecialtyWeight, m_StanceMask, m_Text, and UASoftSkillsWeight::PRECISE_HIGH.

Member Function Documentation

◆ CreateActionData()

override ActionData ActionGiveBloodSelf::CreateActionData ( )
inlineprivate

◆ CreateConditionComponents()

override void ActionGiveBloodSelf::CreateConditionComponents ( )
inlineprivate

Definition at line 30 of file ActionGiveBloodSelf.c.

31 {
34 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ HasTarget()

override bool ActionGiveBloodSelf::HasTarget ( )
inlineprivate

Definition at line 36 of file ActionGiveBloodSelf.c.

37 {
38 return false;
39 }

◆ OnEndAnimationLoopServer()

override void ActionGiveBloodSelf::OnEndAnimationLoopServer ( ActionData action_data)
inlineprivate

Definition at line 60 of file ActionGiveBloodSelf.c.

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
71 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
72 }

References m_SpecialtyWeight.

◆ OnEndServer()

override void ActionGiveBloodSelf::OnEndServer ( ActionData action_data)
inlineprivate

Definition at line 74 of file ActionGiveBloodSelf.c.

75 {
76
78 float blood_obtained = action_data_b.m_BloodAmount - action_data_b.m_MainItem.GetQuantity();
79
80 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(GetPlugin(PluginTransmissionAgents));
81 plugin.TransmitAgentsEx(action_data.m_MainItem, action_data.m_Player, AGT_UACTION_TO_PLAYER, blood_obtained, action_data_b.m_Agents);
82
83
84 int bloodtypetarget = action_data_b.m_Player.GetStatBloodType().Get();
86
87 if (!bloodmatch)
88 {
89
90
92 {
93 action_data_b.m_Player.m_UnconsciousEndTime = -60;
94 action_data_b.m_Player.SetHealth("", "Shock", 0);
95
97 action_data_b.m_Player.m_ModifiersManager.ActivateModifier(eModifiers.MDF_HEMOLYTIC_REACTION);
98 }
99 }
100
101 if (action_data_b.m_MainItem && action_data_b.m_MainItem.GetQuantity() <= 0.01)
102 action_data_b.m_MainItem.SetQuantity(0);
103
104 if (!(action_data_b.m_Agents & eAgents.CHEMICAL_POISON))//does bloodbag NOT contain nerve agent ?
105 {
107 action_data.m_Player.InsertAgent(eAgents.CHEMICAL_POISON, -remove_count_agents);
108
109 }
110 }
eAgents
Definition EAgents.c:3
PluginBase GetPlugin(typename plugin_type)
const float CHEM_AGENT_BLOOD_REMOVAL_MODIFIER
static bool MatchBloodCompatibility(int bloodtypetarget, int bloodtype)
Definition BloodType.c:36
static const float HEMOLYTIC_RISK_SHOCK_THRESHOLD
static const float HEMOLYTIC_REACTION_THRESHOLD
eModifiers
Definition eModifiers.c:2
const int AGT_UACTION_TO_PLAYER
Definition constants.c:473

References AGT_UACTION_TO_PLAYER, CHEM_AGENT_BLOOD_REMOVAL_MODIFIER, GetPlugin(), PlayerConstants::HEMOLYTIC_REACTION_THRESHOLD, PlayerConstants::HEMOLYTIC_RISK_SHOCK_THRESHOLD, and BloodTypes::MatchBloodCompatibility().

◆ SetupAction()

override bool ActionGiveBloodSelf::SetupAction ( PlayerBase player,
ActionTarget target,
ItemBase item,
out ActionData action_data,
Param extra_data = NULL )
inlineprivate

Definition at line 47 of file ActionGiveBloodSelf.c.

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 }

Member Data Documentation

◆ CHEM_AGENT_BLOOD_REMOVAL_MODIFIER

const float ActionGiveBloodSelf::CHEM_AGENT_BLOOD_REMOVAL_MODIFIER = 0.25
private

Definition at line 18 of file ActionGiveBloodSelf.c.

Referenced by OnEndServer(), and ActionGiveBloodTarget::OnEndServer().


The documentation for this class was generated from the following file: