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

Private Member Functions

void FirearmActionDetachMagazine_Old ()
 
override bool HasTarget ()
 
override GetInputType ()
 
override bool CanBePerformedFromQuickbar ()
 
override void CreateConditionComponents ()
 
override bool HasProgress ()
 
override bool InventoryReservation (ActionData action_data)
 
override ActionData CreateActionData ()
 
override void WriteToContext (ParamsWriteContext ctx, ActionData action_data)
 
override bool ReadFromContext (ParamsReadContext ctx, out ActionReciveData action_recive_data)
 
override void HandleReciveData (ActionReciveData action_recive_data, ActionData action_data)
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool ActionConditionContinue (ActionData action_data)
 
override void Start (ActionData action_data)
 

Detailed Description

Definition at line 10 of file FirearmActionDetachMagazine.c.

Constructor & Destructor Documentation

◆ FirearmActionDetachMagazine_Old()

void FirearmActionDetachMagazine_Old::FirearmActionDetachMagazine_Old ( )
inlineprivate

Definition at line 12 of file FirearmActionDetachMagazine.c.

13 {
14 }

Member Function Documentation

◆ ActionCondition()

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

Definition at line 108 of file FirearmActionDetachMagazine.c.

109 {
110 if (!super.ActionCondition(player, target, item))
111 return false;
112
113 Magazine mag = Magazine.Cast(target.GetObject());
115 return mag && player.GetWeaponManager().CanDetachMagazine(wpn, mag);
116 }

◆ ActionConditionContinue()

override bool FirearmActionDetachMagazine_Old::ActionConditionContinue ( ActionData action_data)
inlineprivate

Definition at line 118 of file FirearmActionDetachMagazine.c.

119 {
120 return true;
121 }

◆ CanBePerformedFromQuickbar()

override bool FirearmActionDetachMagazine_Old::CanBePerformedFromQuickbar ( )
inlineprivate

Definition at line 26 of file FirearmActionDetachMagazine.c.

27 {
28 return true;
29 }

◆ CreateActionData()

override ActionData FirearmActionDetachMagazine_Old::CreateActionData ( )
inlineprivate

Definition at line 62 of file FirearmActionDetachMagazine.c.

◆ CreateConditionComponents()

override void FirearmActionDetachMagazine_Old::CreateConditionComponents ( )
inlineprivate

Definition at line 31 of file FirearmActionDetachMagazine.c.

32 {
35 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ GetInputType()

override FirearmActionDetachMagazine_Old::GetInputType ( )
inlineprivate

Definition at line 21 of file FirearmActionDetachMagazine.c.

◆ HandleReciveData()

override void FirearmActionDetachMagazine_Old::HandleReciveData ( ActionReciveData action_recive_data,
ActionData action_data )
inlineprivate

◆ HasProgress()

override bool FirearmActionDetachMagazine_Old::HasProgress ( )
inlineprivate

Definition at line 37 of file FirearmActionDetachMagazine.c.

38 {
39 return false;
40 }

◆ HasTarget()

override bool FirearmActionDetachMagazine_Old::HasTarget ( )
inlineprivate

Definition at line 16 of file FirearmActionDetachMagazine.c.

17 {
18 return true;
19 }

◆ InventoryReservation()

override bool FirearmActionDetachMagazine_Old::InventoryReservation ( ActionData action_data)
inlineprivate

Definition at line 42 of file FirearmActionDetachMagazine.c.

43 {
44 Magazine mag = Magazine.Cast(action_data.m_Target.GetObject());
46 if (!action_data.m_Player.GetInventory().FindFreeLocationFor(mag, FindInventoryLocationType.ANY_CARGO, il))
47 return false;
48
49 if (!super.InventoryReservation(action_data))
50 return false;
51
53 if (!action_data.m_Player.GetInventory().AddInventoryReservationEx(mag, il, 10000))
54 return false;
55
56 action_data_dm.m_ReservedInventoryLocations.Insert(il);
57 action_data_dm.m_ilMagazine = il;
58
59 return true;
60 }
FindInventoryLocationType
flags for searching locations in inventory
InventoryLocation.

◆ ReadFromContext()

override bool FirearmActionDetachMagazine_Old::ReadFromContext ( ParamsReadContext ctx,
out ActionReciveData action_recive_data )
inlineprivate

Definition at line 78 of file FirearmActionDetachMagazine.c.

79 {
82
83 if (!super.ReadFromContext(ctx, action_recive_data))
84 return false;
85
88
89 recive_data_dm.m_ilMagazine = new InventoryLocation;
90
91 if (!recive_data_dm.m_ilMagazine.ReadFromContext(ctx))
92 return false;
93
94 return true;
95 }

◆ Start()

override void FirearmActionDetachMagazine_Old::Start ( ActionData action_data)
inlineprivate

Definition at line 123 of file FirearmActionDetachMagazine.c.

124 {
125 super.Start(action_data);
127
128 Weapon_Base wpn = Weapon_Base.Cast(action_data.m_MainItem);
129
130 action_data.m_Player.GetWeaponManager().DetachMagazine(action_data_dm.m_ilMagazine, this);
131 }

◆ WriteToContext()

override void FirearmActionDetachMagazine_Old::WriteToContext ( ParamsWriteContext ctx,
ActionData action_data )
inlineprivate

Definition at line 68 of file FirearmActionDetachMagazine.c.

69 {
70 super.WriteToContext(ctx, action_data);
71
74
75 action_data_dm.m_ilMagazine.WriteToContext(ctx);
76 }

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