public void OnDebugMessage(ServerRoom room, DebugCommand message, PlayerEntity player, SessionStateMachine sessionStateMachine) { FreeDebugCommandHandler.Handle(room.ContextsWrapper.FreeArgs, message, player); SharedCommandHandler.ProcessGameSettingCommnands(message, sessionStateMachine); SharedCommandHandler.ProcessDebugCommand(message, _contexts); SharedCommandHandler.ProcessHitBoxCommands(message); SharedCommandHandler.ProcessPlayerCommands(message, _contexts, player, _contexts.session.commonSession, _contexts.session.currentTimeObject); SharedCommandHandler.ProcessVehicleCommand(message, _contexts.vehicle, player); SharedCommandHandler.ProcessSceneObjectCommand(message, _contexts.sceneObject, _contexts.session.entityFactoryObject.SceneObjectEntityFactory, player); SharedCommandHandler.ProcessMapObjectCommand(message, _contexts.mapObject, _contexts.session.entityFactoryObject.MapObjectEntityFactory, player); SharedCommandHandler.ProcessCommands(message, _contexts, player); }
public string OnDebugMessage(DebugCommand message, SessionStateMachine stateMachine) { var sb = new System.Text.StringBuilder(); foreach (var arg in message.Args) { sb.Append(arg); sb.Append(","); } Logger.InfoFormat("OnDebugMessage {0} with arg {1}", message.Command, sb.ToString()); var result = string.Empty; result += SharedCommandHandler.ProcessGameSettingCommnands(message, stateMachine); if (!string.IsNullOrEmpty(result)) { return(result); } SharedCommandHandler.ProcessHitBoxCommands(message); result += SharedCommandHandler.ProcessDebugCommand(message, _contexts); if (!string.IsNullOrEmpty(result)) { return(result); } result += UiModule.ProcessDebugCommand(message); if (!string.IsNullOrEmpty(result)) { return(result); } PlayerEntity self = _contexts.player.flagSelfEntity; if (self != null) { result = SharedCommandHandler.ProcessPlayerCommands(message, _contexts, self, _contexts.session.commonSession, _contexts.session.currentTimeObject); SharedCommandHandler.ProcessVehicleCommand(message, _contexts.vehicle, self); SharedCommandHandler.ProcessSceneObjectCommand( message, _contexts.sceneObject, _contexts.session.entityFactoryObject.SceneObjectEntityFactory, self); SharedCommandHandler.ProcessMapObjectCommand(message, _contexts.mapObject, _contexts.session.entityFactoryObject.MapObjectEntityFactory, self); result = SharedCommandHandler.ProcessCommands(message, _contexts, self); } return(result); }