//服务器连接成功并发送数据 public override void OnEventTCPSocketLink() { CMD_GR_LogonMobile mobile = new CMD_GR_LogonMobile(); mobile.wGameID = serverInfo.wServerID; mobile.dwProcessVersion = LoginData.PlazaVersion; mobile.cbDeviceType = 16; mobile.wBehaviorFlags = 17; mobile.wPageTableCount = 255; mobile.dwUserID = GlobalDataScript.userData.dwUserID; mobile.szPassword = GlobalDataScript.userData.szGroupName; mobile.szServerPasswd = new byte[66]; mobile.szMachineID = new byte[66]; byte[] bt = NetUtil.StringToBytes(GlobalDataScript.szMachineID); Array.Copy(bt, mobile.szMachineID, bt.Length); SocketEngine.Instance.SendScoketData((int)GameServer.MDM_GR_LOGON, (int)CreateLogon.SUB_GR_LOGON_MOBILE, NetUtil.StructToBytes(mobile), Marshal.SizeOf(mobile)); return; #region 旧代码 //if (GlobalDataScript.type == ModeType.Create) //{ // CMD_GR_LogonMobile mobile = new CMD_GR_LogonMobile(); // mobile.wGameID = serverInfo.wServerID; // mobile.dwProcessVersion = LoginData.PlazaVersion; // mobile.cbDeviceType = 16; // mobile.wBehaviorFlags = 17; // mobile.wPageTableCount = 255; // mobile.dwUserID = GlobalDataScript.userData.dwUserID; // mobile.szPassword = GlobalDataScript.userData.szGroupName; // mobile.szServerPasswd = new byte[66]; // mobile.szMachineID = new byte[66]; // byte[] bt = NetUtil.StringToBytes("A501164B366ECFC9E549163873094D50"); // Array.Copy(bt, mobile.szMachineID, bt.Length); // SocketEngine.Instance.SendScoketData((int)GameServer.MDM_GR_LOGON, (int)CreateLogon.SUB_GR_LOGON_MOBILE, NetUtil.StructToBytes(mobile), Marshal.SizeOf(mobile)); //} //else //{ // CMD_GR_UserSitDown sitDown = new CMD_GR_UserSitDown(); // sitDown.wTableID = (ushort)tableId; // sitDown.wChairID = 0; // sitDown.szPassword = new byte[66]; // SocketEngine.Instance.SendScoketData((int)GameServer.MDM_GR_USER, (int)MDM_GR_USER.SUB_GR_USER_SITDOWN, NetUtil.StructToBytes(sitDown), Marshal.SizeOf(sitDown)); //} #endregion }
//连接服务器成功并发送数据 public override void OnEventTCPSocketLink() { CMD_GR_LogonMobile mobile = new CMD_GR_LogonMobile(); mobile.wGameID = serverInfo.wServerID; mobile.dwProcessVersion = LoginData.PlazaVersion; mobile.cbDeviceType = 16; mobile.wBehaviorFlags = 17; mobile.wPageTableCount = 255; mobile.dwUserID = GlobalDataScript.userData.dwUserID; mobile.szPassword = GlobalDataScript.userData.szGroupName; mobile.szServerPasswd = new byte[66]; mobile.szMachineID = new byte[66]; byte[] bt = NetUtil.StringToBytes(GlobalDataScript.szMachineID); Array.Copy(bt, mobile.szMachineID, bt.Length); SocketEngine.Instance.SendScoketData((int)GameServer.MDM_GR_LOGON, (int)CreateLogon.SUB_GR_LOGON_MOBILE, NetUtil.StructToBytes(mobile), Marshal.SizeOf(mobile)); }