DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс FirearmActionDetachMagazine_Old
+ Граф наследования:FirearmActionDetachMagazine_Old:

Закрытые члены

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)
 

Подробное описание

Конструктор(ы)

◆ FirearmActionDetachMagazine_Old()

13 {
14 }

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
111 {
112 if (!super.ActionCondition( player, target, item ))
113 return false;
114
115 Magazine mag = Magazine.Cast(target.GetObject());
117 return mag && player.GetWeaponManager().CanDetachMagazine(wpn,mag);
118 }
Definition EntityAI.c:95
shorthand
Definition BoltActionRifle_Base.c:6

◆ ActionConditionContinue()

override bool ActionConditionContinue ( ActionData action_data)
inlineprivate
121 {
122 return true;
123 }

◆ CanBePerformedFromQuickbar()

override bool CanBePerformedFromQuickbar ( )
inlineprivate
27 {
28 return true;
29 }

◆ CreateActionData()

override ActionData CreateActionData ( )
inlineprivate
63 {
64 ActionData action_data = new DetachMagActionData;
65 return action_data;
66 }

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
32 {
35 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:64
ref CCTBase m_ConditionTarget
Definition ActionBase.c:65
Definition CCINonRuined.c:2
Definition CCTSelf.c:2

Перекрестные ссылки ActionBase::m_ConditionItem и ActionBase::m_ConditionTarget.

◆ GetInputType()

override GetInputType ( )
inlineprivate
22 {
24 }
Definition ActionInput.c:944

◆ HandleReciveData()

override void HandleReciveData ( ActionReciveData action_recive_data,
ActionData action_data )
inlineprivate
100 {
101 super.HandleReciveData(action_recive_data, action_data);
102
105
106 action_data_dm.m_ilMagazine = recive_data_dm.m_ilMagazine;
107 }
Definition FirearmActionDetachMagazine.c:2

◆ HasProgress()

override bool HasProgress ( )
inlineprivate
38 {
39 return false;
40 }

◆ HasTarget()

override bool HasTarget ( )
inlineprivate
17 {
18 return true;
19 }

◆ InventoryReservation()

override bool InventoryReservation ( ActionData action_data)
inlineprivate
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
Definition InventoryLocation.c:17
InventoryLocation.
Definition InventoryLocation.c:29

◆ ReadFromContext()

override bool ReadFromContext ( ParamsReadContext ctx,
out ActionReciveData action_recive_data )
inlineprivate
79 {
81 {
83 }
84
85 if(!super.ReadFromContext( ctx, action_recive_data ))
86 return false;
87
90
91 recive_data_dm.m_ilMagazine = new InventoryLocation;
92
93 if(!recive_data_dm.m_ilMagazine.ReadFromContext(ctx))
94 return false;
95
96 return true;
97 }

◆ Start()

override void Start ( ActionData action_data)
inlineprivate
126 {
127 super.Start( action_data );
129
130 Weapon_Base wpn = Weapon_Base.Cast( action_data.m_MainItem );
131
132 action_data.m_Player.GetWeaponManager().DetachMagazine(action_data_dm.m_ilMagazine,this);
133 }

◆ WriteToContext()

override void WriteToContext ( ParamsWriteContext ctx,
ActionData action_data )
inlineprivate
69 {
70 super.WriteToContext(ctx, action_data);
71
74
75 action_data_dm.m_ilMagazine.WriteToContext(ctx);
76 }

Объявления и описания членов класса находятся в файле: