DayZ 1.24
Loading...
Searching...
No Matches
ActionManagerClient.c
Go to the documentation of this file.
3
4class ActionManagerClient: ActionManagerBase
5{
6
7 //Last send AcknowledgmentID (client can send more requests before recive ackfor first action)
8 protected int m_LastAcknowledgmentID;
9 protected bool m_ActionPossible;
18
20
21 protected bool m_ActionWantEndRequest_Send; //Request to server was sended
23
38
39 //pCurrentCommandID is command ID at time of call command handler, some called methods can change actual true value (need call m_Player.GetCurrentCommandID() for actual command ID)
40 override void Update(int pCurrentCommandID)
41 {
42 m_InventoryActionHandler.OnUpdate();
44 int currentCommandID = m_Player.GetCurrentCommandID();
46
47 if (m_PendingActionData) //SP only
48 {
50
52
53 if (m_CurrentActionData.m_Action.IsInstant())
55
57 }
58
60 {
62 m_CurrentActionData.m_Action.OnUpdateClient(m_CurrentActionData);
63
64 switch (m_CurrentActionData.m_State)
65 {
66 case UA_AM_PENDING:
67 break;
68
69 case UA_AM_ACCEPTED:
70 int condition_mask = ActionBase.ComputeConditionMask(m_Player, m_CurrentActionData.m_Target, m_CurrentActionData.m_MainItem);
71
72 m_CurrentActionData.m_Action.ClearInventoryReservationEx(m_CurrentActionData);
73 bool can_be_action_done = ((condition_mask & m_CurrentActionData.m_Action.m_ConditionMask) == condition_mask);
74 // check currentCommandID before start or reject
76 {
77 m_CurrentActionData.m_Action.InventoryReservation(m_CurrentActionData);
80
81 if (m_CurrentActionData.m_Action.IsInstant())
83 }
84 else
87 break;
88
89 case UA_AM_REJECTED:
92 break;
93
94 default:
97 break;
98 }
99 }
100
101#ifdef DEVELOPER
103 {
104 m_ActionPossible = false;
106 }
107 else
108 {
109#endif
111 {
112 bool isMenuOpen = false;
113#ifndef NO_GUI
114 isMenuOpen = GetGame().GetUIManager().IsMenuOpen(MENU_INVENTORY);
115#endif
117 m_Targets.Clear();
118 else
119 m_Targets.Update();
121 }
122
123 InputsUpdate();
124#ifdef DEVELOPER
125 }
126#endif
127
128 }
129
131 {
133 {
135
136 for (int i = 0; i < m_ActionsArray.Count(); i++)
137 {
138 ActionBase action = m_ActionsArray.Get(i);
139 typename input_type_name = action.GetInputType();
141
143 if (!ai)
144 {
145 ai = ActionInput.Cast(input_type_name.Spawn());
147 }
148 action.SetInput(ai);
149 }
150
151 for (int j = 0; j < m_RegistredInputsMap.Count(); j++)
152 m_RegistredInputsMap.GetElement(j).Init(player, this);
154 }
155
156 }
157
158 //Set order of inputs base of priority (output -> m_OrederedAllActionInput)
201
202 //Order for user action inputs - will be dynamically change base on context (more complex handling viz set m_OrderedStandartActionInputs in UpdateActionCategoryPriority())
236
238 {
239 ActionBase action = GetAction(actionName);
240 if (action)
241 return action.GetVariantManager();
242 //VME ACTION not exist typo most likely
243 return null;
244 }
245
246 override void RequestEndAction()
247 {
250 }
251
252 override void EndActionInput()
253 {
256 }
257
259 {
262 {
264 {
265 ActionInput ai = m_CurrentActionData.m_Action.GetInput();
266 ai.Update();
267 if (m_Player.IsQBControl())
268 {
269 if (ai.JustActivate())
270 m_Player.SetActionEndInput(m_CurrentActionData.m_Action);
271 }
272 else
273 {
274 if (ai.WasEnded() && (ai.GetInputType() == ActionInputType.AIT_CONTINUOUS || ai.GetInputType() == ActionInputType.AIT_CLICKCONTINUOUS))
276 }
277 }
278 }
279 else
280 {
282 {
283 for (int i = 0; i < m_OrederedAllActionInput.Count(); i++)
284 {
285
287 ain.Update();
288
289 if (ain.JustActivate())
290 {
291 ActionBase action = ain.GetAction();
292 if (action)
293 {
294 ActionStart(action, ain.GetUsedActionTarget(), ain.GetUsedMainItem());
295 break;
296 }
297 }
298 }
299 }
300 }
301 }
302
304 {
306 {
307 if (GetGame().IsMultiplayer() && !m_CurrentActionData.m_Action.IsLocal())
308 {
310 {
312 Debug.ActionLog("Time stamp: " + m_Player.GetSimulationTimeStamp(), m_CurrentActionData.m_Action.ToString(), "n/a", "EndRequest", m_CurrentActionData.m_Player.ToString());
315 ctx.Send();
316
318
320 m_CurrentActionData.m_Action.EndRequest(m_CurrentActionData);
321 }
322 }
323 else
324 {
326 m_CurrentActionData.m_Action.EndRequest(m_CurrentActionData);
327 }
328 }
329 }
330
332 {
334 {
335 if (GetGame().IsMultiplayer() && !m_CurrentActionData.m_Action.IsLocal())
336 {
338 {
340 Debug.ActionLog("Time stamp: " + m_Player.GetSimulationTimeStamp(), m_CurrentActionData.m_Action.ToString(), "n/a", "EndInput", m_CurrentActionData.m_Player.ToString());
343 ctxi.Send();
344
346
347 m_ActionInputWantEnd = false;
348 m_CurrentActionData.m_Action.EndInput(m_CurrentActionData);
349 }
350 }
351 else
352 {
354 {
356 m_ActionInputWantEnd = false;
357 m_CurrentActionData.m_Action.EndInput(m_CurrentActionData);
358 }
359 }
360 }
361 }
362
363 ActionBase GetPossibleAction(typename inputType)
364 {
366 if (action_input)
367 return action_input.GetAction();
368 return NULL;
369 }
370
372 {
374 if (action_input)
375 return action_input.GetPossibleActions();
376 return NULL;
377 }
378
380 {
382 if (action_input)
383 return action_input.GetPossibleActionIndex();
384 return -1;
385 }
386
388 {
390 if (action_input)
391 return action_input.GetPossibleActionsCount();
392 return 0;
393 }
394
395 //--------------------------------------------------------
396 // Alows to set different action to current contextual one
397 //--------------------------------------------------------
398 void InjectAction(ActionBase action, ActionTarget target, ItemBase item)
399 {
400 ActionInput ai = action.GetInput();
401 ai.ForceAction(action, target, item);
402 }
403
404 void InjectAction(typename actionType, ActionTarget target, ItemBase item)
405 {
406 ActionBase action = GetAction(actionType);
408 }
409
410 void EjectAction(ActionBase action)
411 {
412 ActionInput ai = action.GetInput();
413 ai.ClearForcedAction();
414 }
415
416 void EjectAction(typename actionType)
417 {
418 ActionBase action = GetAction(actionType);
420 }
421
423 {
424 Object parent = null;
426 if (targetEntity)
427 parent = targetEntity.GetHierarchyParent();
428 m_ForceTarget = new ActionTarget(targetObject, parent, -1, vector.Zero, -1);
429 }
430
432 {
434 }
435
436
437 //-------------------------------------------------------------------------
438 override ActionTarget FindActionTarget()
439 {
440 if (m_ForceTarget)
441 return m_ForceTarget;
442
443 ActionTarget action_target;
445 int targetsCount = m_Targets.GetTargetsCount();
446 if (targetsCount)
447 {
448 for (int i = 0; i < targetsCount; ++i)
449 {
450 action_target = m_Targets.GetTarget(i);
451 Object targetObject = action_target.GetObject();
452 Object targetParent = action_target.GetParent();
453
454 if (targetParent)
455 break;
456
457 if (targetObject)
458 break;
459 }
460 }
461 else
463 return action_target;
464 }
465
467 {
469 if (m_Player && m_Player.GetItemInHands() && m_Player.GetItemInHands().IsItemBase())
470 item = m_Player.GetItemInHands();
471 return item;
472 }
473
475 {
476 m_HandInventoryLocationTest.SetHands(m_Player, m_Player.GetItemInHands());
477 if (m_Player.GetHumanInventory().HasInventoryReservation(m_Player.GetItemInHands(), m_HandInventoryLocationTest))
478 return true;
479 return false;
480 }
481
483 {
484 // TODO: NEEDS OPTIMIZATION (focus on UpdatePossibleActions > CraftingManager::OnUpdate)
485
486 m_ActionsAvaibale = false;
487 if (!m_ActionPossible || HasHandInventoryReservation() || GetGame().IsInventoryOpen())
488 {
490 return;
491 }
492
493 if (!GetRunningAction())
494 {
495 ActionBase action;
496 ActionTarget target;
498
499 // Gathering current inputs
500 m_ActionsAvaibale = true;
501
504
505 int actionConditionMask = ActionBase.ComputeConditionMask(m_Player, target, item);
506 for (int i = 0; i < m_OrederedAllActionInput.Count(); i++)
507 {
509 ain.UpdatePossibleActions(m_Player, target, item, actionConditionMask);
510 }
512 }
513 }
514
515 //TOOD MW In progress
517 {
518 bool success = false;
519 if (action_data.m_Action.IsInstant())
520 {
522 Debug.ActionLog("(-) Inventory lock - Not Used", action_data.m_Action.ToString(), "n/a", "LockInventory", action_data.m_Player.ToString());
523 success = true;
524 }
525 else
526 {
528 Debug.ActionLog("(X) Inventory lock", action_data.m_Action.ToString(), "n/a", "LockInventory", action_data.m_Player.ToString());
529 if (action_data.m_Action)
530 success = action_data.m_Action.InventoryReservation(action_data);
531 }
532 return success;
533 }
535 {
537 Debug.ActionLog("(O) Inventory unlock", action_data.m_Action.ToString(), "n/a", "UnlockInventory", action_data.m_Player.ToString());
538 if (action_data.m_Action)
539 action_data.m_Action.ClearInventoryReservationEx(action_data);
540 }
541
542 protected void ActionStart(ActionBase action, ActionTarget target, ItemBase item, Param extra_data = NULL)
543 {
544 if (!m_CurrentActionData && action && ActionPossibilityCheck(m_Player.GetCurrentCommandID()))
545 {
549 m_ActionInputWantEnd = false;
550
551 if (action.CanBePerformedFromQuickbar())
552 m_Player.SetActionEndInput(action);
553
555
557 {
558 if (target)
559 Debug.ActionLog("Item = " + item + ", " + target.DumpToString(), action.ToString(), "n/a", "ActionStart", m_Player.ToString());
560 else
561 Debug.ActionLog("Item = " + item + ", no target", action.ToString(), "n/a", "ActionStart", m_Player.ToString());
562 }
563 m_Interrupted = false;
564 if (GetGame().IsMultiplayer() && !action.IsLocal())
565 {
567 {
568 DPrint("ScriptInputUserData already posted - ActionManagerClient");
569
571 Debug.ActionLog("Cannot start because ScriptInputUserData is already used", action.ToString(), "n/a", "ActionStart", m_Player.ToString());
572 return;
573 }
574 }
575
577 {
578 DPrint("Can not inicialize action" + action + " - ActionManagerClient");
580 return;
581 }
582
584 Debug.ActionLog("Action data created wait to start", action.ToString(), "n/a", "ActionStart", m_Player.ToString());
585
586 if (GetGame().IsMultiplayer() && !action.IsLocal())
587 {
590 ctx.Write(action.GetID());
591
592 action.WriteToContext(ctx, m_CurrentActionData);
593
594 if (action.UseAcknowledgment())
595 {
598
600 }
601
602 ctx.Send();
603
604 if (!action.UseAcknowledgment())
605 {
607 if (action.IsInstant())
608 OnActionEnd();
609 }
610 }
611 else
612 {
614 if (action.IsInstant())
615 OnActionEnd();
616 }
617 }
618 }
619
621 {
622 for (int i = 0; i < m_OrederedAllActionInput.Count(); i++)
623 {
625 if (action.GetInput() == ain)
626 ain.OnActionStart();
627 else
628 ain.Reset();
629 }
630 }
631
633 {
635 }
636
638 {
639 for (int i = 0; i < m_OrederedAllActionInput.Count(); i++)
640 {
642 ain.Reset();
643 }
644 }
645
647 {
648 for (int i = 0; i < m_OrederedAllActionInput.Count(); i++)
649 {
651 ain.ActionsSelectReset();
652 }
653 }
654
655 override void OnJumpStart()
656 {
658 {
660 {
661 OnActionEnd();
663 }
664 else
665 m_CurrentActionData.m_Action.Interrupt(m_CurrentActionData);
666 }
667 }
668
669 //Instant Action (Debug Actions) ---------------------------------
670 override void OnInstantAction(typename user_action_type, Param data = NULL)
671 {
672 ActionBase action = GetAction(user_action_type);
673 if (action)
675 }
676
677#ifdef BOT
680 {
682 }
683#endif
684
686 {
687 if (!GetGame().IsMultiplayer())
688 {
690
693 }
694 else
696 }
697
698 override void OnActionEnd()
699 {
701 {
703 if (m_CurrentActionData.m_Action.RemoveForceTargetAfterUse())
704 m_InventoryActionHandler.DeactiveAction();
705
706 super.OnActionEnd();
708 }
709 }
710
715
717 {
719 }
720
722 {
723 m_InventoryActionHandler.DeactiveAction();
724 }
725
730
753
768
770 {
771 int index;
772
774 {
775 if (++index >= m_OrderedStandartActionInputs.Count())
776 index = 0;
778 {
780 break;
781 }
782 }
783 }
784
786 {
787 int index;
788
790 {
791 if (--index < 0)
793
795 {
797 break;
798 }
799 }
800 }
801
802
803 override void SelectNextAction()
804 {
807 {
809 if (ai && ai.GetPossibleActionsCount() > 1)
810 ai.SelectNextAction();
811 }
812 }
813
814 override void SelectPrevAction()
815 {
818 {
820 if (ai && ai.GetPossibleActionsCount() > 1)
821 ai.SelectPrevAction();
822 }
823 }
824
826 {
827 ItemBase itemInHand = m_Player.GetItemInHands();
828 ActionTarget target;
829 target = new ActionTarget(targetItem, null, -1, vector.Zero, -1);
830 bool hasTarget = targetItem != NULL;
831
832 if (mainItem)
833 {
835 ActionBase picked_action;
836 int i;
837
839 if (actions)
840 {
841 for (i = 0; i < actions.Count(); i++)
842 {
843 picked_action = ActionBase.Cast(actions[i]);
845 {
846 if (hasTarget == picked_action.HasTarget())
847 return true;
848 }
849 }
850 }
851 //First check continuous actions
852 mainItem.GetActions(ContinuousDefaultActionInput, actions);
853 if (actions)
854 {
855 for (i = 0; i < actions.Count(); i++)
856 {
857 picked_action = ActionBase.Cast(actions[i]);
858 if (picked_action && picked_action.Can(m_Player, target, itemInHand) && picked_action.CanBePerformedFromQuickbar())
859 {
860 if (hasTarget == picked_action.HasTarget())
861 return true;
862 }
863 }
864 }
865 //second single use actions
867 if (actions)
868 {
869 for (i = 0; i < actions.Count(); i++)
870 {
871 picked_action = ActionBase.Cast(actions[i]);
872 if (picked_action && picked_action.HasTarget() && picked_action.Can(m_Player, target, itemInHand) && picked_action.CanBePerformedFromQuickbar())
873 {
874 if (hasTarget == picked_action.HasTarget())
875 return true;
876 }
877 }
878 }
879 }
880 return false;
881 }
882
884 {
885 ItemBase itemInHand = m_Player.GetItemInHands();
886 ActionTarget target;
887 ItemBase parent = null;
888 if (targetItem)
889 parent = ItemBase.Cast(targetItem.GetHierarchyParent());
890 target = new ActionTarget(targetItem, parent, -1, vector.Zero, -1);
891 bool hasTarget = targetItem != NULL;
892
893 if (mainItem)
894 {
895 ActionBase picked_action;
897 int i;
898
900 if (actions)
901 {
902 for (i = 0; i < actions.Count(); i++)
903 {
904 picked_action = ActionBase.Cast(actions[i]);
906 {
907 if (hasTarget == picked_action.HasTarget())
908 {
910 return;
911 }
912 }
913 }
914 }
915
916 //First continuous actions
917 mainItem.GetActions(ContinuousDefaultActionInput, actions);
918 if (actions)
919 {
920 for (i = 0; i < actions.Count(); i++)
921 {
922 picked_action = ActionBase.Cast(actions[i]);
923 if (picked_action && picked_action.HasTarget() && picked_action.Can(m_Player, target, itemInHand) && picked_action.CanBePerformedFromQuickbar())
924 {
925 if (hasTarget == picked_action.HasTarget())
926 {
928 return;
929 }
930 }
931 }
932 }
933 //Second check single use actions
935 if (actions)
936 {
937 for (i = 0; i < actions.Count(); i++)
938 {
939 picked_action = ActionBase.Cast(actions[i]);
940 if (picked_action && picked_action.Can(m_Player, target, itemInHand) && picked_action.CanBePerformedFromQuickbar())
941 {
942 if (hasTarget == picked_action.HasTarget())
943 {
945 return;
946 }
947 }
948 }
949 }
950
951 }
952 }
953
954 //TODO Variants support ???
956 {
957 ItemBase itemInHand = m_Player.GetItemInHands();
958 ActionTarget target;
959 target = new ActionTarget(targetItem, null, -1, vector.Zero, -1);
960 bool hasTarget = targetItem != NULL;
961
962 if (mainItem)
963 {
965 ActionBase picked_action;
966 int i;
967
968 //First check single use actions
970 if (actions)
971 {
972 for (i = 0; i < actions.Count(); i++)
973 {
974 picked_action = ActionBase.Cast(actions[i]);
975 if (picked_action && picked_action.Can(m_Player, target, itemInHand) && picked_action.CanBePerformedFromInventory())
976 {
977 if (hasTarget == picked_action.HasTarget())
978 return true;
979 }
980 }
981 }
982
983 //Inventory specific actions
985 if (actions)
986 {
987 for (i = 0; i < actions.Count(); i++)
988 {
989 picked_action = ActionBase.Cast(actions[i]);
991 {
992 if (hasTarget == picked_action.HasTarget())
993 return true;
994 }
995 }
996 }
997 }
998 return false;
999 }
1000
1001 //TODO Variants support ???
1003 {
1004 ItemBase itemInHand = m_Player.GetItemInHands();
1005 ActionTarget target;
1006 target = new ActionTarget(targetItem, null, -1, vector.Zero, -1);
1007 bool hasTarget = targetItem != NULL;
1008
1009 if (mainItem)
1010 {
1011 ActionBase picked_action;
1013 int i;
1014
1015 //First check single use actions
1016 mainItem.GetActions(DefaultActionInput, actions);
1017 if (actions)
1018 {
1019 for (i = 0; i < actions.Count(); i++)
1020 {
1021 picked_action = ActionBase.Cast(actions[i]);
1022 if (picked_action && picked_action.Can(m_Player, target, itemInHand) && picked_action.CanBePerformedFromInventory())
1023 {
1024 if (hasTarget == picked_action.HasTarget())
1025 {
1027 return;
1028 }
1029 }
1030 }
1031 }
1032
1033 //Inventory specific actions
1035 if (actions)
1036 {
1037 for (i = 0; i < actions.Count(); i++)
1038 {
1039 picked_action = ActionBase.Cast(actions[i]);
1041 {
1042 if (hasTarget == picked_action.HasTarget())
1043 {
1045 return;
1046 }
1047 }
1048 }
1049 }
1050 }
1051 }
1052
1054 {
1055 ItemBase itemInHand = m_Player.GetItemInHands();
1056 ActionTarget target;
1057 EntityAI parent = null;
1058 if (targetItem)
1059 parent = targetItem.GetHierarchyParent();
1060 target = new ActionTarget(targetItem, parent, -1, vector.Zero, -1);
1061 bool hasTarget = targetItem != NULL;
1062
1063 if (mainItem)
1064 {
1067 ActionBase picked_action;
1068 int variants_count, v;
1069
1070 //First check single use actions
1071 mainItem.GetActions(DefaultActionInput, actions);
1072 if (actions)
1073 {
1074 for (int i = 0; i < actions.Count(); i++)
1075 {
1076 picked_action = ActionBase.Cast(actions[i]);
1077 if (picked_action.HasVariants())
1078 {
1079 picked_action.UpdateVariants(itemInHand, targetItem, -1);
1080 picked_action.GetVariants(variant_actions);
1081 for (v = 0; v < variant_actions.Count(); v ++)
1082 {
1084 if (picked_action && picked_action.CanBeSetFromInventory() && picked_action.Can(m_Player, target, itemInHand))
1085 {
1086 if (hasTarget == picked_action.HasTarget())
1087 return true;
1088 }
1089 }
1090 }
1091 else
1092 {
1093 if (picked_action && picked_action.CanBeSetFromInventory() && picked_action.Can(m_Player, target, itemInHand))
1094 {
1095 if (hasTarget == picked_action.HasTarget())
1096 return true;
1097 }
1098 }
1099 }
1100 }
1101 //second continuous actions
1102 mainItem.GetActions(ContinuousDefaultActionInput, actions);
1103 if (actions)
1104 {
1105 for (int j = 0; j < actions.Count(); j++)
1106 {
1107 picked_action = ActionBase.Cast(actions[j]);
1108 if (picked_action.HasVariants())
1109 {
1110 picked_action.UpdateVariants(itemInHand, targetItem, -1);
1111 picked_action.GetVariants(variant_actions);
1112 for (v = 0; v < variant_actions.Count(); v ++)
1113 {
1115 if (picked_action && picked_action.HasTarget() && picked_action.CanBeSetFromInventory() && picked_action.Can(m_Player, target, itemInHand))
1116 {
1117 if (hasTarget == picked_action.HasTarget())
1118 return true;
1119 }
1120 }
1121 }
1122 else
1123 {
1124 if (picked_action && picked_action.HasTarget() && picked_action.CanBeSetFromInventory() && picked_action.Can(m_Player, target, itemInHand))
1125 {
1126 if (hasTarget == picked_action.HasTarget())
1127 return true;
1128 }
1129 }
1130 }
1131 }
1132 }
1133 return false;
1134 }
1135
1136 //TODO fix for variants
1138 {
1139 ItemBase itemInHand = m_Player.GetItemInHands();
1140 ActionTarget target;
1141 target = new ActionTarget(targetItem, null, -1, vector.Zero, -1);
1142 bool hasTarget = targetItem != NULL;
1143
1144 if (mainItem)
1145 {
1147 ActionBase picked_action;
1148
1149 //First check single use actions
1150 mainItem.GetActions(DefaultActionInput, actions);
1151 if (actions)
1152 {
1153 for (int i = 0; i < actions.Count(); i++)
1154 {
1155 picked_action = ActionBase.Cast(actions[i]);
1156 if (picked_action && picked_action.Can(m_Player, target, itemInHand) && picked_action.CanBeSetFromInventory())
1157 {
1158 if (hasTarget == picked_action.HasTarget())
1159 {
1161 return;
1162 }
1163 }
1164 }
1165 }
1166 //second continuous actions
1167 mainItem.GetActions(ContinuousDefaultActionInput, actions);
1168 if (actions)
1169 {
1170 for (int j = 0; j < actions.Count(); j++)
1171 {
1172 picked_action = ActionBase.Cast(actions[j]);
1173 if (picked_action && picked_action.HasTarget() && picked_action.Can(m_Player, target, itemInHand) && picked_action.CanBeSetFromInventory())
1174 {
1175 if (hasTarget == picked_action.HasTarget())
1176 {
1178 return;
1179 }
1180 }
1181 }
1182 }
1183 }
1184 }
1185
1186 override void Interrupt()
1187 {
1188 super.Interrupt();
1189
1191 m_Interrupted = true;
1192 }
1193
1196 {
1198 {
1201 ctx.Write(DayZPlayerConstants.CMD_ACTIONINT_INTERRUPT);
1202 ctx.Send();
1203 }
1204 }
1205
1206 private ref ActionTarget m_ForceTarget;
1208};
const int INPUT_UDT_STANDARD_ACTION_END_REQUEST
Definition _constants.c:3
const int INPUT_UDT_STANDARD_ACTION_START
Definition _constants.c:2
const int INPUT_UDT_STANDARD_ACTION_INPUT_END
Definition _constants.c:4
bool HasTarget()
Definition ActionBase.c:210
override ActionBase GetAction()
ActionInputType
Definition ActionInput.c:2
override int GetPossibleActionsCount()
bool m_Interrupted
ref ActionData m_CurrentActionData
void SetActionContext(ActionTarget target, ItemBase item)
bool m_ActionsAvaibale
bool m_ActionInputWantEnd
bool ActionPossibilityCheck(int pCurrentCommandID)
static ref array< ref ActionBase > m_ActionsArray
int m_PendingActionAcknowledgmentID
bool m_ActionWantEndRequest
map< typename, ref ActionInput > TTypeNameActionInputMap
map< typename, ref array< ActionBase_Basic > > TInputActionMap
class ActionTargets ActionTarget
DayZPlayer m_Player
Definition Hand_Events.c:42
override void SelectNextAction()
void SetActionFromInventory(ItemBase mainItem, ItemBase targetItem)
ref array< ActionInput > m_OrderedStandartActionInputs
override void SelectFirstActionCategory()
bool CanPerformActionFromQuickbar(ItemBase mainItem, ItemBase targetItem)
void EjectAction(typename actionType)
void RegisterInputs(PlayerBase player)
int GetPossibleActionCount(typename inputType)
array< ActionBase > GetPossibleActions(typename inputType)
override void OnActionEnd()
ActionBase GetPossibleAction(typename inputType)
void SetInventoryAction(ActionBase action_name, ItemBase target_item, ItemBase main_item)
void ActionStart(ActionBase action, ActionTarget target, ItemBase item, Param extra_data=NULL)
ref array< ref InventoryLocation > m_ReservedInventoryLocations
ref InventoryActionHandler m_InventoryActionHandler
void InjectAction(ActionBase action, ActionTarget target, ItemBase item)
override ActionTarget FindActionTarget()
void PerformActionFromQuickbar(ItemBase mainItem, ItemBase targetItem)
override void SelectNextActionCategory()
void SetInventoryAction(ActionBase action_name, ActionTarget target, ItemBase main_item)
bool LockInventory(ActionData action_data)
void FindContextualUserActions(int pCurrentCommandID)
void UnlockInventory(ActionData action_data)
override void RequestEndAction()
void PerformActionStart(ActionBase action, ActionTarget target, ItemBase item, Param extra_data=NULL)
ref array< ActionInput > m_DefaultOrderOfActionInputs
ref array< ActionInput > m_OrederedAllActionInput
override void SelectPrevAction()
void RequestInterruptAction()
client requests action interrupt
override void OnJumpStart()
void InjectAction(typename actionType, ActionTarget target, ItemBase item)
ref ActionTargets m_Targets
void PerformActionFromInventory(ItemBase mainItem, ItemBase targetItem)
override void OnInstantAction(typename user_action_type, Param data=NULL)
override void EndActionInput()
ref InventoryLocation m_HandInventoryLocationTest
override void Update(int pCurrentCommandID)
void ForceTarget(Object targetObject)
ref ActionTarget m_ForceTarget
void HandleInputsOnActionStart(ActionBase action)
bool CanPerformActionFromInventory(ItemBase mainItem, ItemBase targetItem)
ref TTypeNameActionInputMap m_RegistredInputsMap
void ActionManagerClient(PlayerBase player)
static ActionVariantManager GetVariantManager(typename actionName)
void EjectAction(ActionBase action)
int GetPossibleActionIndex(typename inputType)
ref ActionData m_PendingActionData
override void SelectPrevActionCategory()
bool CanSetActionFromInventory(ItemBase mainItem, ItemBase targetItem)
Definition Debug.c:14
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition Debug.c:143
static bool IsFreeCameraEnabled()
Client only - manage set up crafting on client.
InventoryLocation.
static bool IsActionLogEnable()
Definition Debug.c:719
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
proto static native bool CanStoreInputUserData()
static const vector Zero
Definition EnConvert.c:110
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
proto native CGame GetGame()
proto void DPrint(string var)
Prints content of variable to console/log. Should be used for critical messages so it will appear in ...
const int MENU_INVENTORY
Definition constants.c:170
const int UA_START
Definition constants.c:439
const int UA_AM_ACCEPTED
Definition constants.c:447
const int UA_AM_REJECTED
Definition constants.c:448
const int UA_AM_PENDING
Definition constants.c:446
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....