123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- class EmoteBase
- {
- protected PlayerBase m_Player; //useful for various conditions in child classes
- protected int m_ID = -1;
- protected string m_InputActionName = "";
- protected int m_StanceMaskAdditive = 0;
- protected int m_StanceMaskFullbody = 0;
- protected int m_AdditiveCallbackUID = 0;
- protected int m_FullbodyCallbackUID = 0;
- protected bool m_HideItemInHands = false;
-
- bool EmoteCondition(int stancemask)
- {
- return true;
- }
-
- bool CanBeCanceledNormally(notnull EmoteCB callback)
- {
- return true;
- }
-
- //! Checks for valid stance mask
- bool EmoteFBStanceCheck(int stancemask)
- {
- int stanceIdx = DayZPlayerUtils.ConvertStanceMaskToStanceIdx(stancemask);
-
- if (!m_Player)
- {
- ErrorEx("No player for 'PlayerCanChangeStance'");
- return false;
- }
-
- if (stanceIdx != -1 && !DayZPlayerUtils.PlayerCanChangeStance(m_Player, stanceIdx))
- return false;
-
- return true;
- }
-
- bool DetermineOverride(out int callback_ID, out int stancemask, out bool is_fullbody)
- {
- return false;
- }
-
- void OnBeforeStandardCallbackCreated(int callback_ID, int stancemask, bool is_fullbody);
- void OnCallbackEnd();
-
- bool EmoteStartOverride(typename callbacktype, int id, int mask, bool fullbody)
- {
- return false;
- }
-
- void SetOwnerPlayer(PlayerBase player)
- {
- m_Player = player;
- }
-
- ///////////
- //Getters//
- ///////////
- PlayerBase GetOwnerPlayer()
- {
- return m_Player;
- }
-
- int GetID()
- {
- return m_ID;
- }
-
- string GetInputActionName()
- {
- return m_InputActionName;
- }
-
- int GetStanceMaskAdditive()
- {
- return m_StanceMaskAdditive;
- }
-
- int GetStanceMaskFullbody()
- {
- return m_StanceMaskFullbody;
- }
-
- int GetAdditiveCallbackUID()
- {
- return m_AdditiveCallbackUID;
- }
-
- int GetFullbodyCallbackUID()
- {
- return m_FullbodyCallbackUID;
- }
-
- bool GetHideItemInHands()
- {
- return m_HideItemInHands;
- }
- /*
- protected int m_StanceMaskAdditive = 0;
- protected int m_StanceMaskFullbody = 0;
- */
- }
|