public void UnlockConditionChanged() { if (!(Singleton <GameStateCtrl> .instance.GetCurrentState() is LobbyState)) { return; } int num = 1; int num2 = 29; for (int i = num; i < num2; i++) { ResSpecialFucUnlock dataByKey = GameDataMgr.specialFunUnlockDatabin.GetDataByKey((uint)i); RES_SPECIALFUNCUNLOCK_TYPE rES_SPECIALFUNCUNLOCK_TYPE = (RES_SPECIALFUNCUNLOCK_TYPE)i; if (dataByKey != null && !this.TipsHasShow(rES_SPECIALFUNCUNLOCK_TYPE) && dataByKey.bIsShowUnlockTip == 1 && this.FucIsUnlock(rES_SPECIALFUNCUNLOCK_TYPE)) { if (this.IsBottomBtn(rES_SPECIALFUNCUNLOCK_TYPE)) { Singleton <CLobbySystem> .instance.Play_UnLock_Animation(rES_SPECIALFUNCUNLOCK_TYPE); this.SetUnlockTipsMask(rES_SPECIALFUNCUNLOCK_TYPE); this.ReqUnlockTipsMask(); return; } this.SetUnlockTipsMask(rES_SPECIALFUNCUNLOCK_TYPE); this.ReqUnlockTipsMask(); } } }
private void SetUnlockTipsMask(RES_SPECIALFUNCUNLOCK_TYPE type) { int num = (int)type; ulong num2 = ((ulong)1L) << num; this.m_tipUnlockMask |= num2; }
public bool TipsHasShow(RES_SPECIALFUNCUNLOCK_TYPE type) { int num = (int)type; ulong num2 = ((ulong)1L) << num; return((this.m_tipUnlockMask & num2) > 0L); }
public void UnlockConditionChanged() { if (Singleton <GameStateCtrl> .instance.GetCurrentState() is LobbyState) { int num = 1; int num2 = 0x1c; for (int i = num; i < num2; i++) { ResSpecialFucUnlock dataByKey = GameDataMgr.specialFunUnlockDatabin.GetDataByKey((uint)i); RES_SPECIALFUNCUNLOCK_TYPE type = (RES_SPECIALFUNCUNLOCK_TYPE)i; if (((dataByKey != null) && !this.TipsHasShow(type)) && ((dataByKey.bIsShowUnlockTip == 1) && this.FucIsUnlock(type))) { if (this.IsBottomBtn(type)) { Singleton <LobbyUISys> .instance.Play_UnLock_Animation(type); Singleton <CTimerManager> .GetInstance().AddTimer(0xbb8, 1, new CTimer.OnTimeUpHandler(this.on_checkunlock_time)); this.SetUnlockTipsMask(type); this.ReqUnlockTipsMask(); return; } this.SetUnlockTipsMask(type); this.ReqUnlockTipsMask(); } } } }
static CExploreView() { RES_SPECIALFUNCUNLOCK_TYPE[] res_specialfuncunlock_typeArray1 = new RES_SPECIALFUNCUNLOCK_TYPE[3]; res_specialfuncunlock_typeArray1[0] = RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ARENA; res_specialfuncunlock_typeArray1[2] = RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_LIUGUOYUANZHENG; s_unlockTypes = res_specialfuncunlock_typeArray1; s_exploreTypes = new string[] { "Explore_Common_Type_2", "Explore_Common_Type_1", "Explore_Common_Type_3" }; s_exploreColors = new Color[] { new Color(1f, 0f, 0.8470588f), new Color(0f, 0.627451f, 1f), new Color(1f, 0f, 0.04313726f) }; }
public static void InitExloreList(CUIFormScript form) { if (form != null) { int length = s_eventIDs.Length; CUIListElementScript elemenet = null; CUIStepListScript component = form.transform.Find("ExploreList").gameObject.GetComponent <CUIStepListScript>(); component.SetElementAmount(length); for (int i = 0; i < length; i++) { elemenet = component.GetElemenet(i); elemenet.GetComponent <CUIEventScript>().m_onClickEventID = s_eventIDs[i]; elemenet.gameObject.transform.Find("TitleBg/ExlporeNameText").GetComponent <Text>().text = Singleton <CTextManager> .instance.GetText(s_exploreTypes[i]); elemenet.gameObject.transform.Find("TitleBg/Image").GetComponent <Image>().color = s_exploreColors[i]; Image image = elemenet.gameObject.transform.Find("Icon").gameObject.GetComponent <Image>(); GameObject prefab = CUIUtility.GetSpritePrefeb(CUIUtility.s_Sprite_Dynamic_Adventure_Dir + (i + 1), false, false); if (prefab != null) { image.SetSprite(prefab); } GameObject gameObject = elemenet.transform.FindChild("Lock").gameObject; GameObject obj4 = elemenet.transform.FindChild("Unlock").gameObject; RES_SPECIALFUNCUNLOCK_TYPE type = s_unlockTypes[i]; if (Singleton <CFunctionUnlockSys> .instance.FucIsUnlock(type)) { image.color = CUIUtility.s_Color_White; gameObject.CustomSetActive(false); } else { image.color = CUIUtility.s_Color_GrayShader; gameObject.CustomSetActive(true); ResSpecialFucUnlock dataByKey = GameDataMgr.specialFunUnlockDatabin.GetDataByKey((uint)type); if (dataByKey != null) { gameObject.GetComponentInChildren <Text>().text = Utility.UTF8Convert(dataByKey.szLockedTip); } } if (s_unlockTypes[i] == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_NONE) { int lastChapter = CAdventureSys.GetLastChapter(1); ResChapterInfo info = GameDataMgr.chapterInfoDatabin.GetDataByKey(lastChapter); if (info != null) { obj4.CustomSetActive(true); obj4.GetComponentInChildren <Text>().text = string.Format(Singleton <CTextManager> .instance.GetText("Adventure_Chapter_Max_Tips"), Utility.UTF8Convert(info.szChapterName)); } } else { obj4.CustomSetActive(false); } } component.SelectElementImmediately(1); } }
public void Check_Enable(RES_SPECIALFUNCUNLOCK_TYPE type) { bool bShow = Singleton <CFunctionUnlockSys> .instance.TipsHasShow(type); if (!bShow && !Singleton <CFunctionUnlockSys> .instance.IsTypeHasCondition(type)) { bShow = true; } this.SetEnable(type, bShow); }
public void OpenUnlockTip(RES_SPECIALFUNCUNLOCK_TYPE type) { ResSpecialFucUnlock dataByKey = GameDataMgr.specialFunUnlockDatabin.GetDataByKey((uint)type); DebugHelper.Assert(dataByKey != null); if (dataByKey != null) { string tips = Utility.UTF8Convert(dataByKey.szUnlockTip); string icon = Utility.UTF8Convert(dataByKey.szUnlockTipIcon); this.OpenUnlockTip(tips, icon); Singleton <CUIManager> .instance.GetForm(FUC_UNLOCK_FORM_PATH).GetComponent <CUITimerScript>().m_eventParams[1].tag = (int)type; } }
private void _SetUnlockButton(Button btn, RES_GAME_ENTRANCE_TYPE entryType, bool bEnable) { RES_SPECIALFUNCUNLOCK_TYPE type = CUICommonSystem.EntryTypeToUnlockType(entryType); if (Singleton <CFunctionUnlockSys> .instance.FucIsUnlock(type) && bEnable) { CUICommonSystem.SetButtonEnableWithShader(btn, true, true); btn.GetComponent <CUIEventScript>().m_onClickEventParams.tag = (int)entryType; } else { CUICommonSystem.SetButtonEnableWithShader(btn, false, true); } }
public void Play_UnLock_Animation(RES_SPECIALFUNCUNLOCK_TYPE type) { string str = string.Empty; RES_SPECIALFUNCUNLOCK_TYPE res_specialfuncunlock_type = type; switch (res_specialfuncunlock_type) { case RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_UNION: str = "SocialBtn"; break; case RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_TASK: str = "TaskBtn"; break; case RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_HERO: str = "HeroBtn"; break; case RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_BAG: str = "BagBtn"; break; case RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_FRIEND: str = "FriendBtn"; break; case RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ADDEDSKILL: str = "AddedSkillBtn"; break; default: if (res_specialfuncunlock_type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_SYMBOL) { str = "SymbolBtn"; } break; } if (!string.IsNullOrEmpty(str)) { stUIEventParams eventParams = new stUIEventParams { tag = (int)type }; this.animatorScript.SetUIEvent(enAnimatorEventType.AnimatorEnd, enUIEventID.Lobby_UnlockAnimation_End, eventParams); this.animatorScript.PlayAnimator(str); Singleton <CSoundManager> .instance.PostEvent("UI_hall_system_unlock", null); } }
public bool IsTypeHasCondition(RES_SPECIALFUNCUNLOCK_TYPE type) { ResSpecialFucUnlock dataByKey = GameDataMgr.specialFunUnlockDatabin.GetDataByKey((uint)type); if (dataByKey != null) { for (int i = 0; i < dataByKey.UnlockArray.Length; i++) { uint num2 = dataByKey.UnlockArray[i]; if (num2 > 0) { return(true); } } } return(false); }
public void OpenUnlockTip(RES_SPECIALFUNCUNLOCK_TYPE type) { ResSpecialFucUnlock dataByKey = GameDataMgr.specialFunUnlockDatabin.GetDataByKey(type); DebugHelper.Assert(dataByKey != null); if (dataByKey == null) { return; } string tips = Utility.UTF8Convert(dataByKey.szUnlockTip); string icon = Utility.UTF8Convert(dataByKey.szUnlockTipIcon); this.OpenUnlockTip(tips, icon); CUIFormScript form = Singleton <CUIManager> .get_instance().GetForm(CFunctionUnlockSys.FUC_UNLOCK_FORM_PATH); form.GetComponent <CUITimerScript>().m_eventParams[1].tag = type; }
private void InitSysBtn(Button btn, RES_GAME_ENTRANCE_TYPE entryType, GameObject txtObj, GameObject coinTextObj) { RES_SPECIALFUNCUNLOCK_TYPE type = CUICommonSystem.EntryTypeToUnlockType(entryType); if (Singleton <CFunctionUnlockSys> .get_instance().FucIsUnlock(type)) { txtObj.CustomSetActive(false); coinTextObj.CustomSetActive(true); CUICommonSystem.SetButtonEnableWithShader(btn, true, true); btn.GetComponent <CUIEventScript>().m_onClickEventParams.tag = entryType; } else { txtObj.CustomSetActive(true); coinTextObj.CustomSetActive(false); CUICommonSystem.SetButtonEnableWithShader(btn, false, true); } }
protected override string Execute(string[] InArguments) { if (Singleton <GamePlayerCenter> .instance.GetHostPlayer() == null) { DebugHelper.Assert(false, "未获取到角色!"); return(CheatCommandBase.Done); } int num = 1; int num2 = 0x1c; for (int i = num; i < num2; i++) { RES_SPECIALFUNCUNLOCK_TYPE res_specialfuncunlock_type = (RES_SPECIALFUNCUNLOCK_TYPE)i; PlayerPrefs.SetInt(string.Concat(new object[] { "FunctionUnlockSys_", Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().playerUllUID, "_", res_specialfuncunlock_type.ToString() }), 0); } PlayerPrefs.Save(); return(CheatCommandBase.Done); }
private void SetEnable(RES_SPECIALFUNCUNLOCK_TYPE type, bool bShow) { GameObject obj2 = null; if (type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_HERO) { obj2 = this.hero_btn; } else if (type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_SYMBOL) { obj2 = this.symbol_btn; } else if (type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_BAG) { obj2 = this.bag_btn; } else if (type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_TASK) { obj2 = this.task_btn; } else if (type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_UNION) { obj2 = this.social_btn; } else if (type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ADDEDSKILL) { obj2 = this.addSkill_btn; } else { obj2 = null; } if (obj2 != null) { obj2.CustomSetActive(bShow); } }
public uint[] GetConditionParam(RES_SPECIALFUNCUNLOCK_TYPE type, RES_UNLOCKCONDITION_TYPE conditionType) { uint[] numArray = new uint[0]; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo(); ResSpecialFucUnlock dataByKey = GameDataMgr.specialFunUnlockDatabin.GetDataByKey((uint)type); if ((dataByKey != null) && (masterRoleInfo != null)) { for (int i = 0; i < dataByKey.UnlockArray.Length; i++) { uint key = dataByKey.UnlockArray[i]; if (key > 0) { ResUnlockCondition condition = GameDataMgr.unlockConditionDatabin.GetDataByKey(key); if ((condition != null) && (((RES_UNLOCKCONDITION_TYPE)condition.wUnlockType) == conditionType)) { return(condition.UnlockParam); } } } } return(numArray); }
public uint[] GetConditionParam(RES_SPECIALFUNCUNLOCK_TYPE type, RES_UNLOCKCONDITION_TYPE conditionType) { uint[] result = new uint[0]; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo(); ResSpecialFucUnlock dataByKey = GameDataMgr.specialFunUnlockDatabin.GetDataByKey((uint)type); if (dataByKey != null && masterRoleInfo != null) { for (int i = 0; i < dataByKey.UnlockArray.Length; i++) { uint num = dataByKey.UnlockArray[i]; if (num > 0u) { ResUnlockCondition dataByKey2 = GameDataMgr.unlockConditionDatabin.GetDataByKey(num); if (dataByKey2 != null && (RES_UNLOCKCONDITION_TYPE)dataByKey2.wUnlockType == conditionType) { return(dataByKey2.UnlockParam); } } } } return(result); }
public bool FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE type) { ResSpecialFucUnlock dataByKey = GameDataMgr.specialFunUnlockDatabin.GetDataByKey((uint)type); if (dataByKey == null) { return(true); } if (dataByKey.bIsAnd == 1) { for (int i = 0; i < dataByKey.UnlockArray.Length; i++) { uint num = dataByKey.UnlockArray[i]; if (num > 0u && !this.CheckUnlock(num)) { return(false); } } return(true); } bool flag = false; for (int j = 0; j < dataByKey.UnlockArray.Length; j++) { uint num2 = dataByKey.UnlockArray[j]; if (num2 > 0u) { flag = true; } if (num2 > 0u && this.CheckUnlock(num2)) { return(true); } } return(!flag); }
private bool IsBottomBtn(RES_SPECIALFUNCUNLOCK_TYPE type) { return(type == 18 || type == 8 || type == 19 || type == 16 || type == 13 || type == 20 || type == 22 || type == 28); }
public bool TipsHasShow(RES_SPECIALFUNCUNLOCK_TYPE type) { ulong num = 1uL << (int)type; return((this.m_tipUnlockMask & num) > 0uL); }
private void SetUnlockTipsMask(RES_SPECIALFUNCUNLOCK_TYPE type) { ulong num = 1uL << (int)type; this.m_tipUnlockMask |= num; }
private bool IsBottomBtn(RES_SPECIALFUNCUNLOCK_TYPE type) { return(type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_HERO || type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_SYMBOL || type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_BAG || type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_TASK || type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_UNION || type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_FRIEND || type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ADDEDSKILL || type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ACHIEVEMENT); }
public void Play_UnLock_Animation(RES_SPECIALFUNCUNLOCK_TYPE type) { this.m_LobbyForm.Play_UnLock_Animation(type); }
public static void InitExloreList(CUIFormScript form) { if (form != null) { int length = s_eventIDs.Length; CUIListElementScript elemenet = null; CUIStepListScript component = form.transform.Find("ExploreList").gameObject.GetComponent <CUIStepListScript>(); component.SetElementAmount(length); for (int i = 0; i < length; i++) { elemenet = component.GetElemenet(i); elemenet.GetComponent <CUIEventScript>().m_onClickEventID = s_eventIDs[i]; elemenet.gameObject.transform.Find("TitleBg/ExlporeNameText").GetComponent <Text>().text = Singleton <CTextManager> .instance.GetText(s_exploreTypes[i]); elemenet.gameObject.transform.Find("TitleBg/Image").GetComponent <Image>().color = s_exploreColors[i]; Image image2 = elemenet.gameObject.transform.Find("Icon").gameObject.GetComponent <Image>(); GameObject prefab = CUIUtility.GetSpritePrefeb(CUIUtility.s_Sprite_Dynamic_Adventure_Dir + (i + 1), false, false); if (prefab != null) { image2.SetSprite(prefab); } GameObject gameObject = elemenet.transform.FindChild("Lock").gameObject; GameObject obj4 = elemenet.transform.FindChild("Unlock").gameObject; RES_SPECIALFUNCUNLOCK_TYPE type = s_unlockTypes[i]; if (Singleton <CFunctionUnlockSys> .instance.FucIsUnlock(type)) { image2.color = CUIUtility.s_Color_White; gameObject.CustomSetActive(false); } else { image2.color = CUIUtility.s_Color_GrayShader; gameObject.CustomSetActive(true); ResSpecialFucUnlock dataByKey = GameDataMgr.specialFunUnlockDatabin.GetDataByKey((uint)type); if (dataByKey != null) { gameObject.GetComponentInChildren <Text>().text = Utility.UTF8Convert(dataByKey.szLockedTip); } } if (s_unlockTypes[i] == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_NONE) { int lastChapter = CAdventureSys.GetLastChapter(1); ResChapterInfo info = GameDataMgr.chapterInfoDatabin.GetDataByKey((long)lastChapter); if (info != null) { obj4.CustomSetActive(true); obj4.GetComponentInChildren <Text>().text = string.Format(Singleton <CTextManager> .instance.GetText("Adventure_Chapter_Max_Tips"), Utility.UTF8Convert(info.szChapterName)); } } else if (s_unlockTypes[i] == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ARENA) { if ((Singleton <CArenaSystem> .GetInstance().m_fightHeroInfoList == null) || (Singleton <CArenaSystem> .GetInstance().m_fightHeroInfoList.stArenaInfo.dwSelfRank == 0)) { obj4.CustomSetActive(false); } else { string str = string.Empty; str = string.Format(Singleton <CTextManager> .GetInstance().GetText("ExploreArenaRankText"), Singleton <CArenaSystem> .GetInstance().m_fightHeroInfoList.stArenaInfo.dwSelfRank); obj4.gameObject.transform.FindChild("Text").gameObject.GetComponent <Text>().text = str; obj4.CustomSetActive(true); } } else if (s_unlockTypes[i] == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_LIUGUOYUANZHENG) { BurnExpeditionModel model = Singleton <BurnExpeditionController> .GetInstance().model; if (model._data == null) { obj4.CustomSetActive(false); } else { string str2 = string.Empty; if (model.IsAllCompelte()) { str2 = string.Format(Singleton <CTextManager> .GetInstance().GetText("ExploreBurnFinishText"), new object[0]); } else { str2 = string.Format(Singleton <CTextManager> .GetInstance().GetText("ExploreBurnText"), Math.Max(1, model.Get_LastUnlockLevelIndex(model.curDifficultyType) + 1)); } obj4.gameObject.transform.FindChild("Text").gameObject.GetComponent <Text>().text = str2; obj4.CustomSetActive(true); } } } component.SelectElementImmediately(1); Text text2 = form.gameObject.transform.FindChild("AwardGroup/Name1").gameObject.GetComponent <Text>(); Text text3 = form.gameObject.transform.FindChild("AwardGroup/Name2").gameObject.GetComponent <Text>(); Image image = form.gameObject.transform.FindChild("AwardGroup/Icon1").gameObject.GetComponent <Image>(); Image image4 = form.gameObject.transform.FindChild("AwardGroup/Icon2").gameObject.GetComponent <Image>(); text2.gameObject.CustomSetActive(false); text3.gameObject.CustomSetActive(false); image.gameObject.CustomSetActive(false); image4.gameObject.CustomSetActive(false); uint key = 0; try { key = uint.Parse(Singleton <CTextManager> .GetInstance().GetText("ArenaAwardHeroId")); } catch (Exception) { } if (key != 0) { ResHeroCfgInfo info2 = GameDataMgr.heroDatabin.GetDataByKey(key); if (!Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsHaveHero(key, false) && (info2 != null)) { text2.gameObject.CustomSetActive(true); text2.text = string.Format(Singleton <CTextManager> .GetInstance().GetText("ArenaAwardHero"), info2.szName); image.gameObject.CustomSetActive(true); image.SetSprite(string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Icon_Dir, CSkinInfo.GetHeroSkinPic(key, 0)), form, true, false, false); } } key = 0; try { key = uint.Parse(Singleton <CTextManager> .GetInstance().GetText("BurningAwardHeroId")); } catch (Exception) { } if (key != 0) { ResHeroCfgInfo info3 = GameDataMgr.heroDatabin.GetDataByKey(key); if (!Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsHaveHero(key, false) && (info3 != null)) { text3.gameObject.CustomSetActive(true); text3.text = string.Format(Singleton <CTextManager> .GetInstance().GetText("BurningAwardHero"), info3.szName); image4.gameObject.CustomSetActive(true); image4.SetSprite(string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Icon_Dir, CSkinInfo.GetHeroSkinPic(key, 0)), form, true, false, false); } } } }
public static void InitExloreList(CUIFormScript form) { if (form == null) { return; } int num = CExploreView.s_eventIDs.Length; CUIStepListScript component = form.transform.Find("ExploreList").gameObject.GetComponent <CUIStepListScript>(); component.SetElementAmount(num); for (int i = 0; i < num; i++) { CUIListElementScript elemenet = component.GetElemenet(i); CUIEventScript component2 = elemenet.GetComponent <CUIEventScript>(); component2.m_onClickEventID = CExploreView.s_eventIDs[i]; Text component3 = elemenet.gameObject.transform.Find("TitleBg/ExlporeNameText").GetComponent <Text>(); component3.set_text(Singleton <CTextManager> .instance.GetText(CExploreView.s_exploreTypes[i])); Image component4 = elemenet.gameObject.transform.Find("TitleBg/Image").GetComponent <Image>(); component4.set_color(CExploreView.s_exploreColors[i]); Image component5 = elemenet.gameObject.transform.Find("Icon").gameObject.GetComponent <Image>(); GameObject spritePrefeb = CUIUtility.GetSpritePrefeb(CUIUtility.s_Sprite_Dynamic_Adventure_Dir + (i + 1), false, false); if (spritePrefeb != null) { component5.SetSprite(spritePrefeb, false); } GameObject gameObject = elemenet.transform.FindChild("Lock").gameObject; GameObject gameObject2 = elemenet.transform.FindChild("Unlock").gameObject; RES_SPECIALFUNCUNLOCK_TYPE rES_SPECIALFUNCUNLOCK_TYPE = CExploreView.s_unlockTypes[i]; if (Singleton <CFunctionUnlockSys> .instance.FucIsUnlock(rES_SPECIALFUNCUNLOCK_TYPE)) { component5.set_color(CUIUtility.s_Color_White); gameObject.CustomSetActive(false); } else { component5.set_color(CUIUtility.s_Color_GrayShader); gameObject.CustomSetActive(true); ResSpecialFucUnlock dataByKey = GameDataMgr.specialFunUnlockDatabin.GetDataByKey((uint)rES_SPECIALFUNCUNLOCK_TYPE); if (dataByKey != null) { gameObject.GetComponentInChildren <Text>().set_text(Utility.UTF8Convert(dataByKey.szLockedTip)); } } if (CExploreView.s_unlockTypes[i] == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_NONE) { int lastChapter = CAdventureSys.GetLastChapter(1); ResChapterInfo dataByKey2 = GameDataMgr.chapterInfoDatabin.GetDataByKey((long)lastChapter); if (dataByKey2 != null) { gameObject2.CustomSetActive(true); gameObject2.GetComponentInChildren <Text>().set_text(string.Format(Singleton <CTextManager> .instance.GetText("Adventure_Chapter_Max_Tips"), Utility.UTF8Convert(dataByKey2.szChapterName))); } } else if (CExploreView.s_unlockTypes[i] == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ARENA) { if (Singleton <CArenaSystem> .GetInstance().m_fightHeroInfoList == null || Singleton <CArenaSystem> .GetInstance().m_fightHeroInfoList.stArenaInfo.dwSelfRank == 0u) { gameObject2.CustomSetActive(false); } else { string text = string.Empty; text = string.Format(Singleton <CTextManager> .GetInstance().GetText("ExploreArenaRankText"), Singleton <CArenaSystem> .GetInstance().m_fightHeroInfoList.stArenaInfo.dwSelfRank); gameObject2.gameObject.transform.FindChild("Text").gameObject.GetComponent <Text>().set_text(text); gameObject2.CustomSetActive(true); } } else if (CExploreView.s_unlockTypes[i] == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_LIUGUOYUANZHENG) { BurnExpeditionModel model = Singleton <BurnExpeditionController> .GetInstance().model; if (model._data == null) { gameObject2.CustomSetActive(false); } else { string text2 = string.Empty; if (model.IsAllCompelte()) { text2 = string.Format(Singleton <CTextManager> .GetInstance().GetText("ExploreBurnFinishText"), new object[0]); } else { text2 = string.Format(Singleton <CTextManager> .GetInstance().GetText("ExploreBurnText"), Math.Max(1, model.Get_LastUnlockLevelIndex(model.curDifficultyType) + 1)); } gameObject2.gameObject.transform.FindChild("Text").gameObject.GetComponent <Text>().set_text(text2); gameObject2.CustomSetActive(true); } } } component.SelectElementImmediately(1); Text component6 = form.gameObject.transform.FindChild("AwardGroup/Name1").gameObject.GetComponent <Text>(); Text component7 = form.gameObject.transform.FindChild("AwardGroup/Name2").gameObject.GetComponent <Text>(); Image component8 = form.gameObject.transform.FindChild("AwardGroup/Icon1").gameObject.GetComponent <Image>(); Image component9 = form.gameObject.transform.FindChild("AwardGroup/Icon2").gameObject.GetComponent <Image>(); component6.gameObject.CustomSetActive(false); component7.gameObject.CustomSetActive(false); component8.gameObject.CustomSetActive(false); component9.gameObject.CustomSetActive(false); uint num2 = 0u; string empty = string.Empty; try { num2 = uint.Parse(Singleton <CTextManager> .GetInstance().GetText("ArenaAwardHeroId")); } catch (Exception) { } if (num2 != 0u) { ResHeroCfgInfo dataByKey3 = GameDataMgr.heroDatabin.GetDataByKey(num2); if (!Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsHaveHero(num2, false) && dataByKey3 != null) { component6.gameObject.CustomSetActive(true); component6.set_text(string.Format(Singleton <CTextManager> .GetInstance().GetText("ArenaAwardHero"), dataByKey3.szName)); component8.gameObject.CustomSetActive(true); component8.SetSprite(string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Icon_Dir, CSkinInfo.GetHeroSkinPic(num2, 0u)), form, true, false, false, false); } } num2 = 0u; try { num2 = uint.Parse(Singleton <CTextManager> .GetInstance().GetText("BurningAwardHeroId")); } catch (Exception) { } if (num2 != 0u) { ResHeroCfgInfo dataByKey4 = GameDataMgr.heroDatabin.GetDataByKey(num2); if (!Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().IsHaveHero(num2, false) && dataByKey4 != null) { component7.gameObject.CustomSetActive(true); component7.set_text(string.Format(Singleton <CTextManager> .GetInstance().GetText("BurningAwardHero"), dataByKey4.szName)); component9.gameObject.CustomSetActive(true); component9.SetSprite(string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Icon_Dir, CSkinInfo.GetHeroSkinPic(num2, 0u)), form, true, false, false, false); } } if (CSysDynamicBlock.bLobbyEntryBlocked) { Transform transform = form.transform.FindChild("AwardGroup"); if (transform) { transform.gameObject.CustomSetActive(false); } } }
private bool IsBottomBtn(RES_SPECIALFUNCUNLOCK_TYPE type) { return((type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_HERO) || ((type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_SYMBOL) || ((type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_BAG) || ((type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_TASK) || ((type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_UNION) || ((type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_FRIEND) || (type == RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_ADDEDSKILL))))))); }