DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionPin.c
См. документацию.
1class ActionPin extends ActionSingleUseBase
2{
3 void ActionPin()
4 {
5 m_Text = "#pin";
6 }
7
13
14 override bool HasTarget()
15 {
16 return false;
17 }
18
19 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
20 {
21 /*
22 if ( item.IsInherited(Grenade_Base) )
23 {
24 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_PINGRENAGE;
25 }
26 else
27 */
28 {
29 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_ITEM_ON;
30 }
31
32 Grenade_Base grenade = Grenade_Base.Cast(item);
33 if( grenade )
34 {
35 if( !grenade.IsPinned() && grenade.IsPinnable() )
36 {
37 return true;
38 }
39 }
40
41 return false;
42 }
43
44 override void OnExecute( ActionData action_data )
45 {
46 Grenade_Base grenade = Grenade_Base.Cast(action_data.m_MainItem);
47 if( grenade )
48 {
49 grenade.Pin();
50 }
51 }
52}
ActionBase ActionData
Определения ActionBase.c:30
class ActionTargets ActionTarget
string m_Text
Определения ActionBase.c:58
ref CCIBase m_ConditionItem
Определения ActionBase.c:64
ref CCTBase m_ConditionTarget
Определения ActionBase.c:65
override bool HasTarget()
Определения ActionPin.c:14
override void OnExecute(ActionData action_data)
Определения ActionPin.c:44
override void CreateConditionComponents()
Определения ActionPin.c:8
void ActionPin()
Определения ActionPin.c:3
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Определения ActionPin.c:19
int m_CommandUID
Определения AnimatedActionBase.c:143
Определения CCINonRuined.c:2
Определения CCTNone.c:2
bool IsPinnable()
Определения Grenade_Base.c:79
bool IsPinned()
Определения Grenade_Base.c:74
void Pin()
Определения Grenade_Base.c:44
Определения FlashGrenade.c:2
Определения InventoryItem.c:731
Определения PlayerBaseClient.c:2
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602