Esempio n. 1
0
    public void Login(string user, string password, string apn, string mac, string model, int channel, int subChanner,
                      int sdkId)
    {
        EngineManager engine = EngineManager.GetInstance();
        cs_login      login  = new cs_login();

        login.uid      = user;
        login.password = string.IsNullOrEmpty(password) ? new byte[0] : TextUtils.GetBytes(password);
        //UtilTools.ShowMessage(LoginGameData.accountServerVerificationMD5());

        login.sz_param = LoginGameData.accountServerVerificationMD5();
        LogSys.LogError("content=" + login.sz_param);
        login.version      = engine.Message.GetAttribute("newVersions");
        login.network_type = apn;
        login.sys_type     = (uint)engine.SysType;
        login.ios_idfa     = "";
        login.ios_idfv     = "";
        login.mac_address  = mac;
        login.device_type  = model;

        login.platform_flag = (uint)sdkId;
        login.chnid         = (uint)channel;
        login.sub_chnid     = (uint)subChanner;
//        UtilTools.ShowWaitWin(WaitFlag.LoginFirst);
        ClientNetwork.Instance.SendMsg(ProtoID.CS_LOGIN, login);
    }
Esempio n. 2
0
    private void OnNetworkConneted(object sender, GameEventArgs e)
    {
        Log.Info("连接上服务器~~~");
        _isNetworkInitComplete = true;

        cs_login loginInfo = new cs_login();

        loginInfo.account  = "1234";
        loginInfo.password = "******";
        GameManager.Network.Send <cs_login>(loginInfo);
    }