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

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

void FirearmActionLoadMultiBulletQuick ()
 
override bool HasTarget ()
 
override bool HasProgress ()
 
override GetInputType ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void Start (ActionData action_data)
 
override void OnEndInput (ActionData action_data)
 

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

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

◆ FirearmActionLoadMultiBulletQuick()

100 {
101 }

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
126 {
127 if (!super.ActionCondition( player, target, item ))
128 return false;
129
131 return player.GetWeaponManager().CanLoadBullet(weapon ,player.GetWeaponManager().GetPreparedMagazine());
132 }
Definition EntityAI.c:95
shorthand
Definition BoltActionRifle_Base.c:6

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
119 {
122 }
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
114 {
116 }
Definition ActionInput.c:908

◆ HasProgress()

override bool HasProgress ( )
inlineprivate
109 {
110 return false;
111 }

◆ HasTarget()

override bool HasTarget ( )
inlineprivate
104 {
105 return false;
106 }

◆ OnEndInput()

override void OnEndInput ( ActionData action_data)
inlineprivate
166 {
167 action_data.m_Player.GetWeaponManager().LoadMultiBulletStop();
168 }

◆ Start()

override void Start ( ActionData action_data)
inlineprivate
135 {
136 super.Start( action_data );
137
138 WeaponManager weaponManager = action_data.m_Player.GetWeaponManager();
139 int idx = 0;
140 Magazine mag = weaponManager.GetNextPreparedMagazine(idx);
141 Weapon weapon = Weapon.Cast(action_data.m_Player.GetItemInHands());
142
143 int internalCount = weapon.GetInternalMagazineCartridgeCount(0);
144 int maxCount = weapon.GetInternalMagazineMaxCartridgeCount(0) + 1;
145 int total = mag.GetAmmoCount() + internalCount;
146
147 if (total < maxCount)
148 {
149 //Increment index for the first additional mag find, since GetNextPreparedMagazine does not do that
150 //Normally the mag at found index is combined right after, removing it from the suitable magazine array
151 ++idx;
152 Magazine additionalMag = weaponManager.GetNextPreparedMagazine(idx);
153
154 while ((additionalMag != null) && (total < maxCount))
155 {
156 total += additionalMag.GetAmmoCount();
157 mag.CombineItems(additionalMag);
158 additionalMag = weaponManager.GetNextPreparedMagazine(idx);
159 }
160 }
161
162 action_data.m_Player.GetWeaponManager().LoadMultiBullet(mag, this);
163 }
script counterpart to engine's class Weapon
Definition InventoryItem.c:49
Definition WeaponManager.c:2

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