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

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

void ActionLoadMagazineQuick ()
 
override bool HasProneException ()
 
override GetInputType ()
 
override void CreateConditionComponents ()
 
override bool HasTarget ()
 
bool CanLoadMagazine (PlayerBase player, ItemBase item)
 
override bool ActionConditionContinue (ActionData action_data)
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 
- Закрытые члены унаследованные от ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

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

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

◆ ActionLoadMagazineQuick()

void ActionLoadMagazineQuick ( )
inlineprivate
89 {
91 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_FILLMAG;
92 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_FILLMAG;
93 }
Definition ActionLoadMagazine.c:79
int m_CommandUIDProne
Definition AnimatedActionBase.c:144
int m_CommandUID
Definition AnimatedActionBase.c:143
m_CallbackClass
Definition AnimatedActionBase.c:145
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки AnimatedActionBase::m_CallbackClass, AnimatedActionBase::m_CommandUID и AnimatedActionBase::m_CommandUIDProne.

Методы

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate
129 {
130 return CanLoadMagazine(player, item);
131 }
bool CanLoadMagazine(PlayerBase player, ItemBase item)
Definition ActionLoadMagazine.c:116
Definition EntityAI.c:95

Перекрестные ссылки CanLoadMagazine().

◆ ActionConditionContinue()

override bool ActionConditionContinue ( ActionData action_data)
inlineprivate
124 {
125 return CanLoadMagazine(action_data.m_Player, action_data.m_MainItem);
126 }

Перекрестные ссылки CanLoadMagazine().

◆ CanLoadMagazine()

bool CanLoadMagazine ( PlayerBase player,
ItemBase item )
inlineprivate
117 {
118 Magazine mag = Magazine.Cast( item );
119
120 return mag && player.GetWeaponManager().GetPreparedMagazine() != null && mag.GetAmmoCount() < mag.GetAmmoMax();
121 }

Используется в ActionCondition() и ActionConditionContinue().

◆ CreateConditionComponents()

override void CreateConditionComponents ( )
inlineprivate
106 {
109 }
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
101 {
103 }
Definition ActionInput.c:908

◆ HasProneException()

override bool HasProneException ( )
inlineprivate
96 {
97 return true;
98 }

◆ HasTarget()

override bool HasTarget ( )
inlineprivate
112 {
113 return false;
114 }

◆ OnExecuteServer()

override void OnExecuteServer ( ActionData action_data)
inlineprivate
134 {
135 //Param1<float> timeSpendParam;
136 //if( !Class.CastTo(timeSpendParam, action_data.m_ActionComponent.GetACData()) ) return;
137
138 Magazine itm = Magazine.Cast(action_data.m_MainItem);
139 Magazine trg = action_data.m_Player.GetWeaponManager().GetPreparedMagazine();
140
141 if ( !itm || !trg )
142 return;
143
144 float dmg;
145 string ammoType;
146
147 if ( trg.ServerAcquireCartridge(dmg, ammoType) )
148 {
149 if ( !itm.ServerStoreCartridge(dmg, ammoType) )
150 trg.ServerStoreCartridge(dmg, ammoType);
151 else
152 itm.ApplyManipulationDamage(); //damages magazine
153 }
154
155 trg.SetSynchDirty();
156 itm.SetSynchDirty();
157 //manipulationDamage
158 //if(trg.GetAmmoCount() > 0 )
159 //trg.SetSynchDirty();
160 //itm.SetSynchDirty();
161 }

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