DayZ 1.24
Loading...
Searching...
No Matches
ActionPickBerry.c
Go to the documentation of this file.
2{
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
20{
22 {
23 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
24 m_FullBody = true;
25 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
27
29 m_Text = "#harvest";
30 }
31
37
38 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
39 {
40 Object targetObject = target.GetObject();
41 if (player && targetObject && targetObject.IsWoodBase())
42 return true;
43 return false;
44 }
45
46 //deprecated
48 //{
49 /*Object targetObject = action_data.m_Target.GetObject();
50 WoodBase ntarget = WoodBase.Cast( targetObject );
51 string drop_name = ntarget.GetMaterial(NULL);
52 float drop_quantity = ntarget.GetAmountOfMaterialPerDrop(action_data.m_MainItem);
53
54 targetObject.DecreaseHealth( "", "", (1 / Math.Max(1,ntarget.GetAmountOfDrops(action_data.m_MainItem)))*100, true );
55
56 ItemBase drop = ItemBase.Cast( GetGame().CreateObject(drop_name, action_data.m_Player.GetPosition(), false) );
57 drop.SetQuantity(drop_quantity, false);
58
59 action_data.m_Player.GetSoftSkillManager().AddSpecialty( m_SpecialtyWeight );*/
60 //}
61};
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
int m_StanceMask
Definition ActionBase.c:53
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void CreateActionComponent()
override void CreateConditionComponents()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
const float DEFAULT
const float DEFAULT_PICK
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597