DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ActionStart()

void ActionManagerClient::ActionStart ( ActionBase action,
ActionTarget target,
ItemBase item,
Param extra_data = NULL )
inlineprotected

См. определение в файле ActionManagerClient.c строка 598

599 {
600 if (!m_CurrentActionData && action && ActionPossibilityCheck(m_Player.GetCurrentCommandID()))
601 {
605 m_ActionInputWantEnd = false;
606
607 if (action.CanBePerformedFromQuickbar())
608 m_Player.SetActionEndInput(action);
609
611
612 if (LogManager.IsActionLogEnable())
613 {
614 if ( target )
615 {
616 Debug.ActionLog("Item = " + item + ", " + target.DumpToString(), action.ToString() , "n/a", "ActionStart", m_Player.ToString());
617 }
618 else
619 {
620 Debug.ActionLog("Item = " + item + ", no target", action.ToString() , "n/a", "ActionStart", m_Player.ToString());
621 }
622 }
623 m_Interrupted = false;
624 if (GetGame().IsMultiplayer() && !action.IsLocal())
625 {
626 if (!ScriptInputUserData.CanStoreInputUserData())
627 {
628 DPrint("ScriptInputUserData already posted - ActionManagerClient");
629
630 if (LogManager.IsActionLogEnable())
631 {
632 Debug.ActionLog("Cannot start because ScriptInputUserData is already used", action.ToString() , "n/a", "ActionStart", m_Player.ToString());
633 }
634 return;
635 }
636 }
637
638 if (!action.SetupAction(m_Player, target, item, m_CurrentActionData, extra_data))
639 {
640 DPrint("Can not inicialize action" + action + " - ActionManagerClient");
641 m_CurrentActionData = NULL;
642 return;
643 }
644
645 if (LogManager.IsActionLogEnable())
646 {
647 Debug.ActionLog("Action data created wait to start", action.ToString() , "n/a", "ActionStart", m_Player.ToString());
648 }
649
650 if (GetGame().IsMultiplayer() && !action.IsLocal())
651 {
652 ScriptInputUserData ctx = new ScriptInputUserData;
654 ctx.Write(action.GetID());
655
657
658 if (action.UseAcknowledgment())
659 {
662
664 }
665
666 ctx.Send();
667
668 if (!action.UseAcknowledgment())
669 {
671 if (action.IsInstant())
672 OnActionEnd();
673 }
674 }
675 else
676 {
678 if (action.IsInstant())
679 OnActionEnd();
680 }
681 }
682 }
const int INPUT_UDT_STANDARD_ACTION_START
Определения _constants.c:2
bool m_Interrupted
Определения ActionManagerBase.c:49
ref ActionData m_CurrentActionData
Определения ActionManagerBase.c:61
bool m_ActionInputWantEnd
Определения ActionManagerBase.c:53
bool ActionPossibilityCheck(int pCurrentCommandID)
Определения ActionManagerBase.c:244
int m_PendingActionAcknowledgmentID
Определения ActionManagerBase.c:59
bool m_ActionWantEndRequest
Определения ActionManagerBase.c:52
DayZPlayer m_Player
Определения Hand_Events.c:42
void Debug()
Определения UniversalTemperatureSource.c:349
int GetID()
Определения ActionBase.c:1321
void Start(ActionData action_data)
Определения ActionBase.c:725
bool CanBePerformedFromQuickbar()
Определения ActionBase.c:303
bool SetupAction(PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
Определения ActionBase.c:156
bool UseAcknowledgment()
Определения ActionBase.c:1123
void WriteToContext(ParamsWriteContext ctx, ActionData action_data)
Определения ActionBase.c:426
bool IsInstant()
Определения ActionBase.c:262
bool IsLocal()
Определения ActionBase.c:256
override void OnActionEnd()
Определения ActionManagerClient.c:775
bool m_ActionWantEndRequest_Send
Определения ActionManagerClient.c:22
void HandleInputsOnActionStart(ActionBase action)
Определения ActionManagerClient.c:684
int m_LastAcknowledgmentID
Определения ActionManagerClient.c:8
bool m_ActionInputWantEnd_Send
Определения ActionManagerClient.c:23
proto native void Send()
proto bool Write(void value_out)
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 UA_AM_PENDING
Определения constants.c:474

Перекрестные ссылки Debug::ActionLog(), ActionPossibilityCheck(), ActionTarget, ActionBase::CanBePerformedFromQuickbar(), ScriptInputUserData::CanStoreInputUserData(), DPrint(), GetGame(), ActionBase::GetID(), HandleInputsOnActionStart(), INPUT_UDT_STANDARD_ACTION_START, LogManager::IsActionLogEnable(), ActionBase::IsInstant(), ActionBase::IsLocal(), m_ActionInputWantEnd, m_ActionInputWantEnd_Send, m_ActionWantEndRequest, m_ActionWantEndRequest_Send, m_CurrentActionData, m_Interrupted, m_LastAcknowledgmentID, m_PendingActionAcknowledgmentID, m_Player, OnActionEnd(), ScriptInputUserData::Send(), ActionBase::SetupAction(), ActionBase::Start(), UA_AM_PENDING, ActionBase::UseAcknowledgment(), Serializer::Write() и ActionBase::WriteToContext().

Используется в InputsUpdate(), OnInstantAction(), PerformActionFromInventory(), PerformActionFromQuickbar() и PerformActionStart().