Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionpickberry.c
Go to the documentation of this file.
1
class
ActionPickBerryCB
:
ActionInteractLoopBaseCB
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
19
class
ActionPickBerry
:
ActionInteractLoopBase
20
{
21
void
ActionPickBerry
()
22
{
23
m_CommandUID =
DayZPlayerConstants
.CMD_ACTIONFB_INTERACT;
24
m_FullBody
=
true
;
25
m_StanceMask
=
DayZPlayerConstants
.STANCEMASK_CROUCH |
DayZPlayerConstants
.STANCEMASK_ERECT;
26
m_SpecialtyWeight
=
UASoftSkillsWeight
.ROUGH_MEDIUM;
27
28
m_CallbackClass =
ActionPickBerryCB
;
29
m_Text
=
"#harvest"
;
30
}
31
32
override
void
CreateConditionComponents()
33
{
34
m_ConditionTarget
=
new
CCTCursor
(
UAMaxDistances
.DEFAULT);
35
m_ConditionItem
=
new
CCINone
;
36
}
37
38
override
bool
ActionCondition(
PlayerBase
player,
ActionTarget
target,
ItemBase
item )
39
{
40
Object
targetObject = target.GetObject();
41
if
( player && targetObject && targetObject.IsWoodBase() )
42
{
43
return
true
;
44
}
45
return
false
;
46
}
47
48
//deprecated
50
//{
51
/*Object targetObject = action_data.m_Target.GetObject();
52
WoodBase ntarget = WoodBase.Cast( targetObject );
53
string drop_name = ntarget.GetMaterial(NULL);
54
float drop_quantity = ntarget.GetAmountOfMaterialPerDrop(action_data.m_MainItem);
55
56
targetObject.DecreaseHealth( "", "", (1 / Math.Max(1,ntarget.GetAmountOfDrops(action_data.m_MainItem)))*100, true );
57
58
ItemBase drop = ItemBase.Cast( GetGame().CreateObject(drop_name, action_data.m_Player.GetPosition(), false) );
59
drop.SetQuantity(drop_quantity, false);
60
61
action_data.m_Player.GetSoftSkillManager().AddSpecialty( m_SpecialtyWeight );*/
62
//}
63
};
ItemBase
Definition:
inventoryitem.c:730
ActionInteractLoopBaseCB
Definition:
actioninteractloopbase.c:1
UASoftSkillsWeight
Definition:
actionconstants.c:118
CCINone
Definition:
ccinone.c:1
ActionPickBerryCB
Definition:
actionpickberry.c:1
UAMaxDistances
Definition:
actionconstants.c:104
m_FullBody
protected bool m_FullBody
Definition:
actionbase.c:52
PlayerBase
Definition:
playerbaseclient.c:1
ActionInteractLoopBase
Definition:
actioninteractloopbase.c:37
ActionTarget
class ActionTargets ActionTarget
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition:
dayzplayer.c:601
ActionPickBerry
Definition:
actionpickberry.c:19
Object
Definition:
objecttyped.c:1
CCTCursor
Definition:
cctcursor.c:1
UATimeSpent
Definition:
actionconstants.c:26
CAInteractLoop
Definition:
cainteractloop.c:1
m_Text
protected string m_Text
Definition:
actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition:
actionbase.c:55
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition:
actionbase.c:56
m_SpecialtyWeight
protected float m_SpecialtyWeight
Definition:
actionbase.c:68
m_StanceMask
protected int m_StanceMask
Definition:
actionbase.c:53
DAYZ
scripts_v1.24.157551
scripts
world
classes
useractionscomponent
actions
interact
actionpickberry.c
Generated by
1.8.17