public void ActivateLearnBtn(SkillSlotType inSlotType, bool bActivate, bool bAll) { NewbieGuideManager.CloseGuideForm(); if (!bAll && (inSlotType < SkillSlotType.SLOT_SKILL_1 || inSlotType > SkillSlotType.SLOT_SKILL_3)) { return; } List <GameObject> list = this.QuerySkillButtons(inSlotType, bAll); for (int i = 0; i < list.get_Count(); i++) { GameObject gameObject = list.get_Item(i); if (gameObject != null) { Transform transform = gameObject.transform.FindChild("LearnBtn"); if (!(transform == null)) { GameObject gameObject2 = transform.gameObject; Button component = gameObject2.GetComponent <Button>(); if (component) { component.enabled = bActivate; } CUIEventScript component2 = gameObject2.GetComponent <CUIEventScript>(); if (component2) { component2.enabled = bActivate; } } } } }
protected override string Execute(string[] InArguments, ref CSDT_CHEATCMD_DETAIL CheatCmdRef) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo != null && Singleton <LobbyLogic> .GetInstance().isLogin) { CheatCmdRef.stDyeNewbieBit = new CSDT_CHEAT_DYE_NEWBIE_BIT(); CheatCmdRef.stDyeNewbieBit.bOpenOrClose = 1; CheatCmdRef.stDyeNewbieBit.bIsAll = 0; CheatCmdRef.stDyeNewbieBit.dwApntBit = 0u; NewbieGuideManager.CompleteAllNewbieGuide(); return(CheatCommandBase.Done); } return("undone"); }
public void ActivateOtherBtn(enRestSkillSlotType inSlotType, bool bActivate, bool bAll) { NewbieGuideManager.CloseGuideForm(); if (!bAll && (inSlotType < enRestSkillSlotType.BTN_SKILL_SELHERO || inSlotType > enRestSkillSlotType.BTN_SKILL_COUNT)) { return; } if (bAll) { for (int i = 0; i < 3; i++) { GameObject gameObject = this.QueryRestSkillBtn((enRestSkillSlotType)i); if (gameObject != null) { Button component = gameObject.GetComponent <Button>(); if (component) { component.enabled = bActivate; } CUIEventScript component2 = gameObject.GetComponent <CUIEventScript>(); if (component2) { component2.enabled = bActivate; } } } } else { GameObject gameObject2 = this.QueryRestSkillBtn(inSlotType); if (gameObject2 != null) { Button component3 = gameObject2.GetComponent <Button>(); if (component3) { component3.enabled = bActivate; } CUIEventScript component4 = gameObject2.GetComponent <CUIEventScript>(); if (component4) { component4.enabled = bActivate; } } } }
public bool OpenBannerDlgByBannerGuideId(uint Id, CUIEvent uiEventParam = null) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); NewbieGuideBannerGuideConf dataByKey = GameDataMgr.newbieBannerGuideDatabin.GetDataByKey(Id); if ((masterRoleInfo == null) || (dataByKey == null)) { return(false); } int inIndex = NewbieGuideManager.ConvertNewbieBitToClientBit(dataByKey.dwGuideBit); if ((inIndex != 0) && (masterRoleInfo.IsClientBitsSet(inIndex) || CSysDynamicBlock.bNewbieBlocked)) { return(false); } int imgNum = 0; for (int i = 0; i < dataByKey.astPicPath.Length; i++) { if (dataByKey.astPicPath[i].dwID == 0) { break; } imgNum++; } string[] imgPath = new string[imgNum]; for (int j = 0; j < imgNum; j++) { imgPath[j] = string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Newbie_Dir, dataByKey.astPicPath[j].dwID.ToString()); } this.OpenBannerIntroDialog(imgPath, imgNum, uiEventParam, dataByKey.szTitleName, dataByKey.szBtnName, true); if (inIndex != 0) { masterRoleInfo.SetClientBits(inIndex, true, true); } return(true); }
public void Activate(SkillSlotType inSlotType, bool bActivate, bool bAll) { NewbieGuideManager.CloseGuideForm(); List <GameObject> list = this.QuerySkillButtons(inSlotType, bAll); for (int i = 0; i < list.get_Count(); i++) { GameObject gameObject = list.get_Item(i); if (gameObject != null) { Button component = gameObject.GetComponent <Button>(); if (component) { component.enabled = bActivate; } CUIEventScript component2 = gameObject.GetComponent <CUIEventScript>(); if (component2) { component2.enabled = bActivate; } } } if (!bActivate && Singleton <CBattleSystem> .GetInstance().FightForm != null && Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager != null) { if (bAll) { for (int j = 0; j < 10; j++) { Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager.SkillButtonUp(Singleton <CBattleSystem> .GetInstance().FightFormScript, (SkillSlotType)j, false, default(Vector2)); } } else { Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager.SkillButtonUp(Singleton <CBattleSystem> .GetInstance().FightFormScript, inSlotType, false, default(Vector2)); } } }