DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл FirearmActionLoadBullet.c

См. исходные тексты.

Структуры данных

class  FirearmActionLoadBullet
 

Функции

FirearmActionLoadBullet FirearmActionBase FirearmActionLoadBulletQuick ()
 
void FirearmActionLoadBullet ()
 
override int GetActionCategory ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void Start (ActionData action_data)
 
override Object GetDisplayInteractObject (PlayerBase player, ActionTarget target)
 
override bool CanBePerformedFromInventory ()
 
override bool CanBePerformedFromQuickbar ()
 
override GetInputType ()
 
override void CreateConditionComponents ()
 
override bool HasProgress ()
 
override bool SetupAction (PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
 

Функции

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
14 {
15 if (!super.ActionCondition(player, target, item))
16 return false;
17
18 HumanCommandWeapons hcw = player.GetCommandModifier_Weapons();
19 if (!target.GetObject())
20 return false;
21
23 EntityAI entity = EntityAI.Cast(target.GetObject());
24 if (entity && entity.IsManagingArrows() && entity.IsDamageDestroyed())
25 {
26 ArrowManagerBase arrowManager = ArrowManagerBase.Cast(entity.GetArrowManager());
27 if (arrowManager)
28 mag = Magazine.Cast(arrowManager.GetFirstArrow());
29 }
30 else
31 mag = Magazine.Cast(target.GetObject());
32
Definition ArrowManagerBase.c:2
Definition Building.c:6
Definition human.c:994
Definition EntityAI.c:95

◆ CanBePerformedFromInventory()

override bool CanBePerformedFromInventory ( )

◆ CanBePerformedFromQuickbar()

override bool CanBePerformedFromQuickbar ( )

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
92 {
93 m_ConditionItem = new CCINonRuined();
94 m_ConditionTarget = new CCTSelf();
95 }
Definition CCINonRuined.c:2
Definition CCTSelf.c:2

◆ FirearmActionLoadBullet()

void FirearmActionLoadBullet ( )
1{
void FirearmActionLoadBullet()
Definition FirearmActionLoadBullet.c:0
Definition FirearmActionBase.c:2

◆ FirearmActionLoadBulletQuick()

◆ GetActionCategory()

override int GetActionCategory ( )

◆ GetDisplayInteractObject()

override Object GetDisplayInteractObject ( PlayerBase player,
ActionTarget target )
59 {
60 EntityAI entity = EntityAI.Cast(target.GetObject());
61 if (!entity || (entity && entity.IsManagingArrows() && !entity.IsDamageDestroyed()))
62 return null;
63
64 ArrowManagerBase arrowManager = entity.GetArrowManager();
65 if (arrowManager)
66 return arrowManager.GetFirstArrow();

◆ GetInputType()

override GetInputType ( )
87 {
89 }
Definition ActionInput.c:908

◆ HasProgress()

override bool HasProgress ( )
98 {
99 return false;
100 }

◆ SetupAction()

override bool SetupAction ( PlayerBase player,
ActionTarget target,
ItemBase item,
out ActionData action_data,
Param extra_data = NULL )
114 {
115 if (super.SetupAction(player, target, item, action_data, extra_data))
116 {
117 #ifndef SERVER
118 ActionTarget newTarget = new ActionTarget(player.GetWeaponManager().GetPreparedMagazine(), null, -1, vector.Zero, -1);
119 action_data.m_Target = newTarget;
120 #endif
121
122 return true;
123 }
124
125 return false;
126 }
class ActionTargets ActionTarget
Definition EnConvert.c:106
static const vector Zero
Definition EnConvert.c:110

Перекрестные ссылки ActionTarget и vector::Zero.

◆ Start()

override void Start ( ActionData action_data)
38 {
39 super.Start(action_data);
40
42 EntityAI entity = EntityAI.Cast(action_data.m_Target.GetObject());
43 if (entity && entity.IsManagingArrows() && entity.IsDamageDestroyed())
44 {
45 ArrowManagerBase arrowManager = ArrowManagerBase.Cast(entity.GetArrowManager());
46 if (arrowManager)
47 {
48 mag = Magazine.Cast(arrowManager.AcquireFirstArrow(false));
49 mag.SetPosition(action_data.m_Player.GetPosition());
50 }
51 }
52 else
53 mag = Magazine.Cast(action_data.m_Target.GetObject());