60 {
61 super.OnEndServer(action_data);
62
63 ActionGiveBloodData action_data_b = ActionGiveBloodData.Cast( action_data );
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();
73 bool bloodmatch = BloodTypes.MatchBloodCompatibility(action_data_b.
m_ItemBloodType, bloodtypetarget);
74
75 if ( !bloodmatch )
76 {
77
78
79 if (blood_obtained > PlayerConstants.HEMOLYTIC_RISK_SHOCK_THRESHOLD)
80 {
81 player_target.m_UnconsciousEndTime = -60;
82 player_target.SetHealth("","Shock",0);
83
84 if (blood_obtained > PlayerConstants.HEMOLYTIC_REACTION_THRESHOLD)
85 {
86 player_target.m_ModifiersManager.ActivateModifier(
eModifiers.MDF_HEMOLYTIC_REACTION);
87 }
88 }
89 }
90
92 {
94 }
95
97 {
98 float remove_count_agents = blood_obtained * ActionGiveBloodSelf.CHEM_AGENT_BLOOD_REMOVAL_MODIFIER;
99 player_target.InsertAgent(
eAgents.CHEMICAL_POISON, -remove_count_agents);
100
101 }
102 }
PluginBase GetPlugin(typename plugin_type)
ref ActionTarget m_Target
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
const int AGT_UACTION_TO_PLAYER