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

Private Member Functions

void ActionGiveBloodTarget ()
 
override void CreateConditionComponents ()
 
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)
 

Detailed Description

Definition at line 9 of file ActionGiveBloodTarget.c.

Constructor & Destructor Documentation

◆ ActionGiveBloodTarget()

void ActionGiveBloodTarget::ActionGiveBloodTarget ( )
inlineprivate

Member Function Documentation

◆ CreateActionData()

override ActionData ActionGiveBloodTarget::CreateActionData ( )
inlineprivate

◆ CreateConditionComponents()

override void ActionGiveBloodTarget::CreateConditionComponents ( )
inlineprivate

Definition at line 22 of file ActionGiveBloodTarget.c.

23 {
26 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
Definition CCTMan.c:2
const float DEFAULT

References UAMaxDistances::DEFAULT, m_ConditionItem, and m_ConditionTarget.

◆ OnEndAnimationLoopServer()

override void ActionGiveBloodTarget::OnEndAnimationLoopServer ( ActionData action_data)
inlineprivate

Definition at line 47 of file ActionGiveBloodTarget.c.

48 {
49 //OnFinishProgressServer(action_data);
50
51 if (action_data.m_MainItem.IsKindOf("BloodSyringe"))
52 {
53 SyringeLambda lambda = new SyringeLambda(action_data.m_MainItem, "Syringe", action_data.m_Player);
54 lambda.SetTransferParams(true, true, true);
55 MiscGameplayFunctions.TurnItemIntoItemEx(action_data.m_Player, lambda);
56 }
57
58 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
59 }

References m_SpecialtyWeight.

◆ OnEndServer()

override void ActionGiveBloodTarget::OnEndServer ( ActionData action_data)
inlineprivate

Definition at line 61 of file ActionGiveBloodTarget.c.

62 {
64 float blood_obtained = action_data_b.m_BloodAmount - action_data_b.m_MainItem.GetQuantity();
65 PlayerBase player_target = PlayerBase.Cast(action_data_b.m_Target.GetObject());
66
67
68 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(GetPlugin(PluginTransmissionAgents));
70
71
72 int bloodtypetarget = player_target.GetStatBloodType().Get();
74
75 if (!bloodmatch)
76 {
77
78
80 {
81 player_target.m_UnconsciousEndTime = -60;
82 player_target.SetHealth("", "Shock", 0);
83
85 player_target.m_ModifiersManager.ActivateModifier(eModifiers.MDF_HEMOLYTIC_REACTION);
86 }
87 }
88
89 if (action_data_b.m_MainItem && action_data_b.m_MainItem.GetQuantity() <= 0.01)
90 action_data_b.m_MainItem.SetQuantity(0);
91
92 if (!(action_data_b.m_Agents & eAgents.CHEMICAL_POISON))//does bloodbag NOT contain nerve agent ?
93 {
95 player_target.InsertAgent(eAgents.CHEMICAL_POISON, -remove_count_agents);
96
97 }
98 }
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, ActionGiveBloodSelf::CHEM_AGENT_BLOOD_REMOVAL_MODIFIER, GetPlugin(), PlayerConstants::HEMOLYTIC_REACTION_THRESHOLD, PlayerConstants::HEMOLYTIC_RISK_SHOCK_THRESHOLD, and BloodTypes::MatchBloodCompatibility().

◆ SetupAction()

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

Definition at line 34 of file ActionGiveBloodTarget.c.

35 {
36 if (super.SetupAction(player, target, item, action_data, extra_data))
37 {
39 action_data_b.m_ItemBloodType = action_data.m_MainItem.GetLiquidType();
40 action_data_b.m_BloodAmount = action_data.m_MainItem.GetQuantity();
41 action_data_b.m_Agents = action_data.m_MainItem.GetAgents();
42 return true;
43 }
44 return false;
45 }

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