void onConnectAccountSucess() { Cmd.ReqAccountOperation req = new Cmd.ReqAccountOperation(); req.action = Cmd.AccountAction.AccountAction_Login; req.user = user_; req.password = password_; Nets.Send(Cmd.CLIENTID.RQAccountOperation, req); }
void onConnectGameSucess() { Cmd.ReqLoginGameServer req = new Cmd.ReqLoginGameServer(); req.time = preOperation_.time; req.token = preOperation_.token; req.accountid = preOperation_.accountid; Nets.Send(Cmd.CLIENTID.RQLoginGame, req); }
void SendMessage() { if (this.window_.input_.text.Length == 0) { return; } Cmd.ReqChat cmd = new Cmd.ReqChat(); cmd.channel = Cmd.MessageChannel.MessageChannel_User_World; cmd.from = LoginSystem.Instance.currentRole.name; cmd.roleID = LoginSystem.Instance.currentRole.id; cmd.content = this.window_.input_.text; Nets.Send(Cmd.CLIENTID.RQChat, cmd); }
protected override void OnCommand(EventContext context) { if (context.sender == this.window.enterGame2) { if (LoginSystem.Instance.HasRole()) { Nets.Send(Cmd.CLIENTID.RQEnterGame); this.window.enterGame2.enabled = false; } else { var cmd = new Cmd.ReqCreateRole(); cmd.name = this.window.name1.text; cmd.sex = 0; cmd.job = 1; Nets.Send(Cmd.CLIENTID.RQCreateRole, cmd); } } }