Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
emotebase.c
Go to the documentation of this file.
1 class EmoteBase
2 {
3  protected PlayerBase m_Player; //useful for various conditions in child classes
4  protected int m_ID = -1;
5  protected string m_InputActionName = "";
6  protected int m_StanceMaskAdditive = 0;
7  protected int m_StanceMaskFullbody = 0;
8  protected int m_AdditiveCallbackUID = 0;
9  protected int m_FullbodyCallbackUID = 0;
10  protected bool m_HideItemInHands = false;
11 
12  bool EmoteCondition(int stancemask)
13  {
14  return true;
15  }
16 
17  bool CanBeCanceledNormally(notnull EmoteCB callback)
18  {
19  return true;
20  }
21 
23  bool EmoteFBStanceCheck(int stancemask)
24  {
25  int stanceIdx = DayZPlayerUtils.ConvertStanceMaskToStanceIdx(stancemask);
26 
27  if (!m_Player)
28  {
29  ErrorEx("No player for 'PlayerCanChangeStance'");
30  return false;
31  }
32 
33  if (stanceIdx != -1 && !DayZPlayerUtils.PlayerCanChangeStance(m_Player, stanceIdx))
34  return false;
35 
36  return true;
37  }
38 
39  bool DetermineOverride(out int callback_ID, out int stancemask, out bool is_fullbody)
40  {
41  return false;
42  }
43 
44  void OnBeforeStandardCallbackCreated(int callback_ID, int stancemask, bool is_fullbody);
45  void OnCallbackEnd();
46 
47  bool EmoteStartOverride(typename callbacktype, int id, int mask, bool fullbody)
48  {
49  return false;
50  }
51 
52  void SetOwnerPlayer(PlayerBase player)
53  {
54  m_Player = player;
55  }
56 
58 //Getters//
60  PlayerBase GetOwnerPlayer()
61  {
62  return m_Player;
63  }
64 
65  int GetID()
66  {
67  return m_ID;
68  }
69 
70  string GetInputActionName()
71  {
72  return m_InputActionName;
73  }
74 
75  int GetStanceMaskAdditive()
76  {
77  return m_StanceMaskAdditive;
78  }
79 
80  int GetStanceMaskFullbody()
81  {
82  return m_StanceMaskFullbody;
83  }
84 
85  int GetAdditiveCallbackUID()
86  {
87  return m_AdditiveCallbackUID;
88  }
89 
90  int GetFullbodyCallbackUID()
91  {
92  return m_FullbodyCallbackUID;
93  }
94 
95  bool GetHideItemInHands()
96  {
97  return m_HideItemInHands;
98  }
99  /*
100  protected int m_StanceMaskAdditive = 0;
101  protected int m_StanceMaskFullbody = 0;
102  */
103 }
DayZPlayerUtils
private void DayZPlayerUtils()
cannot be instantiated
Definition: dayzplayerutils.c:461
ErrorEx
enum ShapeType ErrorEx
EmoteBase
Definition: emotebase.c:1
PlayerBase
Definition: playerbaseclient.c:1
EmoteCB
Definition: emotemanager.c:1
m_Player
DayZPlayer m_Player
Definition: hand_events.c:42
m_ID
protected int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition: effect.c:49