private void OnLogin(MOBAClient client, string account, string password) { //无效检测 if (account == null || password == null) { return; } //验证在线 if (accountCache.IsOnLine(account)) { Send(client, OperationCode.AccountCode, OpAccount.Login, -1, "玩家在线"); return; } if (accountCache.Match(account, password)) { accountCache.OnLineClient(account, client); Send(client, OperationCode.AccountCode, OpAccount.Login, 0, "登录成功"); } else { Send(client, OperationCode.AccountCode, OpAccount.Login, -2, "账号或密码错误"); } }