| Core/GameEngine/DataToCtl/PackageRegedit.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0132_tagCreateRoleSucess.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0132_tagCreateRoleSucess.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/NetworkPackage/ServerPack/H01_System/H0132_tagCreateRoleSucess.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/NetworkPackage/ServerPack/H01_System/H0132_tagCreateRoleSucess.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/SDK/SDKUtility.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/PreFightMission.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/HttpRequest/HttpBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Login/LoginModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Core/GameEngine/DataToCtl/PackageRegedit.cs
@@ -11,6 +11,7 @@ public static void Init() { // 登记相应的数据体及对应的数据转逻辑类 Register(typeof(H0132_tagCreateRoleSucess), typeof(DTC0132_tagCreateRoleSucess)); Register(typeof(HA326_tagMCNPCIDCollectionCntInfo), typeof(DTCA326_tagMCNPCIDCollectionCntInfo)); Register(typeof(HA904_tagGCDogzNPCRefreshTime), typeof(DTCA904_tagGCDogzNPCRefreshTime)); Register(typeof(HA714_tagMCNPCCntList), typeof(DTCA714_tagMCNPCCntList)); Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
@@ -18,6 +18,14 @@ public override void Done(GameNetPackBasic vNetPack) { base.Done(vNetPack); H0102_tagCDBPlayer vNetData = vNetPack as H0102_tagCDBPlayer; SDKUtility.Instance.RoleLogin(vNetData.PlayerID.ToString(), vNetData.PlayerName, vNetData.LV.ToString(), vNetData.VIPLv.ToString()); DEBUG_0102 = true; DTC0403_tagPlayerLoginLoadOK.finishedLogin = false; DEBUG_STEP = 0; @@ -37,7 +45,6 @@ Debug.LogError(ex); } H0102_tagCDBPlayer vNetData = vNetPack as H0102_tagCDBPlayer; if (vNetData.LV == 1) { @@ -45,7 +52,6 @@ } PlayerDatas.Instance.InitPlayerData(vNetData); var _mapConfig = Config.Instance.Get<MapConfig>(vNetData.MapID); DTCA127_tagMCStartChangeMap.LineID = 0; Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0132_tagCreateRoleSucess.cs
New file @@ -0,0 +1,16 @@ public class DTC0132_tagCreateRoleSucess : DtcBasic { public override void Done(GameNetPackBasic vNetPack) { base.Done(vNetPack); var _package = vNetPack as H0132_tagCreateRoleSucess; if (_package == null) { return; } SDKUtility.Instance.CreateRoleOk(_package.PlayerID.ToString(), _package.PlayerName); } } Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0132_tagCreateRoleSucess.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: e6f4990770762fa418dbed041e3c8f70 timeCreated: 1535981625 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/ServerPack/H01_System/H0132_tagCreateRoleSucess.cs
New file @@ -0,0 +1,22 @@ using UnityEngine; using System.Collections; //01 32 创角成功 #tagCreateRoleSucess public class H0132_tagCreateRoleSucess : GameNetPackBasic { public uint PlayerID; public string PlayerName; public H0132_tagCreateRoleSucess() { _cmd = (ushort)0x0132; } public override void ReadFromBytes(byte[] vBytes) { TransBytes(out PlayerID, vBytes, NetDataType.DWORD); TransBytes(out PlayerName, vBytes, NetDataType.Chars, 33); } } Core/NetworkPackage/ServerPack/H01_System/H0132_tagCreateRoleSucess.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: bb83d94cd4209ff48a9c0df87282f3bc timeCreated: 1535981625 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/SDK/SDKUtility.cs
@@ -16,6 +16,14 @@ ChargingFull = 3, } public enum E_ChannelPlatform { Free, Mr, } public E_ChannelPlatform ChannelPlatform { get; private set; } /// <summary> /// sdk初始化是否完成标识 /// 客户端一般需要等待这个值为true才继续逻辑 @@ -86,6 +94,8 @@ { RegistrationID = string.Empty; AssetCopyFinished = false; ChannelPlatform = E_ChannelPlatform.Free; #if !UNITY_EDITOR if (InitFinished) { @@ -294,6 +304,19 @@ break; case CodeA2U.SdkInitComplete: InitFinished = true; var _dict = _json as IDictionary; if (_dict != null && _dict.Contains("channelPlatform")) { var _channelPlatform = _json["channelPlatform"].ToString(); if (!string.IsNullOrEmpty(_channelPlatform)) { if (_channelPlatform.Equals("mr")) { ChannelPlatform = E_ChannelPlatform.Mr; Debug.Log("当前渠道平台为猫耳渠道"); } } } break; case CodeA2U.PushClientID: RegistrationID = _json["clientID"].ToString(); @@ -473,6 +496,8 @@ public const int FreePlatformSwitchAccount = 103; public const int FreePlatformPay = 104; public const int PayFinished = 105; public const int CreateRole = 106; public const int RoleLogin = 107; /** * 极光推送 * */ @@ -543,7 +568,6 @@ public string platfromId = "1000"; public UnityAction<FP_CheckIDAuthentication> onFreePlatfromCheckIDOK; public UnityAction<FP_DoIDAuthentication> onFreePlatfromDoIDAuthenticationOk; public void FreePlatformInit() { @@ -619,6 +643,10 @@ m_PaymentTable["OrderTitle"] = title; m_PaymentTable["OrderInfo"] = cpInfo; m_PaymentTable["AppID"] = VersionConfig.Get().appId; if (ChannelPlatform == E_ChannelPlatform.Mr) { m_PaymentTable["RechargeChannel"] = "1"; } var _stringBuilder = new System.Text.StringBuilder(); var _md5Body = _stringBuilder.Append(m_PaymentTable["AppID"]). @@ -647,6 +675,7 @@ { if (result) { Debug.Log(" ------------------ : " + message); JsonData _json = JsonMapper.ToObject(message); int _callbackResult = (int)_json["result"]; @@ -660,6 +689,15 @@ m_Json["mount"] = money; m_Json["cpInfo"] = cpInfo; m_Json["title"] = title; m_Json["notifyurl"] = _json["notifyurl"]; if (ChannelPlatform == E_ChannelPlatform.Mr) { m_Json["roleID"] = PlayerDatas.Instance.baseData.PlayerID; m_Json["roleName"] = PlayerDatas.Instance.baseData.PlayerName; m_Json["level"] = PlayerDatas.Instance.baseData.LV.ToString(); m_Json["sid"] = "s" + ServerListCenter.Instance.currentServer.region_flag; } #if UNITY_IOS m_Json["identifier"] = VersionConfig.Get().bundleIdentifier; #endif @@ -750,18 +788,25 @@ if (_iDict.Contains("token")) { FreePlatformInfo.token = json["token"].ToString(); Debug.Log("token: " + FreePlatformInfo.token); } if (_iDict.Contains("token_expire")) { FreePlatformInfo.tokenExpire = json["token_expire"].ToString(); } else { FreePlatformInfo.tokenExpire = ""; } if (_iDict.Contains("account")) { FreePlatformInfo.account = json["account"].ToString(); Debug.Log("account: " + FreePlatformInfo.account); } if (_iDict.Contains("account_id")) { int.TryParse(json["account_id"].ToString(), out FreePlatformInfo.accountID); Debug.Log("account_id: " + FreePlatformInfo.accountID); } FreePlatformInfo.phone = 0; @@ -799,6 +844,29 @@ m_Json["money"] = (float)coin / 100; SendMessageToSDK(m_Json); } public void CreateRoleOk(string roleID, string roleName) { m_Json.Clear(); m_Json["code"] = CodeU2A.CreateRole; m_Json["roleID"] = roleID; m_Json["roleName"] = roleName; m_Json["sid"] = "s" + ServerListCenter.Instance.currentServer.region_flag; SendMessageToSDK(m_Json); } public void RoleLogin(string roleID, string roleName, string lv, string vipLV) { m_Json.Clear(); m_Json["code"] = CodeU2A.RoleLogin; m_Json["roleID"] = roleID; m_Json["roleName"] = roleName; m_Json["sid"] = "s" + ServerListCenter.Instance.currentServer.region_flag; m_Json["level"] = lv; m_Json["vipLevel"] = vipLV; SendMessageToSDK(m_Json); } #endregion #region 极光推送相关 Fight/PreFightMission.cs
@@ -652,7 +652,7 @@ _model.direction = 2; _model.arrowScale = 2; _model.pressedClose = false; _model.clickClosed = true; _model.clickClosed = false; _model.onClose = null; WindowCenter.Instance.Open<NewGuideWin>(); System/HttpRequest/HttpBehaviour.cs
@@ -5,6 +5,8 @@ using System.Net; using System.Text; using System.IO; using System.Net.Security; using System.Security.Cryptography.X509Certificates; public class HttpBehaviour : MonoBehaviour { @@ -55,6 +57,7 @@ request.ReadWriteTimeout = 2000; request.Proxy = null; request.KeepAlive = false; ServicePointManager.ServerCertificateValidationCallback += RemoteCertificateValidationCallback; } catch (Exception ex) { @@ -107,6 +110,50 @@ } private static bool RemoteCertificateValidationCallback(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { if (sslPolicyErrors == SslPolicyErrors.None) return true; var _acceptCertificate = true; if ((sslPolicyErrors & SslPolicyErrors.RemoteCertificateNotAvailable) == SslPolicyErrors.RemoteCertificateNotAvailable) { _acceptCertificate = false; } else { if ((sslPolicyErrors & SslPolicyErrors.RemoteCertificateNameMismatch) == SslPolicyErrors.RemoteCertificateNameMismatch) { _acceptCertificate = false; } if ((sslPolicyErrors & SslPolicyErrors.RemoteCertificateChainErrors) == SslPolicyErrors.RemoteCertificateChainErrors) { foreach (X509ChainStatus item in chain.ChainStatus) { if (item.Status != X509ChainStatusFlags.RevocationStatusUnknown && item.Status != X509ChainStatusFlags.OfflineRevocation) break; if (item.Status != X509ChainStatusFlags.NoError) { _acceptCertificate = false; } } } } if (_acceptCertificate == false) { _acceptCertificate = true; } return _acceptCertificate; } void Update() { if (Time.time > timeOut && !getResult) System/Login/LoginModel.cs
@@ -15,7 +15,8 @@ public SDKUtility.FP_LoginOk sdkLoginResult; public SDKUtility.FP_CheckIDAuthentication sdkIDCheckIDAuthentication; public string localSaveAccountName { public string localSaveAccountName { get { return LocalSave.GetString(USER_ACCOUNT); } set { LocalSave.SetString(USER_ACCOUNT, value); } } @@ -24,19 +25,22 @@ public event Action accountBindOkEvent; bool m_ReconnecBackGround = false; public bool reconnectBackGround { public bool reconnectBackGround { get { return m_ReconnecBackGround; } set { m_ReconnecBackGround = value; } } bool m_OnCreateRole = false; public bool onCreateRole { public bool onCreateRole { get { return m_OnCreateRole; } set { m_OnCreateRole = value; } } bool m_Busy = false; public bool busy { public bool busy { get { return m_Busy; } set { m_Busy = value; } } @@ -269,7 +273,14 @@ send.Adult = 1; break; case VersionAuthority.Release: if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Free) { send.IDType = 1; } else if (SDKUtility.Instance.ChannelPlatform == SDKUtility.E_ChannelPlatform.Mr) { send.IDType = 2; } send.AccID = sdkLoginResult.account; send.Password = sdkLoginResult.token; send.MAC = DeviceUtility.GetMac(); @@ -280,7 +291,6 @@ send.TokenExpire = sdkLoginResult.tokenExpire;// 内部登陆的时长,无所谓的 send.Phone = (byte)sdkLoginResult.phone; send.ServerID = (uint)ServerListCenter.Instance.currentServer.region_flag; if (sdkIDCheckIDAuthentication.type == "1") { send.Adult = 1;