public static void TryToOpenTips() { bool flag = false; NetworkAccelerator.AccelRecommendation_State accelRecommendation = NetworkAccelerator.getAccelRecommendation(); if (accelRecommendation >= NetworkAccelerator.AccelRecommendation_State.ACCEL_RECOMMENDATION_NOTICE) { flag = true; } if (flag) { if (accelRecommendation == NetworkAccelerator.AccelRecommendation_State.ACCEL_RECOMMENDATION_WIFI) { Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("NetAccelRecommendationWIFI", null, true); } else if (accelRecommendation == NetworkAccelerator.AccelRecommendation_State.ACCEL_RECOMMENDATION_NOTICE) { Singleton <ApolloHelper> .GetInstance().ApolloRepoertEvent("NetAccelRecommendation", null, true); } } if (NetworkAccelerator.IsCommercialized()) { int num = 0; int num2 = 0; if (accelRecommendation == NetworkAccelerator.AccelRecommendation_State.ACCEL_RECOMMENDATION_NOTICE) { num = PlayerPrefs.GetInt("NET_ACC_RECOMMENDED_V2", 0); num2 = PlayerPrefs.GetInt("NET_ACC_RECOMMENDED_FIRST_SETTLEMENT", 0); } else if (accelRecommendation == NetworkAccelerator.AccelRecommendation_State.ACCEL_RECOMMENDATION_WIFI) { num = PlayerPrefs.GetInt("NET_ACC_RECOMMENDED_V2_WIFI", 0); num2 = PlayerPrefs.GetInt("NET_ACC_RECOMMENDED_FIRST_SETTLEMENT_WIFI", 0); } int srv2CltGlobalValue = (int)GameDataMgr.GetSrv2CltGlobalValue(RES_SRV2CLT_GLOBAL_CONF_TYPE.RES_SRV2CLT_GLOBAL_CONF_TYPE_XUNYOU_TIPS_POP_CYCLE); int currentUTCTime = CRoleInfo.GetCurrentUTCTime(); NetworkAccelerator.UserStatus userStatus = NetworkAccelerator.GetUserStatus(); if (userStatus == NetworkAccelerator.UserStatus.FreeTrial) { string vIPValidTime = NetworkAccelerator.getVIPValidTime(); int num3 = (int)Utility.ToUtcSeconds(Utility.StrToDateTime(vIPValidTime, "yyyy-MM-dd HH:mm:ss")); int num4 = num3 - currentUTCTime; if (num4 >= 0 && num4 < 86400 && currentUTCTime - num2 >= 86400) { NetworkAccelerator.PopTips(NetworkAccelerator.PopTipsType.Buy, accelRecommendation); if (accelRecommendation == NetworkAccelerator.AccelRecommendation_State.ACCEL_RECOMMENDATION_WIFI) { PlayerPrefs.SetInt("NET_ACC_RECOMMENDED_FIRST_SETTLEMENT_WIFI", currentUTCTime); } else { PlayerPrefs.SetInt("NET_ACC_RECOMMENDED_FIRST_SETTLEMENT", currentUTCTime); } } } else if (userStatus == NetworkAccelerator.UserStatus.Qualified) { if (currentUTCTime - srv2CltGlobalValue * 86400 >= num && flag) { NetworkAccelerator.PopTips(NetworkAccelerator.PopTipsType.Trial, accelRecommendation); if (accelRecommendation == NetworkAccelerator.AccelRecommendation_State.ACCEL_RECOMMENDATION_NOTICE) { PlayerPrefs.SetInt("NET_ACC_RECOMMENDED_V2", currentUTCTime); } else if (accelRecommendation == NetworkAccelerator.AccelRecommendation_State.ACCEL_RECOMMENDATION_WIFI) { PlayerPrefs.SetInt("NET_ACC_RECOMMENDED_V2_WIFI", currentUTCTime); } } } else if ((userStatus == NetworkAccelerator.UserStatus.Expired || userStatus == NetworkAccelerator.UserStatus.TrialExpired) && currentUTCTime - srv2CltGlobalValue * 86400 >= num && flag) { NetworkAccelerator.PopTips(NetworkAccelerator.PopTipsType.Buy, accelRecommendation); if (accelRecommendation == NetworkAccelerator.AccelRecommendation_State.ACCEL_RECOMMENDATION_NOTICE) { PlayerPrefs.SetInt("NET_ACC_RECOMMENDED_V2", currentUTCTime); } else if (accelRecommendation == NetworkAccelerator.AccelRecommendation_State.ACCEL_RECOMMENDATION_WIFI) { PlayerPrefs.SetInt("NET_ACC_RECOMMENDED_V2_WIFI", currentUTCTime); } } } else { if (!PlayerPrefs.HasKey("NET_ACC_RECOMMENDED") && flag && accelRecommendation == NetworkAccelerator.AccelRecommendation_State.ACCEL_RECOMMENDATION_NOTICE) { Singleton <CUIManager> .GetInstance().OpenMessageBoxWithCancel(Singleton <CTextManager> .GetInstance().GetText("NETWORK_ACCELERATOR_RECOMMENDED_MSGBOX"), enUIEventID.NetworkAccelerator_TurnOn, enUIEventID.NetworkAccelerator_Ignore, Singleton <CTextManager> .GetInstance().GetText("NETWORK_ACCELERATOR_RECOMMENDED_MSGBOX_OK"), Singleton <CTextManager> .GetInstance().GetText("NETWORK_ACCELERATOR_RECOMMENDED_MSGBOX_CANCEL"), false); PlayerPrefs.SetString("NET_ACC_RECOMMENDED", "Y"); } if (!PlayerPrefs.HasKey("NET_ACC_RECOMMENDED_WIFI") && flag && accelRecommendation == NetworkAccelerator.AccelRecommendation_State.ACCEL_RECOMMENDATION_WIFI) { Singleton <CUIManager> .GetInstance().OpenMessageBoxWithCancel(Singleton <CTextManager> .GetInstance().GetText("NETWORK_ACCELERATOR_RECOMMENDED_WIFI_MSGBOX"), enUIEventID.NetworkAccelerator_WIFI_TurnOn, enUIEventID.NetworkAccelerator_Ignore, Singleton <CTextManager> .GetInstance().GetText("NETWORK_ACCELERATOR_RECOMMENDED_MSGBOX_OK"), Singleton <CTextManager> .GetInstance().GetText("NETWORK_ACCELERATOR_RECOMMENDED_MSGBOX_CANCEL"), false); PlayerPrefs.SetString("NET_ACC_RECOMMENDED_WIFI", "Y"); } } }