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

Private Member Functions

void ActionCollectBloodTargetLambda (EntityAI old_item, string new_item_type, PlayerBase player, float specialtyWeight, PlayerBase target, float delta)
 
override void CopyOldPropertiesToNew (notnull EntityAI old_item, EntityAI new_item)
 

Private Attributes

float m_SpecialtyWeight
 
float m_percentFilled
 
PlayerBase m_Target
 

Detailed Description

Definition at line 49 of file ActionCollectBloodTarget.c.

Constructor & Destructor Documentation

◆ ActionCollectBloodTargetLambda()

void ActionCollectBloodTargetLambda::ActionCollectBloodTargetLambda ( EntityAI old_item,
string new_item_type,
PlayerBase player,
float specialtyWeight,
PlayerBase target,
float delta )
inlineprivate

Member Function Documentation

◆ CopyOldPropertiesToNew()

override void ActionCollectBloodTargetLambda::CopyOldPropertiesToNew ( notnull EntityAI old_item,
EntityAI new_item )
inlineprivate

Definition at line 57 of file ActionCollectBloodTarget.c.

58 {
59 float maxQuantity;
60 float quantitySet;
61 super.CopyOldPropertiesToNew(old_item, new_item);
62
63 if (new_item)
64 {
67
68 ItemBase.Cast(old_item).TransferModifiers(m_Target);
69 MiscGameplayFunctions.TransferItemProperties(old_item_IB, new_item_IB, true, false, true);
70 ItemBase.Cast(new_item).SetLiquidType(m_Target.GetStatBloodType().Get());
71 m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
72
73 maxQuantity = ItemBase.Cast(new_item).GetQuantityMax();
75 ItemBase.Cast(new_item).SetQuantity(quantitySet);
76 m_Target.AddHealth("", "Blood", -quantitySet);
77
78 if (m_Player.HasBloodTypeVisible())
79 BloodContainerBase.Cast(new_item).SetBloodTypeVisible(true);
80 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(GetPlugin(PluginTransmissionAgents));
82 }
83 else
84 Debug.LogError("ActionCollectBloodTargetLambda: failed to create new item", "static");
85 }
PluginBase GetPlugin(typename plugin_type)
Definition Debug.c:14
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Definition Debug.c:341
const int AGT_UACTION_TO_ITEM
Definition constants.c:474

References AGT_UACTION_TO_ITEM, GetPlugin(), Debug::LogError(), m_percentFilled, ReplaceItemWithNewLambda::m_Player, m_SpecialtyWeight, and m_Target.

Member Data Documentation

◆ m_percentFilled

float ActionCollectBloodTargetLambda::m_percentFilled
private

◆ m_SpecialtyWeight

float ActionCollectBloodTargetLambda::m_SpecialtyWeight
private

◆ m_Target

PlayerBase ActionCollectBloodTargetLambda::m_Target
private

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