3 override void CreateActionComponent()
19 m_Text =
"#give_blood_person";
22 override void CreateConditionComponents()
36 if ( super.SetupAction(player, target, item, action_data, extra_data ) )
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();
47 override void OnEndAnimationLoopServer(
ActionData action_data )
51 if ( action_data.m_MainItem.IsKindOf(
"BloodSyringe") )
54 lambda.SetTransferParams(
true,
true,
true);
55 MiscGameplayFunctions.TurnItemIntoItemEx(action_data.m_Player, lambda);
61 override void OnEndServer(
ActionData action_data)
64 float blood_obtained = action_data_b.m_BloodAmount - action_data_b.m_MainItem.GetQuantity();
68 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
72 int bloodtypetarget = player_target.GetStatBloodType().Get();
73 bool bloodmatch =
BloodTypes.MatchBloodCompatibility(action_data_b.m_ItemBloodType, bloodtypetarget);
81 player_target.m_UnconsciousEndTime = -60;
82 player_target.SetHealth(
"",
"Shock",0);
86 player_target.m_ModifiersManager.ActivateModifier(
eModifiers.MDF_HEMOLYTIC_REACTION);
91 if ( action_data_b.m_MainItem && action_data_b.m_MainItem.GetQuantity() <= 0.01 )
93 action_data_b.m_MainItem.SetQuantity(0);
96 if (!(action_data_b.m_Agents &
eAgents.CHEMICAL_POISON))
98 float remove_count_agents = blood_obtained *
ActionGiveBloodSelf.CHEM_AGENT_BLOOD_REMOVAL_MODIFIER;
99 player_target.InsertAgent(
eAgents.CHEMICAL_POISON, -remove_count_agents);