| 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,23 +11,24 @@ 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)); Register(typeof(HAA16_tagMCSuperGiftInfo), typeof(DTCAA16_tagMCSuperGiftInfo)); Register(typeof(HAC10_tagGCAllFamilyBossHurtInfoList), typeof(DTCAC10_tagGCAllFamilyBossHurtInfoList)); Register(typeof(HA715_tagMCFamilyBossHurtList), typeof(DTCA715_tagMCFamilyBossHurtList)); Register(typeof(HAB04_tagMCBossRebornInfo), typeof(DTCAB04_tagMCBossRebornInfo)); Register(typeof(HA40B_tagGCPlayerJoinFamilyWarInfo), typeof(DTCA40B_tagGCPlayerJoinFamilyWarInfo)); Register(typeof(HA319_tagMCPackDownloadRecord), typeof(DTCA319_tagMCPackDownloadRecord)); Register(typeof(HAA16_tagMCSuperGiftInfo), typeof(DTCAA16_tagMCSuperGiftInfo)); Register(typeof(HAC10_tagGCAllFamilyBossHurtInfoList), typeof(DTCAC10_tagGCAllFamilyBossHurtInfoList)); Register(typeof(HA715_tagMCFamilyBossHurtList), typeof(DTCA715_tagMCFamilyBossHurtList)); Register(typeof(HAB04_tagMCBossRebornInfo), typeof(DTCAB04_tagMCBossRebornInfo)); Register(typeof(HA40B_tagGCPlayerJoinFamilyWarInfo), typeof(DTCA40B_tagGCPlayerJoinFamilyWarInfo)); Register(typeof(HA319_tagMCPackDownloadRecord), typeof(DTCA319_tagMCPackDownloadRecord)); Register(typeof(HAC0A_tagGCMultiRealmPointInfo), typeof(DTCAC0A_tagGCMultiRealmPointInfo)); Register(typeof(HAC08_tagGCBossRebornPoint), typeof(DTCAC08_tagGCBossRebornPoint)); Register(typeof(HAB03_tagMCBossRebornPlayerInfo), typeof(DTCAB03_tagMCBossRebornPlayerInfo)); Register(typeof(HAA11_tagMCSpringSaleInfo), typeof(DTCAA11_tagMCSpringSaleInfo)); Register(typeof(HAA10_tagMCCostRebatePlayerInfo), typeof(DTCAA10_tagMCCostRebatePlayerInfo)); Register(typeof(HAA09_tagMCCostRebateInfo), typeof(DTCAA09_tagMCCostRebateInfo)); Register(typeof(HAC06_tagGCMultiExpRateInfo), typeof(DTCAC06_tagGCMultiExpRateInfo)); Register(typeof(HA001_tagBroadCastInfo), typeof(DTCA001_tagBroadCastInfo)); Register(typeof(HAB03_tagMCBossRebornPlayerInfo), typeof(DTCAB03_tagMCBossRebornPlayerInfo)); Register(typeof(HAA11_tagMCSpringSaleInfo), typeof(DTCAA11_tagMCSpringSaleInfo)); Register(typeof(HAA10_tagMCCostRebatePlayerInfo), typeof(DTCAA10_tagMCCostRebatePlayerInfo)); Register(typeof(HAA09_tagMCCostRebateInfo), typeof(DTCAA09_tagMCCostRebateInfo)); Register(typeof(HAC06_tagGCMultiExpRateInfo), typeof(DTCAC06_tagGCMultiExpRateInfo)); Register(typeof(HA001_tagBroadCastInfo), typeof(DTCA001_tagBroadCastInfo)); Register(typeof(HA40A_tagGCFakeFamilyInfo), typeof(DTCA40A_tagGCFakeFamilyInfo)); Register(typeof(HA110_tagMCCoinToGoldCountInfo), typeof(DTCA110_tagMCCoinToGoldCountInfo)); Register(typeof(HAA02_tagMCFirstGoldInfo), typeof(DTCAA02_tagMCFirstGoldInfo)); @@ -363,9 +364,9 @@ Register(typeof(HB202_tagMCPushNotificationsSetting), typeof(DTCB202_tagMCPushNotificationsSetting)); Register(typeof(HA318_tagMCFreeGoodsInfo),typeof(DTCA318_tagMCFreeGoodsInfo)); Register(typeof(HA318_tagMCFreeGoodsInfo), typeof(DTCA318_tagMCFreeGoodsInfo)); Register(typeof(HAA12_tagMCFlashGiftbagInfo), typeof(DTCAA12_tagMCFlashGiftbagInfo)); Register(typeof(HAA13_tagMCFlashGiftbagPlayerInfo),typeof(DTCAA13_tagMCFlashGiftbagPlayerInfo)); Register(typeof(HAA13_tagMCFlashGiftbagPlayerInfo), typeof(DTCAA13_tagMCFlashGiftbagPlayerInfo)); #region 仙界盛典 Register(typeof(HAC09_tagGCFairyCeremonyInfo), typeof(DTCAC09_tagGCFairyCeremonyInfo)); Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
@@ -1,33 +1,41 @@ using UnityEngine; using Snxxz.UI; using TableConfig; using System; //01 02 玩家初始化#tagCDBPlayer public class DTC0102_tagCDBPlayer : DtcBasic { public static bool DEBUG_0102 = false; public static int DEBUG_STEP = 0; public static event Action beforePlayerDataInitializeEvent; public static event Action afterPlayerDataInitializeEvent; public static event Action switchAccountEvent; using UnityEngine; using Snxxz.UI; using TableConfig; using System; //01 02 玩家初始化#tagCDBPlayer public class DTC0102_tagCDBPlayer : DtcBasic { public static bool DEBUG_0102 = false; public static int DEBUG_STEP = 0; public static event Action beforePlayerDataInitializeEvent; public static event Action afterPlayerDataInitializeEvent; public static event Action switchAccountEvent; public static uint playerIdBuf = 0; public override void Done(GameNetPackBasic vNetPack) { base.Done(vNetPack); DEBUG_0102 = true; DTC0403_tagPlayerLoginLoadOK.finishedLogin = false; DEBUG_STEP = 0; DTC0403_tagPlayerLoginLoadOK.neverLoginOk = true; if (beforePlayerDataInitializeEvent != null) { beforePlayerDataInitializeEvent(); 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; DTC0403_tagPlayerLoginLoadOK.neverLoginOk = true; if (beforePlayerDataInitializeEvent != null) { beforePlayerDataInitializeEvent(); } DEBUG_STEP = 1; DEBUG_STEP = 1; try { RedpointCenter.Instance.ResetAllRedpointState(); @@ -36,30 +44,28 @@ { Debug.LogError(ex); } H0102_tagCDBPlayer vNetData = vNetPack as H0102_tagCDBPlayer; if (vNetData.LV == 1) { OperationLogCollect.Instance.RecordEvent(8); } PlayerDatas.Instance.InitPlayerData(vNetData); var _mapConfig = Config.Instance.Get<MapConfig>(vNetData.MapID); DTCA127_tagMCStartChangeMap.LineID = 0; int _realMapDataID = vNetData.MapID; if (_mapConfig.MapFBType != 0) { PlayerDatas.Instance.InitPlayerData(vNetData); var _mapConfig = Config.Instance.Get<MapConfig>(vNetData.MapID); DTCA127_tagMCStartChangeMap.LineID = 0; int _realMapDataID = vNetData.MapID; if (_mapConfig.MapFBType != 0) { DungeonModel _model = ModelCenter.Instance.GetModel<DungeonModel>(); _realMapDataID = _model.GetDungeonDataIdByMapId(vNetData.MapID); _realMapDataID = _model.GetDungeonDataIdByMapId(vNetData.MapID); if (vNetData.MapID != 52020 && vNetData.MapID != 52010) { DTCA127_tagMCStartChangeMap.LineID = (int)vNetData.ExAttr3; } DTCA127_tagMCStartChangeMap.LineID = (int)vNetData.ExAttr3; } } var _mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(_realMapDataID, DTCA127_tagMCStartChangeMap.LineID); @@ -68,20 +74,20 @@ { DTCA127_tagMCStartChangeMap.LineID = 0; _mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(_realMapDataID, DTCA127_tagMCStartChangeMap.LineID); } if (_mapResConfig != null) { GA_Hero.MapOffset.x = _mapResConfig.MapOffset.x; GA_Hero.MapOffset.z = _mapResConfig.MapOffset.y; } else { GA_Hero.MapOffset.x = 0; GA_Hero.MapOffset.z = 0; } #if UNITY_EDITOR } if (_mapResConfig != null) { GA_Hero.MapOffset.x = _mapResConfig.MapOffset.x; GA_Hero.MapOffset.z = _mapResConfig.MapOffset.y; } else { GA_Hero.MapOffset.x = 0; GA_Hero.MapOffset.z = 0; } #if UNITY_EDITOR DebugEx.LogFormat("------------ 0102 =>玩家ID: {0}, 职业: {1}, 地图: {2}", vNetData.PlayerID, vNetData.Job, vNetData.MapID); #endif DEBUG_STEP = 2; @@ -102,93 +108,93 @@ } } switch (vNetData.MapID) { case 31250: StageManager.Instance.Load<GuardDungeonStage>(_mapConfig.MapID); break; case RuneTowerModel.RUNETOWER_MAPID: StageManager.Instance.Load<RuneTowerDungeonStage>(_mapConfig.MapID); break; case DemonJarModel.DEMONJAR_SINGLEMAPID: StageManager.Instance.Load<FakeDemonJarDungeonStage>(_mapConfig.MapID); break; default: StageManager.Instance.Load<DungeonStage>(_mapConfig.MapID); break; } DTCA713_tagMCDynamicBarrierState.Clear(); switch (vNetData.MapID) { case 31250: StageManager.Instance.Load<GuardDungeonStage>(_mapConfig.MapID); break; case RuneTowerModel.RUNETOWER_MAPID: StageManager.Instance.Load<RuneTowerDungeonStage>(_mapConfig.MapID); break; case DemonJarModel.DEMONJAR_SINGLEMAPID: StageManager.Instance.Load<FakeDemonJarDungeonStage>(_mapConfig.MapID); break; default: StageManager.Instance.Load<DungeonStage>(_mapConfig.MapID); break; } DTCA713_tagMCDynamicBarrierState.Clear(); MainRedDot.Instance.Register(); DEBUG_STEP = 3; if (playerIdBuf != 0 && playerIdBuf != PlayerDatas.Instance.baseData.PlayerID) { if (switchAccountEvent != null) { switchAccountEvent(); } DEBUG_STEP = 3; if (playerIdBuf != 0 && playerIdBuf != PlayerDatas.Instance.baseData.PlayerID) { if (switchAccountEvent != null) { switchAccountEvent(); } } playerIdBuf = PlayerDatas.Instance.baseData.PlayerID; if (afterPlayerDataInitializeEvent != null) { afterPlayerDataInitializeEvent(); } playerIdBuf = PlayerDatas.Instance.baseData.PlayerID; if (afterPlayerDataInitializeEvent != null) { afterPlayerDataInitializeEvent(); } SettingEffectMgr.Instance.Begin(); DEBUG_STEP = 4; QuickSetting.Instance.SetQuickSetting(vNetData.Setting); NetLinkWin.Hide(); WindowCenter.Instance.Close<SelectRoleWin>(); DEBUG_STEP = 4; QuickSetting.Instance.SetQuickSetting(vNetData.Setting); NetLinkWin.Hide(); WindowCenter.Instance.Close<SelectRoleWin>(); WindowCenter.Instance.Close<CreateRoleWin>(); DEBUG_STEP = 5; if (VersionConfig.Get().debugVersion) { GMCommand.Instance.Begin(); if (VersionConfig.Get().debugVersion) { GMCommand.Instance.Begin(); } DEBUG_STEP = 6; // 初始化摄像机 if (!CameraController.Instance) { UnityEngine.Object.Instantiate(Resources.Load<GameObject>("Prefabs/GameCamera")); CameraController.Instance.AcceptInput = false; CameraController.Instance.CameraObject.enabled = false; DEBUG_STEP = 6; // 初始化摄像机 if (!CameraController.Instance) { UnityEngine.Object.Instantiate(Resources.Load<GameObject>("Prefabs/GameCamera")); CameraController.Instance.AcceptInput = false; CameraController.Instance.CameraObject.enabled = false; } var hudRoot = HUDCenter.hudRoot; if (!hudRoot) { hudRoot = HUDCenter.CreateHUDRoot(); hudRoot.SetCamera(CameraController.Instance.CameraObject); var hudRoot = HUDCenter.hudRoot; if (!hudRoot) { hudRoot = HUDCenter.CreateHUDRoot(); hudRoot.SetCamera(CameraController.Instance.CameraObject); } DEBUG_STEP = 7; GA_Hero _hero = PlayerDatas.Instance.hero; if (_hero == null) { _hero = GAMgr.Instance.RequestPlayer<GA_Hero>(PlayerDatas.Instance.PlayerId, E_ActorGroup.User, null); PlayerDatas.Instance.hero = _hero; } else // 重连 { if (PreFightMission.Instance.IsFinished()) { _hero.StopAll(); _hero.InitBornPos(vNetData.PosX, vNetData.PosY); } DEBUG_STEP = 7; GA_Hero _hero = PlayerDatas.Instance.hero; if (_hero == null) { _hero = GAMgr.Instance.RequestPlayer<GA_Hero>(PlayerDatas.Instance.PlayerId, E_ActorGroup.User, null); PlayerDatas.Instance.hero = _hero; } else // 重连 { if (PreFightMission.Instance.IsFinished()) { _hero.StopAll(); _hero.InitBornPos(vNetData.PosX, vNetData.PosY); } } DEBUG_STEP = 8; _hero.OnPathFindStop -= MapTransferUtility.Instance.OnHeroStopPathFind; _hero.OnPathFindStop += MapTransferUtility.Instance.OnHeroStopPathFind; DEBUG_STEP = 8; _hero.OnPathFindStop -= MapTransferUtility.Instance.OnHeroStopPathFind; _hero.OnPathFindStop += MapTransferUtility.Instance.OnHeroStopPathFind; StatusMgr.Instance.ReleaseActor(PlayerDatas.Instance.PlayerId); GAMgr.Instance.UnInit(); DEBUG_STEP = 9; } } DEBUG_STEP = 9; } } 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) { @@ -254,16 +264,16 @@ var _code = (int)_json["code"]; switch (_code) { case CodeA2U.DeviceInfo: case CodeA2U.DeviceInfo: Device = new DeviceInfo (); Device.uniqueID = _json ["unique_id"].ToString (); Device.androidID = _json ["android_id"].ToString ();// ios平台下为idfa Device.userAgent = _json ["userAgent"].ToString (); Device = new DeviceInfo(); Device.uniqueID = _json["unique_id"].ToString(); Device.androidID = _json["android_id"].ToString();// ios平台下为idfa Device.userAgent = _json["userAgent"].ToString(); #if UNITY_ANDROID Device.macAddress = _json ["mac"].ToString (); Device.imei = _json ["imei"].ToString (); Device.totalMemory = (int)_json ["memoryTotal"]; Device.macAddress = _json["mac"].ToString(); Device.imei = _json["imei"].ToString(); Device.totalMemory = (int)_json["memoryTotal"]; #endif if (OnDeviceInfoChanged != null) { @@ -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: send.IDType = 1; 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;