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

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

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)
 
- Закрытые члены унаследованные от 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)
 

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

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

◆ ActionGiveBloodTarget()

void ActionGiveBloodTarget ( )
inlineprivate
12 {
15
16 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_SALINEBLOODBAGTARGET;
17 m_FullBody = true;
18 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
19 m_Text = "#give_blood_person";
20 }
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 ActionGiveBloodTarget.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.

Методы

◆ CreateActionData()

override ActionData CreateActionData ( )
inlineprivate
29 {
31 return action_data;
32 }
Definition ActionGiveBloodSelf.c:2

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
23 {
26 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINonRuined.c:2
Definition CCTMan.c:2
Definition ActionConstants.c:106
const float DEFAULT
Definition ActionConstants.c:108

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

◆ OnEndAnimationLoopServer()

override void OnEndAnimationLoopServer ( ActionData action_data)
inlineprivate
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 }
Definition ActionGiveBloodSelf.c:117

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)
inlineprivate
60 {
61 super.OnEndServer(action_data);
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 {
86 player_target.m_ModifiersManager.ActivateModifier(eModifiers.MDF_HEMOLYTIC_REACTION);
87 }
88 }
89 }
90
91 if ( action_data_b.m_MainItem && action_data_b.m_MainItem.GetQuantity() <= 0.01 )
92 {
93 action_data_b.m_MainItem.SetQuantity(0);
94 }
95
96 if (!(action_data_b.m_Agents & eAgents.CHEMICAL_POISON))//does bloodbag NOT contain nerve agent ?
97 {
99 player_target.InsertAgent(eAgents.CHEMICAL_POISON, -remove_count_agents);
100
101 }
102 }
eAgents
Definition EAgents.c:3
PluginBase GetPlugin(typename plugin_type)
Definition PluginManager.c:316
Definition ActionGiveBloodSelf.c:17
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 PlayerBaseClient.c:2
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, ActionGiveBloodSelf::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
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 }

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