DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionSplintSelf.c
См. документацию.
8
10{
12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
17 m_SpecialtyWeight = UASoftSkillsWeight.PRECISE_LOW;
18 m_Text = "#apply_splint";
19 }
20
26
27 override bool HasTarget()
28 {
29 return false;
30 }
31
32 override void OnFinishProgressServer( ActionData action_data )
33 {
34 action_data.m_MainItem.TransferModifiers(action_data.m_Player);
35 action_data.m_Player.ApplySplint();
36
37 //Double check to not enter splinted state if legs are not broken
38 if (action_data.m_Player.GetBrokenLegs() == eBrokenLegs.BROKEN_LEGS)
39 {
40 action_data.m_Player.SetBrokenLegs(eBrokenLegs.BROKEN_LEGS_SPLINT);
41
42 ItemBase new_item = ItemBase.Cast(action_data.m_Player.GetInventory().CreateInInventory("Splint_Applied"));
43 if ( new_item )
44 {
45 MiscGameplayFunctions.TransferItemProperties(action_data.m_MainItem,new_item,true,false,true);
46 action_data.m_MainItem.Delete();
47 }
48 }
49 }
50
51 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
52 {
53 if (player.GetBrokenLegs() != eBrokenLegs.BROKEN_LEGS || IsWearingSplint(player))
54 {
55 return false;
56 }
57 return super.ActionCondition(player, target, item);
58
59 }
60
62 {
63 if ( player.GetItemOnSlot("Splint_Right") )
64 {
65 return true;
66 }
67 return false;
68 }
69};
ActionBase ActionData
Определения ActionBase.c:30
class ActionTargets ActionTarget
eBrokenLegs
Определения EBrokenLegs.c:2
float m_SpecialtyWeight
Определения ActionBase.c:77
int m_StanceMask
Определения ActionBase.c:62
string m_Text
Определения ActionBase.c:58
ref CCIBase m_ConditionItem
Определения ActionBase.c:64
bool m_FullBody
Определения ActionBase.c:61
ref CCTBase m_ConditionTarget
Определения ActionBase.c:65
ActionData m_ActionData
Определения AnimatedActionBase.c:3
void ActionContinuousBase()
Определения ActionContinuousBase.c:124
override void OnFinishProgressServer(ActionData action_data)
Определения ActionSplintSelf.c:32
bool IsWearingSplint(PlayerBase player)
Определения ActionSplintSelf.c:61
override bool HasTarget()
Определения ActionSplintSelf.c:27
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Определения ActionSplintSelf.c:51
override void CreateConditionComponents()
Определения ActionSplintSelf.c:21
void ActionSplintSelf()
Определения ActionSplintSelf.c:11
override void CreateActionComponent()
Определения ActionSplintSelf.c:3
int m_CommandUID
Определения AnimatedActionBase.c:143
Определения CCINonRuined.c:2
Определения CCTSelf.c:2
Определения InventoryItem.c:731
Определения PlayerBaseClient.c:2
const float APPLY_SPLINT
Определения ActionConstants.c:45
Определения ActionConstants.c:28
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602