DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionSplintTarget.c
См. документацию.
8
10{
12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_BANDAGETARGET;
15 m_FullBody = true;
16 m_SpecialtyWeight = UASoftSkillsWeight.PRECISE_LOW;
17 m_Text = "#fix_persons_fracture";
18 }
19
25
26 override void OnFinishProgressServer( ActionData action_data )
27 {
28 PlayerBase ntarget = PlayerBase.Cast( action_data.m_Target.GetObject() );
29 if (CanReceiveAction(action_data.m_Target))
30 {
31 action_data.m_MainItem.TransferModifiers(ntarget);
32 ntarget.ApplySplint();
33
34 ItemBase new_item = ItemBase.Cast(ntarget.GetInventory().CreateInInventory("Splint_Applied"));
35 if ( new_item )
36 {
37 MiscGameplayFunctions.TransferItemProperties(action_data.m_MainItem,new_item,true,false,true);
38 action_data.m_MainItem.Delete();
39 }
40
41 ntarget.SetBrokenLegs(eBrokenLegs.BROKEN_LEGS_SPLINT);
42 }
43 }
44
45 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
46 {
47 PlayerBase ntarget = PlayerBase.Cast( target.GetObject() );
48 if (ntarget.GetBrokenLegs() != eBrokenLegs.BROKEN_LEGS || IsWearingSplint(ntarget))
49 {
50 return false;
51 }
52 return super.ActionCondition(player, target, item);
53
54 }
55
57 {
58 if ( player.GetItemOnSlot("Splint_Right") )
59 {
60 return true;
61 }
62 return false;
63 }
64};
ActionBase ActionData
Определения ActionBase.c:30
class ActionTargets ActionTarget
eBrokenLegs
Определения EBrokenLegs.c:2
float m_SpecialtyWeight
Определения ActionBase.c:77
string m_Text
Определения ActionBase.c:58
ref CCIBase m_ConditionItem
Определения ActionBase.c:64
bool CanReceiveAction(ActionTarget target)
Определения ActionBase.c:793
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)
Определения ActionSplintTarget.c:26
void ActionSplintTarget()
Определения ActionSplintTarget.c:11
override void CreateConditionComponents()
Определения ActionSplintTarget.c:20
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Определения ActionSplintTarget.c:45
bool IsWearingSplint(PlayerBase player)
Определения ActionSplintTarget.c:56
override void CreateActionComponent()
Определения ActionSplintTarget.c:3
int m_CommandUID
Определения AnimatedActionBase.c:143
Определения CCINonRuined.c:2
Определения CCTMan.c:2
Определения InventoryItem.c:731
Определения PlayerBaseClient.c:2
const float DEFAULT
Определения ActionConstants.c:112
const float APPLY_SPLINT
Определения ActionConstants.c:45
Определения ActionConstants.c:28
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602