383 {
384 if ( state ==
UA_ERROR || !action_data.m_Callback || !action_data.m_Player || !action_data.m_ActionComponent )
385 {
386#ifdef ENABLE_LOGGING
387 if ( LogManager.IsActionLogEnable() )
388 {
389 Debug.ActionLog(
"ABRUPT CANCEL, CONDITIONS NOT MET", this.
ToString() ,
"n/a",
"Do", action_data.m_Player.ToString() );
390 }
391#endif
392 if ( action_data.m_Callback && action_data.m_Player )
393 {
394 action_data.m_Callback.Interrupt();
395 }
396 else
397 {
398 Debug.ActionLog(
"PLAYER LOST", this.
ToString() ,
"n/a",
"Do", action_data.m_Player.ToString() );
399 }
400 }
401 else
402 {
403 switch ( state )
404 {
407 {
408 action_data.m_Callback.ProgressActionComponent();
410 }
411 else
412 {
413 action_data.m_Callback.Interrupt();
416 }
417 break;
418
421 action_data.m_Callback.EndActionComponent();
422 break;
423
426 action_data.m_Callback.EndActionComponent();
427 break;
428
431 {
432 action_data.m_Callback.Interrupt();
435 }
436 default:
437 Debug.ActionLog(
"Action component returned wrong value", this.
ToString() ,
"n/a",
"Do", action_data.m_Player.ToString() );
438 action_data.m_Callback.Interrupt();
439 break;
440 }
441 }
442 }
void InformPlayers(PlayerBase player, ActionTarget target, int state)
DEPRECATED delivers message ids to clients based on given context.
bool CanContinue(ActionData action_data)
void Do(ActionData action_data, int state)