private static void Main(string[] args) { MakerWOWApi.Initialize <WindowsWebContext>(); MakerWOWApi.OnError += MakerWOWApi_OnError; MakerWOWApi.Login("*****@*****.**", "9751058aA2", onLoginSuccess, OnCrudFailed); }
public override void ProcessCommand(SessionCommand sessionCommand) { switch (sessionCommand.CurrentCommand.CommandType) { case DataTypes.CommandType.None: Debugger.Print("Processing command: None"); break; case DataTypes.CommandType.Login: Debugger.Print("Processing command: Login"); MakerWOWApi.Login(sessionCommand, (string)sessionCommand.CurrentCommand.Arguments[0], (string)sessionCommand.CurrentCommand.Arguments[1], onLoginSuccess, onLoginFailed); break; case DataTypes.CommandType.Logout: Debugger.Print("Processing command: Logout"); MakerWOWApi.Logout(sessionCommand, onLogoutSuccess, onLogoutFailed); break; case DataTypes.CommandType.StartWorld: Debugger.Print("Processing command: StartWorld"); break; case DataTypes.CommandType.StopWorld: Debugger.Print("Processing command: StopWorld"); break; case DataTypes.CommandType.World: Debugger.Print("Processing command: World"); break; case DataTypes.CommandType.Lobby: Debugger.Print("Processing command: Lobby"); foreach (var client in _clients.Values) { _networkController.Networker.Send(client, sessionCommand.CurrentCommand.ToBytes()); } break; case DataTypes.CommandType.Editor: Debugger.Print("Processing command: Editor"); break; default: break; } }