public void SendUserRegist(string name, Byte gender, string password, string referrerID) { string pwd = MD5Util.GetMD5Hash(password); var register = new CMD_GP_RegisterAccounts(); register.cbGender = gender; register.wFaceID = gender; register.szAccounts = name; register.szNickName = name; register.szInsurePass = pwd; register.szLogonPass = pwd; register.szSpreader = referrerID; register.szMachineID = GameApp.GameData.MAC; register.cbValidateFlags = GameHelper.GetServerSidePlatform(); register.dwPlazaVersion = (uint)GameVersion.ProcessVersion(GameApp.GameData.Version); //Logger.Net.Log("send regist request|username:"******" |password:" + pwd); byte[] dataBuffer = GameConvert.StructToByteArray(register); SendToHallSvr(MainCommand.MDM_GP_LOGON, SubCommand.SUB_GP_REGISTER_ACCOUNTS, 0, dataBuffer); //TODO 移除 GameApp.GameData.Account = name; GameApp.GameData.Password = pwd; }
//获取版本和网址信息 public void ReqGetVersionInfo() { var info = new CMD_GP_RequestUpdateInfo(); info.cbDeviceType = GameHelper.GetServerSidePlatform(); info.dwPlazaVersion = (uint)GameVersion.ProcessVersion(GameApp.GameData.Version); byte[] dataBuffer = GameConvert.StructToByteArray(info); SendToHallSvr(MainCommand.MDM_GP_USER_SERVICE, SubCommand.SUB_GP_GET_VERSION_INFO, 0, dataBuffer); }
public void SendLoginHallSvr(string wName, string wPassword, string mac) { var logon = new CMD_GP_LogonAccounts(); logon.szAccounts = wName; logon.szPassword = wPassword; logon.szMachineID = mac; logon.dwPlazaVersion = (uint)GameVersion.ProcessVersion(GameApp.GameData.Version); logon.cbValidateFlags = GameHelper.GetServerSidePlatform(); byte[] dataBuffer = GameConvert.StructToByteArray(logon); //Logger.Net.Log("send login request|username:"******"|password:" + wPassword); SendToHallSvr(MainCommand.MDM_GP_LOGON, SubCommand.SUB_GP_LOGON_ACCOUNTS, 0, dataBuffer); }