Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
actionpickberry.c
Go to the documentation of this file.
2{
3 override void CreateActionComponent()
4 {
5 m_ActionData.m_ActionComponent = new CAInteractLoop(UATimeSpent.DEFAULT_PICK);
6 }
7 /*override void OnAnimationEvent(int pEventID)
8 {
9 Print("ActionInteractLoopBase.c | OnAnimationEvent | OnAnimationEvent called");
10 if ( !m_Interrupted && pEventID == UA_ANIM_EVENT )
11 {
12 SetCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
13 m_State = UA_FINISHED;
14 m_ActionData.Do(this,m_State,m_ActionComponent,m_Player,m_Target,m_Item);
15 }
16 }*/
17};
18
21{
22 void ActionPickBerry()
23 {
24 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
25 m_FullBody = true;
26 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
27 m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_MEDIUM;
28
30 m_Text = "#harvest";
31 }
32
33 override void CreateConditionComponents()
34 {
37 }
38
39 override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
40 {
41 Object targetObject = target.GetObject();
42 if ( player && targetObject && targetObject.IsWoodBase() )
43 {
44 return true;
45 }
46 return false;
47 }
48
49 //deprecated
51 //{
52 /*Object targetObject = action_data.m_Target.GetObject();
53 WoodBase ntarget = WoodBase.Cast( targetObject );
54 string drop_name = ntarget.GetMaterial(NULL);
55 float drop_quantity = ntarget.GetAmountOfMaterialPerDrop(action_data.m_MainItem);
56
57 targetObject.DecreaseHealth( "", "", (1 / Math.Max(1,ntarget.GetAmountOfDrops(action_data.m_MainItem)))*100, true );
58
59 ItemBase drop = ItemBase.Cast( GetGame().CreateObject(drop_name, action_data.m_Player.GetPosition(), false) );
60 drop.SetQuantity(drop_quantity, false);
61
62 action_data.m_Player.GetSoftSkillManager().AddSpecialty( m_SpecialtyWeight );*/
63 //}
64};
int m_StanceMask
Definition actionbase.c:33
ActionData m_ActionData
float m_SpecialtyWeight
Definition actionbase.c:77
string m_Text
Definition actionbase.c:58
ref CCIBase m_ConditionItem
Definition actionbase.c:64
bool m_FullBody
Definition actionbase.c:61
ref CCTBase m_ConditionTarget
Definition actionbase.c:65
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602