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

Private Member Functions

void ActionForceABite ()
 
override void CreateConditionComponents ()
 
override void OnEndServer (ActionData action_data)
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 

Detailed Description

Definition at line 9 of file ActionForceABite.c.

Constructor & Destructor Documentation

◆ ActionForceABite()

void ActionForceABite::ActionForceABite ( )
inlineprivate

Definition at line 11 of file ActionForceABite.c.

12 {
13 m_CallbackClass = ActionForceABiteCB;
14 m_Text = "#feed_a_bite";
15 }
string m_Text
Definition ActionBase.c:49

References m_Text.

Member Function Documentation

◆ ActionCondition()

override bool ActionForceABite::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

Definition at line 29 of file ActionForceABite.c.

30 {
31 if (!super.ActionCondition(player, target, item))
32 return false;
33
34 PlayerBase target_player = PlayerBase.Cast(target.GetObject());
35
36 if (target_player)
37 return target_player.CanEatAndDrink();
38 else
39 return false;
40 }

◆ CreateConditionComponents()

override void ActionForceABite::CreateConditionComponents ( )
inlineprivate

Definition at line 17 of file ActionForceABite.c.

18 {
21 }
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.

◆ OnEndServer()

override void ActionForceABite::OnEndServer ( ActionData action_data)
inlineprivate

Definition at line 23 of file ActionForceABite.c.

24 {
25 if (action_data.m_MainItem.GetQuantity() <= 0)
26 action_data.m_MainItem.SetQuantity(0);
27 }

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