From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/UI/XMainInterface.cs | 3026 ++++++++++++++++++++ 1 file changed, 3026 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/UI/XMainInterface.cs (limited to 'Client/Assets/Scripts/XMainClient/UI/XMainInterface.cs') diff --git a/Client/Assets/Scripts/XMainClient/UI/XMainInterface.cs b/Client/Assets/Scripts/XMainClient/UI/XMainInterface.cs new file mode 100644 index 00000000..0fed08bc --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/UI/XMainInterface.cs @@ -0,0 +1,3026 @@ +using System; +using System.Collections.Generic; +using KKSG; +using MiniJSON; +using UILib; +using UnityEngine; +using XMainClient.UI.UICommon; +using XUpdater; +using XUtliPoolLib; + +namespace XMainClient.UI +{ + internal class XMainInterface : DlgBase + { + public XMainInterfaceDocument MainDoc + { + get + { + return this._main_doc; + } + } + + public bool MenuSwitchBtnState + { + get + { + return this._MenuSwitchBtnState; + } + } + + public override string fileName + { + get + { + return "Hall/HallDlg"; + } + } + + public override int layer + { + get + { + return 1; + } + } + + public override bool isMainUI + { + get + { + return true; + } + } + + public override bool autoload + { + get + { + return true; + } + } + + private bool _bH1Opened; + + private int _curPPT = 0; + + private XAchievementDocument _achievement_doc = null; + + private XMainInterfaceDocument _main_doc = null; + + private IPlatform _platform = null; + + private SceneType m_curScene; + + private DateTime _fatigePressTime = DateTime.Now; + + private uint _pressToken = 0u; + + private uint _fatigeRefreshToken = 0u; + + private DateTime _last_power_sound_time = DateTime.Now; + + public XMainInterfaceBriefHandler _TaskNaviHandler; + + public SkyArenaWaitHandler _WaitHandler; + + public HomeHandler _HomeHandler; + + public XYuyinView _yuyinHandler; + + public WeddingSceneHandler _WeddingHandler; + + public YorozuyaHandler _yorozuyaHandler; + + public DanceMotionHandler _DanceMotionHandler; + + public XMainSubstanceHandler _substanceHandler; + + public float DramaDlgCloseTime = 0f; + + private int _curExpInd = 0; + + private int _maxExpCount = 4; + + private XTimerMgr.ElapsedEventHandler _refreshFatigeTimeCb = null; + + private XTimerMgr.ElapsedEventHandler _showFatigeRecoverTimeCb = null; + + private GameCommunityHandler _GameCommunityHandler = null; + + private bool _V3SwitchBtnState = false; + + private bool _MenuSwitchBtnState = true; + + private bool _H2SwitchBtnState = true; + + public uint MulActTipsToken; + + private int _MulActTipsCD; + + private XLeftTimeCounter _LevelSealCDCounter = null; + + private bool isLevelSealCountdown = false; + + private float lastPingTime = -60f; + + private float lastDebugUITrigger = -1f; + + public bool fakeShow = true; + + private XFx m_activityFx = null; + + private bool m_isFromTime = false; + + private float m_fClickTime = 0f; + + private IXUIButton lastSelectV3Button = null; + + public XMainInterface() + { + this._refreshFatigeTimeCb = new XTimerMgr.ElapsedEventHandler(this.RefreshFatigeTime); + this._showFatigeRecoverTimeCb = new XTimerMgr.ElapsedEventHandler(this.ShowFatigeRecoverTime); + } + + protected override void Init() + { + this._platform = XSingleton.singleton.XPlatform; + XPlayer player = XSingleton.singleton.Player; + XPlayerAttributes xplayerAttributes = player.Attributes as XPlayerAttributes; + this._curPPT = (int)xplayerAttributes.GetAttr(XAttributeDefine.XAttr_POWER_POINT_Basic); + this._main_doc = XDocuments.GetSpecificDocument(XMainInterfaceDocument.uuID); + this._main_doc.View = this; + this._achievement_doc = XDocuments.GetSpecificDocument(XAchievementDocument.uuID); + this._achievement_doc.HallMainView = this; + this.DramaDlgCloseTime = 0f; + DlgHandlerBase.EnsureCreate(ref this._TaskNaviHandler, base.uiBehaviour.m_TaskNaviFrame.transform, true, null); + this._MulActTipsCD = XSingleton.singleton.GetInt("MulActivityTipsCD"); + this._V3SwitchBtnState = false; + this._MenuSwitchBtnState = true; + this._H2SwitchBtnState = true; + } + + protected override void OnLoad() + { + DlgHandlerBase.EnsureCreate(ref this._HomeHandler, base.uiBehaviour.m_HomeGo.transform, true, null); + DlgHandlerBase.EnsureCreate(ref this._yuyinHandler, base.uiBehaviour.transform, true, this); + DlgHandlerBase.EnsureCreate(ref this._WeddingHandler, base.uiBehaviour.m_HomeGo.transform, true, null); + DlgHandlerBase.EnsureCreate(ref this._substanceHandler, base.uiBehaviour.m_SysGrid, null, true); + DlgHandlerBase.EnsureCreate(ref this._yorozuyaHandler, base.uiBehaviour.transform, true, null); + DlgHandlerBase.EnsureCreate(ref this._DanceMotionHandler, base.uiBehaviour.m_DanceMotion, null, false); + bool flag = XSingleton.singleton.SceneType == SceneType.SKYCITY_WAITING || XSingleton.singleton.SceneType == SceneType.SCENE_HORSE || XSingleton.singleton.SceneType == SceneType.SCENE_BATTLEFIELD_READY || XSingleton.singleton.SceneType == SceneType.SCENE_BIGMELEE_READY; + if (flag) + { + DlgHandlerBase.EnsureCreate(ref this._WaitHandler, base.uiBehaviour.m_Canvas, true, this); + } + } + + protected override void OnUnload() + { + this._LevelSealCDCounter = null; + this.m_uiBehaviour.m_txtAvatar.SetTexturePath(""); + XBigMeleeEntranceDocument specificDocument = XDocuments.GetSpecificDocument(XBigMeleeEntranceDocument.uuID); + DlgHandlerBase.EnsureUnload(ref specificDocument.RankHandler); + DlgHandlerBase.EnsureUnload(ref this._HomeHandler); + DlgHandlerBase.EnsureUnload(ref this._WeddingHandler); + DlgHandlerBase.EnsureUnload(ref this._TaskNaviHandler); + DlgHandlerBase.EnsureUnload(ref this._WaitHandler); + DlgHandlerBase.EnsureUnload(ref this._yuyinHandler); + DlgHandlerBase.EnsureUnload(ref this._GameCommunityHandler); + DlgHandlerBase.EnsureUnload(ref this._substanceHandler); + DlgHandlerBase.EnsureUnload(ref this._yorozuyaHandler); + DlgHandlerBase.EnsureUnload(ref this._DanceMotionHandler); + this._main_doc.View = null; + XSingleton.singleton.Reset(); + this._MenuSwitchBtnState = true; + XSingleton.singleton.KillTimer(this.MulActTipsToken); + bool flag = this.m_activityFx != null; + if (flag) + { + XSingleton.singleton.DestroyFx(this.m_activityFx, true); + this.m_activityFx = null; + } + base.OnUnload(); + } + + protected override void OnShow() + { + base.OnShow(); + this.lastPingTime = -60f; + this._SetSceneUI(); + this._main_doc.Present(); + this.lastSelectV3Button = null; + XPlatformAbilityDocument.Doc.QueryQQVipInfo(); + DlgBase.singleton.ShowChatDefaultMiniUI(); + bool flag = !DlgBase.singleton.IsInited; + if (flag) + { + DlgBase.singleton.ShowPanel(false); + } + DlgBase.singleton.Show(true); + DlgBase.singleton.Show(true); + XFriendsDocument specificDocument = XDocuments.GetSpecificDocument(XFriendsDocument.uuID); + specificDocument.ReqFriendsInfo(); + this.RefreshSysAnnounce(); + base.uiBehaviour.m_RecoverTime.SetVisible(false); + XSingleton.singleton.InitFlyMgr(); + XSingleton.singleton.Init(); + this._InitH5(); + this.HandlerYuyin(); + this.RefreshMoneyInfo(0, false); + this.CalMenuSwitchBtnRedPointState(); + this.CalH2SwitchBtnRedPointState(null); + this._main_doc.OnLoadWebViewConfig(); + XDanceDocument.Doc.GetAllDanceIDs(); + this.SetActivityEffect(false); + } + + private void _InitH5() + { + foreach (XSysDefine sys in XSingleton.singleton.SysH5) + { + this.RefreshH5ButtonState(sys, false); + } + bool flag = this._substanceHandler != null && this._substanceHandler.IsVisible(); + if (flag) + { + this._substanceHandler.Sort(); + } + XSpectateDocument specificDocument = XDocuments.GetSpecificDocument(XSpectateDocument.uuID); + this.ShowLiveCount(specificDocument.LiveCount); + this.InitSevenLoginWhenShow(); + } + + protected override void OnSetVisiblePure(bool bShow) + { + base.OnSetVisiblePure(bShow); + if (bShow) + { + this._InitH5(); + this.RefreshMoneyInfo(0, false); + bool flag = DlgBase.singleton._TaskNaviHandler.TaskHandler.IsVisible(); + if (flag) + { + DlgBase.singleton._TaskNaviHandler.TaskHandler.RefreshData(); + } + } + } + + private void HandlerYuyin() + { + YuyinIconType type = YuyinIconType.Hall; + SceneType sceneType = XSingleton.singleton.SceneType; + if (sceneType <= SceneType.SCENE_GUILD_HALL) + { + if (sceneType != SceneType.SCENE_HALL) + { + if (sceneType == SceneType.SCENE_GUILD_HALL) + { + type = YuyinIconType.Guild; + } + } + else + { + type = YuyinIconType.Hall; + } + } + else if (sceneType != SceneType.SCENE_FAMILYGARDEN) + { + if (sceneType == SceneType.SCENE_LEISURE) + { + type = YuyinIconType.LEISURE; + } + } + else + { + type = YuyinIconType.HOME; + } + bool flag = this._yuyinHandler != null; + if (flag) + { + this._yuyinHandler.Refresh(type); + bool flag2 = this._yuyinHandler.m_panel != null && this._yuyinHandler.m_panel.gameObject != null; + if (flag2) + { + this._yuyinHandler.m_panel.gameObject.SetActive(this.fakeShow); + } + } + } + + protected override void OnHide() + { + base.OnHide(); + DlgBase.singleton.SetVisible(false, true); + DlgBase.singleton.Show(false); + DlgBase.singleton.Show(false); + this._LevelSealCDCounter = null; + } + + private void _SetSceneUI() + { + this.m_curScene = XSingleton.singleton.SceneType; + this._yorozuyaHandler.SetVisible(false); + SceneType curScene = this.m_curScene; + if (curScene <= SceneType.SKYCITY_WAITING) + { + if (curScene <= SceneType.SCENE_GUILD_HALL) + { + if (curScene == SceneType.SCENE_HALL) + { + this.SetHallUi(); + this._bH1Opened = true; + return; + } + if (curScene != SceneType.SCENE_GUILD_HALL) + { + goto IL_D8; + } + this.SetGuildHallUi(); + this._bH1Opened = false; + return; + } + else + { + if (curScene == SceneType.SCENE_FAMILYGARDEN) + { + this.SetHomeUi(); + this._bH1Opened = true; + return; + } + if (curScene != SceneType.SKYCITY_WAITING) + { + goto IL_D8; + } + } + } + else if (curScene <= SceneType.SCENE_BIGMELEE_READY) + { + if (curScene != SceneType.SCENE_HORSE && curScene != SceneType.SCENE_BIGMELEE_READY) + { + goto IL_D8; + } + } + else + { + if (curScene == SceneType.SCENE_WEDDING) + { + this.SetWeddingUI(); + this._bH1Opened = true; + return; + } + if (curScene != SceneType.SCENE_BATTLEFIELD_READY) + { + if (curScene != SceneType.SCENE_LEISURE) + { + goto IL_D8; + } + this.SetLeisureUi(); + this._bH1Opened = true; + return; + } + } + this.SetWaitingUi(); + this._bH1Opened = true; + return; + IL_D8: + this.SetHallUi(); + } + + private void SetHallUi() + { + this._TaskNaviHandler.SetVisible(true); + base.uiBehaviour.m_SysListH1.SetVisible(true); + base.uiBehaviour.m_SysListH0.SetVisible(true); + base.uiBehaviour.m_SysListV1.SetVisible(true); + base.uiBehaviour.m_SecondMenu.SetActive(true); + this._substanceHandler.SetVisible(true); + base.uiBehaviour.m_MenuSwitchBtn.SetVisible(true); + this._WeddingHandler.SetVisible(false); + this._HomeHandler.SetVisible(false); + base.uiBehaviour.m_SysListH3.SetVisible(false); + base.uiBehaviour.m_ExitGuild.SetVisible(false); + base.uiBehaviour.m_SysListGuildH1.SetVisible(false); + base.uiBehaviour.m_SysListGuildV1.SetVisible(false); + base.uiBehaviour.m_SysListGuildH2.SetVisible(false); + this.OnMainSysChange(); + } + + private void SetGuildHallUi() + { + this._WeddingHandler.SetVisible(false); + this._HomeHandler.SetVisible(false); + this._TaskNaviHandler.SetVisible(false); + base.uiBehaviour.m_SysListH3.SetVisible(false); + base.uiBehaviour.m_SysListH1.SetVisible(true); + base.uiBehaviour.m_SysListH0.SetVisible(false); + base.uiBehaviour.m_SysListV1.SetVisible(false); + base.uiBehaviour.m_SecondMenu.SetActive(false); + this._substanceHandler.SetVisible(true); + base.uiBehaviour.m_MenuSwitchBtn.SetVisible(true); + base.uiBehaviour.m_ExitGuild.SetVisible(true); + base.uiBehaviour.m_SysListGuildH1.SetVisible(true); + base.uiBehaviour.m_SysListGuildV1.SetVisible(true); + base.uiBehaviour.m_SysListGuildH2.SetVisible(true); + base.uiBehaviour.m_SysListH0.CloseList(); + base.uiBehaviour.m_SysListH3.CloseList(); + this._ShowGuildMenu(); + this.RefreshV3H1OnOtherScene(); + bool menuSwitchBtnState = this._MenuSwitchBtnState; + if (menuSwitchBtnState) + { + this.OnMenuSwitchBtnClick(null); + } + } + + private void SetWaitingUi() + { + this._WeddingHandler.SetVisible(false); + this._HomeHandler.SetVisible(false); + base.uiBehaviour.m_SysListH3.SetVisible(false); + base.uiBehaviour.m_SysListV1.SetVisible(false); + base.uiBehaviour.m_SecondMenu.SetActive(false); + base.uiBehaviour.m_ExitGuild.SetVisible(false); + this._substanceHandler.SetVisible(false); + base.uiBehaviour.m_SysListGuildH1.SetVisible(false); + base.uiBehaviour.m_SysListGuildV1.SetVisible(false); + base.uiBehaviour.m_SysListGuildH2.SetVisible(false); + XTeamDocument specificDocument = XDocuments.GetSpecificDocument(XTeamDocument.uuID); + bool flag = XSingleton.singleton.SceneType == SceneType.SKYCITY_WAITING; + if (flag) + { + this._TaskNaviHandler.SetVisible(specificDocument.bInTeam); + } + bool flag2 = XSingleton.singleton.SceneType == SceneType.SCENE_HORSE || XSingleton.singleton.SceneType == SceneType.SCENE_BIGMELEE_READY || XSingleton.singleton.SceneType == SceneType.SCENE_BATTLEFIELD_READY; + if (flag2) + { + this._TaskNaviHandler.SetVisible(false); + } + bool flag3 = XSingleton.singleton.SceneType == SceneType.SCENE_BIGMELEE_READY; + if (flag3) + { + base.uiBehaviour.m_SysListH1.SetVisible(false); + base.uiBehaviour.m_SysListH0.SetVisible(false); + base.uiBehaviour.m_MenuSwitchBtn.SetVisible(false); + } + else + { + base.uiBehaviour.m_SysListH1.SetVisible(true); + base.uiBehaviour.m_SysListH0.SetVisible(true); + base.uiBehaviour.m_MenuSwitchBtn.SetVisible(true); + } + this.RefreshV3H1OnOtherScene(); + } + + private void SetHomeUi() + { + this._HomeHandler.SetVisible(true); + this.BottomDownBtns(true); + this._WeddingHandler.SetVisible(false); + this._TaskNaviHandler.SetVisible(false); + base.uiBehaviour.m_ExitGuild.SetVisible(false); + base.uiBehaviour.m_SysListH0.SetVisible(false); + this._substanceHandler.SetVisible(false); + base.uiBehaviour.m_SysListV1.SetVisible(false); + base.uiBehaviour.m_SecondMenu.SetActive(false); + base.uiBehaviour.m_SysListGuildH1.SetVisible(false); + base.uiBehaviour.m_SysListGuildV1.SetVisible(false); + base.uiBehaviour.m_SysListGuildH2.SetVisible(false); + bool menuSwitchBtnState = this._MenuSwitchBtnState; + if (menuSwitchBtnState) + { + this.OnMenuSwitchBtnClick(null); + } + this.OnMainSysChange(); + } + + private void SetWeddingUI() + { + this._WeddingHandler.SetVisible(true); + base.uiBehaviour.m_V3SwitchBtn.SetVisible(true); + base.uiBehaviour.m_SysListV3.SetVisible(true); + this._HomeHandler.SetVisible(false); + this._TaskNaviHandler.SetVisible(false); + base.uiBehaviour.m_ExitGuild.SetVisible(false); + base.uiBehaviour.m_SysListV1.SetVisible(false); + base.uiBehaviour.m_SecondMenu.SetActive(false); + this._substanceHandler.SetVisible(false); + base.uiBehaviour.m_SysListGuildH1.SetVisible(false); + base.uiBehaviour.m_SysListGuildV1.SetVisible(false); + base.uiBehaviour.m_SysListGuildH2.SetVisible(false); + base.uiBehaviour.m_SysListH3.SetVisible(false); + base.uiBehaviour.m_SysListH1.SetVisible(false); + base.uiBehaviour.m_MenuSwitchBtn.SetVisible(false); + this.OnMainSysChange(); + } + + private void SetLeisureUi() + { + this._yorozuyaHandler.SetVisible(true); + this._WeddingHandler.SetVisible(false); + base.uiBehaviour.m_V3SwitchBtn.SetVisible(false); + base.uiBehaviour.m_SysListV3.SetVisible(false); + this._HomeHandler.SetVisible(false); + this._TaskNaviHandler.SetVisible(false); + base.uiBehaviour.m_ExitGuild.SetVisible(false); + base.uiBehaviour.m_SysListV1.SetVisible(false); + base.uiBehaviour.m_SecondMenu.SetActive(false); + this._substanceHandler.SetVisible(false); + base.uiBehaviour.m_SysListGuildH1.SetVisible(false); + base.uiBehaviour.m_SysListGuildV1.SetVisible(false); + base.uiBehaviour.m_SysListGuildH2.SetVisible(false); + base.uiBehaviour.m_SysListH3.SetVisible(false); + base.uiBehaviour.m_SysListH1.SetVisible(false); + base.uiBehaviour.m_MenuSwitchBtn.SetVisible(false); + } + + public void BottomDownBtns(bool visible) + { + base.uiBehaviour.m_V3SwitchBtn.SetVisible(visible); + base.uiBehaviour.m_SysListV3.SetVisible(visible); + base.uiBehaviour.m_SysListH3.SetVisible(visible); + base.uiBehaviour.m_SysListH1.SetVisible(visible); + base.uiBehaviour.m_MenuSwitchBtn.SetVisible(visible); + } + + public override void RegisterEvent() + { + base.uiBehaviour.m_MenuSwitchBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnMenuSwitchBtnClick)); + base.uiBehaviour.m_H2SwitchBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnH2SwitchBtnClick)); + base.uiBehaviour.m_H2ListTween.RegisterOnFinishEventHandler(new OnTweenFinishEventHandler(this.CalH2SwitchBtnRedPointState)); + base.uiBehaviour.m_PlayerAvatar.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnAvatarClick)); + for (int i = 0; i < base.uiBehaviour.m_SysButtonsMapping.Length; i++) + { + IXUIButton ixuibutton = base.uiBehaviour.m_SysButtonsMapping[i]; + bool flag = ixuibutton != null; + if (flag) + { + ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnSysIconClicked)); + } + } + base.uiBehaviour.m_ExitGuild.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnExitGuildClick)); + base.uiBehaviour.m_V3SwitchBtn.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnV3SwitchBtnClick)); + base.uiBehaviour.m_MotionDance.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnMotionClicked)); + base.uiBehaviour.m_MotionLover.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnMotionClicked)); + } + + public override void OnUpdate() + { + bool flag = !XSingleton.singleton.NeedFixedUpdate; + if (!flag) + { + base.OnUpdate(); + bool flag2 = this.isLevelSealCountdown && this._LevelSealCDCounter != null; + if (flag2) + { + this._LevelSealCDCounter.Update(); + } + bool v3SwitchBtnState = this._V3SwitchBtnState; + if (v3SwitchBtnState) + { + base.uiBehaviour.m_TransformLeftTime.Update(); + } + bool flag3 = this.lastDebugUITrigger > 0f; + if (flag3) + { + this.lastDebugUITrigger -= Time.deltaTime; + } + bool flag4 = this.lastDebugUITrigger <= 0f && Input.GetKey((KeyCode)285); + if (flag4) + { + DlgBase.singleton.Toggle(); + this.lastDebugUITrigger = 0.05f; + } + bool key = Input.GetKey((KeyCode)96); + if (key) + { + bool flag5 = Input.GetKey((KeyCode)256) || Input.GetKey((KeyCode)48); + if (flag5) + { + XSingleton.singleton.CustomCommand(0); + } + bool flag6 = Input.GetKey((KeyCode)257) || Input.GetKey((KeyCode)49); + if (flag6) + { + XSingleton.singleton.CustomCommand(1); + } + bool flag7 = Input.GetKey((KeyCode)258) || Input.GetKey((KeyCode)50); + if (flag7) + { + XSingleton.singleton.CustomCommand(2); + } + bool flag8 = Input.GetKey((KeyCode)259) || Input.GetKey((KeyCode)51); + if (flag8) + { + XSingleton.singleton.CustomCommand(3); + } + bool flag9 = Input.GetKey((KeyCode)260) || Input.GetKey((KeyCode)52); + if (flag9) + { + XSingleton.singleton.CustomCommand(4); + } + bool flag10 = Input.GetKey((KeyCode)261) || Input.GetKey((KeyCode)53); + if (flag10) + { + XSingleton.singleton.CustomCommand(5); + } + bool flag11 = Input.GetKey((KeyCode)262) || Input.GetKey((KeyCode)54); + if (flag11) + { + XSingleton.singleton.CustomCommand(6); + } + bool flag12 = Input.GetKey((KeyCode)263) || Input.GetKey((KeyCode)55); + if (flag12) + { + XSingleton.singleton.CustomCommand(7); + } + bool flag13 = Input.GetKey((KeyCode)264) || Input.GetKey((KeyCode)56); + if (flag13) + { + XSingleton.singleton.CustomCommand(8); + } + bool flag14 = Input.GetKey((KeyCode)265) || Input.GetKey((KeyCode)57); + if (flag14) + { + XSingleton.singleton.CustomCommand(9); + } + } + this.UpdateRedPointState(); + this.UpdateWifi(); + bool flag15 = Time.unscaledTime - this.lastPingTime > 60f || this.lastPingTime < 0f; + if (flag15) + { + this.lastPingTime = Time.unscaledTime; + this.RefreshPing(); + } + } + } + + public void RefreshMoneyInfo(int itemid = 0, bool bAnim = false) + { + for (int i = 0; i < this.m_uiBehaviour.m_MoneyList.Count; i++) + { + bool flag = itemid == 0 || this.m_uiBehaviour.m_MoneyList[i].ItemID == itemid; + if (flag) + { + this.m_uiBehaviour.m_MoneyList[i].RefreshValue(bAnim); + bool flag2 = itemid != 0; + if (flag2) + { + break; + } + } + } + } + + public void UpdateRedPointState() + { + } + + private void UpdateWifi() + { + IXUIButton sysButton = this.m_uiBehaviour.GetSysButton(XSysDefine.XSys_Wifi); + bool flag = sysButton != null; + if (flag) + { + XSingleton.singleton.UpdateWifi(sysButton, null); + } + } + + private void _ShowGuildMenu() + { + foreach (XSysDefine sys in base.uiBehaviour.m_SysGuild) + { + base.uiBehaviour.GetSysButton(sys).SetVisible(true); + } + this.OnGuildSysChange(); + base.uiBehaviour.m_SysListGuildH1.SetAnimateSmooth(true); + base.uiBehaviour.m_SysListGuildV1.SetAnimateSmooth(true); + base.uiBehaviour.m_SysListGuildH2.SetAnimateSmooth(true); + base.uiBehaviour.m_SysListGuildH1.Refresh(); + base.uiBehaviour.m_SysListGuildV1.Refresh(); + base.uiBehaviour.m_SysListGuildH2.Refresh(); + } + + public void RefreshSysAnnounce() + { + bool flag = XSingleton.singleton.SceneType != SceneType.SKYCITY_WAITING; + if (flag) + { + bool flag2 = DlgBase.singleton.IsVisible(); + if (flag2) + { + DlgBase.singleton.RefreshUI(); + } + } + } + + public void RefreshWelcomeBackFlow() + { + bool flag = this.MainDoc.BackFlow && XSingleton.singleton.SceneType == SceneType.SCENE_HALL; + if (flag) + { + this.OnShowFlowBack(); + } + } + + public void OnGuildSysChange() + { + XGuildDocument specificDocument = XDocuments.GetSpecificDocument(XGuildDocument.uuID); + foreach (XSysDefine sys in base.uiBehaviour.m_SysGuild) + { + uint unlockLevel = XGuildDocument.GuildConfig.GetUnlockLevel(sys); + IXUIButton sysButton = base.uiBehaviour.GetSysButton(sys); + Transform transform = sysButton.gameObject.transform.Find("OpenAtLevel"); + IXUILabel ixuilabel = null; + IXUISprite ixuisprite = sysButton.gameObject.GetComponent("XUISprite") as IXUISprite; + bool flag = transform != null; + if (flag) + { + ixuilabel = (transform.GetComponent("XUILabel") as IXUILabel); + ixuilabel.SetText(string.Empty); + } + bool flag2 = specificDocument.bInGuild && specificDocument.Level >= unlockLevel && XSingleton.singleton.IsSystemOpened(sys); + if (flag2) + { + try + { + bool flag3 = ixuisprite != null; + if (flag3) + { + ixuisprite.SetColor(Color.white); + } + bool flag4 = ixuilabel != null; + if (flag4) + { + ixuilabel.SetVisible(false); + } + } + catch (Exception ex) + { + XSingleton.singleton.AddErrorLog(sysButton.gameObject.name, null, null, null, null, null); + XSingleton.singleton.AddErrorLog(ex.Message, null, null, null, null, null); + } + } + else + { + bool flag5 = ixuilabel != null; + if (flag5) + { + ixuilabel.SetVisible(true); + } + } + } + foreach (XSysDefine xsysDefine in base.uiBehaviour.m_SysGuildNormal) + { + IXUIButton sysButton2 = base.uiBehaviour.GetSysButton(xsysDefine); + bool flag6 = XSingleton.singleton.IsSystemOpened(xsysDefine); + XSysDefine xsysDefine2 = xsysDefine; + if (xsysDefine2 == XSysDefine.XSys_GuildCollect || xsysDefine2 == XSysDefine.XSys_GuildCollectSummon) + { + XGuildCollectDocument specificDocument2 = XDocuments.GetSpecificDocument(XGuildCollectDocument.uuID); + flag6 = (flag6 && specificDocument2.ActivityState); + } + base.uiBehaviour.GetSysButton(xsysDefine).SetVisible(flag6); + } + base.uiBehaviour.m_SysListH2.Refresh(); + } + + public void OnTitanSysChange() + { + XPlayerAttributes attr = XSingleton.singleton.Player.Attributes as XPlayerAttributes; + bool flag = XSingleton.singleton.IsUIShowed(); + int num = 0; + for (int i = 0; i < base.uiBehaviour.m_SysH4.Length; i++) + { + XSysDefine xsysDefine = base.uiBehaviour.m_SysH4[i]; + bool flag2 = XSingleton.singleton.IsSystemOpened(xsysDefine, attr); + bool flag3 = flag; + if (flag3) + { + XSysDefine xsysDefine2 = xsysDefine; + if (xsysDefine2 == XSysDefine.XSys_Mail || xsysDefine2 == XSysDefine.XSys_Setting) + { + flag2 = false; + } + } + IXUIButton sysButton = base.uiBehaviour.GetSysButton(xsysDefine); + sysButton.SetVisible(flag2); + bool flag4 = flag2; + if (flag4) + { + num++; + } + } + } + + public void OnMainSysChange() + { + bool flag = !base.IsLoaded(); + if (!flag) + { + for (int i = 0; i < base.uiBehaviour.m_ListSys.Count; i++) + { + XSysDefine xsysDefine = base.uiBehaviour.m_ListSys[i]; + bool flag2 = XSingleton.singleton.SysH5.Contains(xsysDefine); + if (!flag2) + { + bool flag3 = base.uiBehaviour.m_SysGuildNormal.Contains(xsysDefine); + if (!flag3) + { + this.OnSingleSysChange(xsysDefine, false); + } + } + } + this.RefreshAllList(); + } + } + + public void OnSingleSysChange(XSysDefine sys, bool refreshList = true) + { + bool flag = !base.IsLoaded(); + if (!flag) + { + bool flag2 = base.uiBehaviour.GetSysButton(sys) == null; + if (!flag2) + { + bool flag3 = XSingleton.singleton.IsSystemOpened(sys, XSingleton.singleton.XPlayerData); + if (sys <= XSysDefine.XSys_Welfare_NiceGirl) + { + if (sys <= XSysDefine.XSys_OnlineReward) + { + if (sys != XSysDefine.XSys_Guild) + { + if (sys == XSysDefine.XSys_OnlineReward) + { + XOnlineRewardDocument specificDocument = XDocuments.GetSpecificDocument(XOnlineRewardDocument.uuID); + flag3 = (flag3 && specificDocument.CheckOver()); + } + } + else + { + flag3 = (flag3 && this.m_curScene != SceneType.SCENE_GUILD_HALL); + } + } + else if (sys != XSysDefine.XSys_Broadcast) + { + if (sys != XSysDefine.XSys_SevenActivity) + { + if (sys == XSysDefine.XSys_Welfare_NiceGirl) + { + flag3 = (flag3 && XWelfareDocument.Doc.ArgentaMainInterfaceState && !XWelfareDocument.Doc.IsNiceGirlTasksFinished()); + } + } + else + { + XSevenLoginDocument specificDocument2 = XDocuments.GetSpecificDocument(XSevenLoginDocument.uuID); + flag3 = (flag3 && specificDocument2.bHasAvailableSevenIcon); + } + } + else + { + flag3 = (flag3 && XSingleton.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ && this.IsSupportQgame()); + } + } + else if (sys <= XSysDefine.XSys_Photo) + { + if (sys != XSysDefine.XSys_OperatingActivity) + { + if (sys != XSysDefine.XSys_ThemeActivity) + { + if (sys == XSysDefine.XSys_Photo) + { + int num = int.Parse(XSingleton.singleton.GetValue("PlatfromAbility")); + flag3 = (num != 0 && this.m_curScene != SceneType.SCENE_HORSE_RACE && this.m_curScene != SceneType.SCENE_HORSE && this.m_curScene != SceneType.SCENE_HEROBATTLE && this.m_curScene != SceneType.SCENE_BIGMELEE_READY); + bool flag4 = flag3; + if (flag4) + { + flag3 = XSingleton.singleton.IsSystemOpened(XSysDefine.XSys_Photo); + } + } + } + else + { + XThemeActivityDocument specificDocument3 = XDocuments.GetSpecificDocument(XThemeActivityDocument.uuID); + flag3 = (flag3 && specificDocument3.isHasHallIcon()); + } + } + else + { + bool flag5 = XDocuments.GetSpecificDocument(XLevelSealDocument.uuID).IsShowLevelSealIcon(); + base.uiBehaviour.m_RemoveSealTip.SetVisible(flag5); + bool flag6 = flag5; + if (flag6) + { + this.ShowRemoveSealLeftTime(base.uiBehaviour.m_RemoveSealTip, ref this._LevelSealCDCounter, ref this.isLevelSealCountdown); + } + else + { + this._LevelSealCDCounter = null; + } + } + } + else if (sys != XSysDefine.XSys_QuickRide) + { + switch (sys) + { + case XSysDefine.XSys_GameCommunity: + break; + case XSysDefine.XSys_GameHorde: + break; + case XSysDefine.XSys_FriendCircle: + flag3 = (flag3 && XSingleton.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat); + break; + case XSysDefine.XSys_QQVIP: + flag3 = (flag3 && XSingleton.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ); + break; + case XSysDefine.XSys_SystemAnnounce: + flag3 = (flag3 && this.SetSystemAnnounce()); + break; + default: + if (sys == XSysDefine.XSys_Platform_StartPrivilege) + { + flag3 = (flag3 && (XSingleton.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat || XSingleton.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ)); + bool flag7 = flag3; + if (flag7) + { + IXUIButton sysButton = base.uiBehaviour.GetSysButton(XSysDefine.XSys_Platform_StartPrivilege); + bool flag8 = sysButton != null; + if (flag8) + { + Transform transform = sysButton.gameObject.transform.Find("seal"); + bool flag9 = transform != null; + if (flag9) + { + IXUISprite ixuisprite = transform.gameObject.GetComponent("XUISprite") as IXUISprite; + bool flag10 = ixuisprite != null; + if (flag10) + { + bool flag11 = XSingleton.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat; + if (flag11) + { + ixuisprite.spriteName = "ptic_04"; + } + else + { + bool flag12 = XSingleton.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ; + if (flag12) + { + ixuisprite.spriteName = "ptic_05"; + } + } + } + } + } + } + } + break; + } + } + else + { + flag3 = (flag3 && this.m_curScene != SceneType.SCENE_FAMILYGARDEN && this.m_curScene != SceneType.SCENE_GUILD_HALL && this.m_curScene != SceneType.SCENE_WEDDING && this.m_curScene != SceneType.SCENE_LEISURE); + } + base.uiBehaviour.GetSysButton(sys).SetVisible(flag3); + if (refreshList) + { + this.RefreshAllList(); + } + } + } + } + + public void RefreshAllList() + { + SceneType curScene = this.m_curScene; + if (curScene <= SceneType.SKYCITY_WAITING) + { + if (curScene <= SceneType.SCENE_GUILD_HALL) + { + if (curScene != SceneType.SCENE_HALL) + { + if (curScene != SceneType.SCENE_GUILD_HALL) + { + goto IL_CF; + } + base.uiBehaviour.m_SysListH2.Refresh(); + base.uiBehaviour.m_SysListH1.Refresh(); + goto IL_CF; + } + } + else + { + if (curScene == SceneType.SCENE_FAMILYGARDEN) + { + base.uiBehaviour.m_SysListH1.Refresh(); + base.uiBehaviour.m_SysListH3.Refresh(); + goto IL_CF; + } + if (curScene != SceneType.SKYCITY_WAITING) + { + goto IL_CF; + } + } + } + else + { + if (curScene > SceneType.SCENE_BIGMELEE_READY) + { + if (curScene != SceneType.SCENE_WEDDING) + { + if (curScene == SceneType.SCENE_BATTLEFIELD_READY) + { + goto IL_5E; + } + if (curScene != SceneType.SCENE_LEISURE) + { + goto IL_CF; + } + } + return; + } + if (curScene != SceneType.SCENE_HORSE && curScene != SceneType.SCENE_BIGMELEE_READY) + { + goto IL_CF; + } + } + IL_5E: + base.uiBehaviour.m_SysListH1.Refresh(); + base.uiBehaviour.m_SysListH0.Refresh(); + IL_CF: + base.uiBehaviour.m_SysListV1.Refresh(); + base.uiBehaviour.m_SysListV2.Refresh(); + base.uiBehaviour.m_SysListV3.Refresh(); + base.uiBehaviour.m_SysListH2_1.Refresh(); + base.uiBehaviour.m_SysListH2_2.Refresh(); + this.RefreshListSwitchBtnVisable(base.uiBehaviour.m_V3SwitchBtn, base.uiBehaviour.m_SysListV3, null); + this.RefreshListSwitchBtnVisable(base.uiBehaviour.m_H2SwitchBtn, base.uiBehaviour.m_SysListH2_1, base.uiBehaviour.m_SysListH2_2); + this._TaskNaviHandler.OnSysChange(); + } + + public void RefreshH5ButtonState(XSysDefine sys, bool refreshList = true) + { + bool flag = !base.IsVisible(); + if (!flag) + { + bool flag2 = this._substanceHandler != null && this._substanceHandler.IsVisible(); + if (flag2) + { + this._substanceHandler.RefreshMainSubStance(sys, refreshList); + } + } + } + + public void FakeShowSelf(bool bShow) + { + this.fakeShow = bShow; + base.uiBehaviour.m_MainMenuGo.SetActive(bShow); + DlgBase.singleton.Show(bShow); + DlgBase.singleton.Show(bShow); + base.uiBehaviour.m_PING.SetActive(bShow); + bool flag = this._WaitHandler != null; + if (flag) + { + this._WaitHandler.SetVisible(bShow); + } + SceneType curScene = this.m_curScene; + if (curScene <= SceneType.SKYCITY_WAITING) + { + if (curScene <= SceneType.SCENE_GUILD_HALL) + { + if (curScene == SceneType.SCENE_HALL) + { + base.uiBehaviour.m_ExitGuild.SetVisible(false); + base.uiBehaviour.m_SecondMenu.SetActive(bShow); + this._TaskNaviHandler.SetVisible(bShow); + goto IL_234; + } + if (curScene != SceneType.SCENE_GUILD_HALL) + { + goto IL_213; + } + base.uiBehaviour.m_ExitGuild.SetVisible(bShow); + this._TaskNaviHandler.SetVisible(false); + base.uiBehaviour.m_SecondMenu.SetActive(false); + goto IL_234; + } + else + { + if (curScene == SceneType.SCENE_FAMILYGARDEN) + { + XHomeCookAndPartyDocument doc = XHomeCookAndPartyDocument.Doc; + bool flag2 = doc.CurBanquetState == 0u; + if (flag2) + { + this._HomeHandler.SetVisible(bShow); + } + base.uiBehaviour.m_ExitGuild.SetVisible(false); + this._TaskNaviHandler.SetVisible(false); + base.uiBehaviour.m_SecondMenu.SetActive(false); + goto IL_234; + } + if (curScene != SceneType.SKYCITY_WAITING) + { + goto IL_213; + } + } + } + else + { + if (curScene > SceneType.SCENE_BIGMELEE_READY) + { + if (curScene != SceneType.SCENE_WEDDING) + { + if (curScene == SceneType.SCENE_BATTLEFIELD_READY) + { + goto IL_13F; + } + if (curScene != SceneType.SCENE_LEISURE) + { + goto IL_213; + } + } + base.uiBehaviour.m_ExitGuild.SetVisible(false); + this._TaskNaviHandler.SetVisible(false); + base.uiBehaviour.m_SecondMenu.SetActive(false); + goto IL_234; + } + if (curScene != SceneType.SCENE_HORSE && curScene != SceneType.SCENE_BIGMELEE_READY) + { + goto IL_213; + } + } + IL_13F: + XTeamDocument specificDocument = XDocuments.GetSpecificDocument(XTeamDocument.uuID); + base.uiBehaviour.m_ExitGuild.SetVisible(false); + this._TaskNaviHandler.SetVisible(bShow && specificDocument.bInTeam); + base.uiBehaviour.m_SecondMenu.SetActive(false); + goto IL_234; + IL_213: + base.uiBehaviour.m_SecondMenu.SetActive(bShow); + this._TaskNaviHandler.SetVisible(bShow); + IL_234: + base.uiBehaviour.m_AvatarFrame.SetActive(bShow); + bool flag3 = this._yuyinHandler != null; + if (flag3) + { + this._yuyinHandler.m_panel.gameObject.SetActive(bShow); + } + DlgBase.singleton.SetFakeHide(!bShow || !base.IsVisible()); + this.RefreshSysAnnounce(); + foreach (XSysDefine sys in XSingleton.singleton.SysH5) + { + this.RefreshH5ButtonState(sys, false); + } + bool flag4 = this._substanceHandler != null && this._substanceHandler.IsVisible(); + if (flag4) + { + this._substanceHandler.Sort(); + } + this.SetActivityEffect(false); + } + + public Vector3 GetNewIconFlyPosH1(XSysDefine sys) + { + XPlayerAttributes xplayerAttributes = XSingleton.singleton.Player.Attributes as XPlayerAttributes; + string name; + if (sys != XSysDefine.XSys_Item_Enhance) + { + name = base.uiBehaviour.GetSysButton(sys).gameObject.name; + } + else + { + name = base.uiBehaviour.GetSysButton(XSysDefine.XSys_Item).gameObject.name; + } + Vector3 childWorldPos = DlgBase.GetChildWorldPos(name); + return XSingleton.singleton.UIRoot.InverseTransformPoint(childWorldPos); + } + + public void SetActivityEffect(bool isFromTime) + { + bool flag = isFromTime && this.m_isFromTime; + if (!flag) + { + this.m_isFromTime = isFromTime; + bool flag2 = !this.fakeShow; + if (!flag2) + { + IXUIButton ixuibutton = base.uiBehaviour.m_SysButtonsMapping[57]; + bool flag3 = ixuibutton == null; + if (!flag3) + { + bool flag4 = this.m_activityFx == null; + if (flag4) + { + this.m_activityFx = XSingleton.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_shuangbeijiangli", ixuibutton.gameObject.transform.Find("Icon/Duck"), false); + } + bool flag5 = XActivityDocument.Doc.MainCityNeedEffect(); + this.m_activityFx.SetActive(flag5); + bool flag6 = flag5; + if (flag6) + { + XFx.SyncRefreshUIRenderQueue(this.m_activityFx); + } + } + } + } + } + + public void SetGridAnimateSmooth(bool b) + { + base.uiBehaviour.m_SysListH1.SetAnimateSmooth(b); + base.uiBehaviour.m_SysListH0.SetAnimateSmooth(b); + base.uiBehaviour.m_SysListV1.SetAnimateSmooth(b); + } + + public void SetupBaseInfo(XAttributes attr) + { + int profID = XFastEnumIntEqualityComparer.ToInt(XSingleton.singleton.Player.PlayerAttributes.Profession); + this.SetAvatar(XSingleton.singleton.GetProfHeadIcon(profID)); + this.SetVip(); + this.SetLevel(attr.Level); + this.RefreshQQVipInfo(); + this.RefreshGameCenterInfo(); + this.RefreshSelfMemberPrivilegeIcon(); + this.SetPowerpoint(this._curPPT); + this.SetExp(attr as XPlayerAttributes); + XFriendsDocument.Doc.SDKQueryFriends(); + ILuaGameInfo luaGameInfo = XSingleton.singleton.XLuaEngine.luaGameInfo; + luaGameInfo.exp = (uint)attr.Exp; + luaGameInfo.maxexp = (uint)attr.MaxExp; + luaGameInfo.level = attr.Level; + luaGameInfo.name = attr.Name; + luaGameInfo.ppt = this._curPPT; + luaGameInfo.coin = (uint)XSingleton.singleton.Doc.XBagDoc.GetItemCount(1); + luaGameInfo.energy = (uint)XSingleton.singleton.Doc.XBagDoc.GetItemCount(6); + luaGameInfo.dia = (uint)XSingleton.singleton.Doc.XBagDoc.GetItemCount(9); + luaGameInfo.draggon = (uint)XSingleton.singleton.Doc.XBagDoc.GetItemCount(7); + } + + public void SetAvatar(string name) + { + IXUISprite ixuisprite = base.uiBehaviour.m_AvatarFrame.transform.Find("Avatar").GetComponent("XUISprite") as IXUISprite; + ixuisprite.spriteName = name; + this.SetTencentImage(); + } + + public void RefreshQQVipInfo() + { + bool flag = !base.IsLoaded(); + if (!flag) + { + GameObject gameObject = base.uiBehaviour.m_AvatarFrame.transform.Find("CoverPanel/QQVIP").gameObject; + GameObject gameObject2 = base.uiBehaviour.m_AvatarFrame.transform.Find("CoverPanel/QQSVIP").gameObject; + QQVipInfoClient qqvipInfo = XPlatformAbilityDocument.Doc.QQVipInfo; + bool flag2 = XSingleton.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ && XSingleton.singleton.IsSystemOpened(XSysDefine.XSys_QQVIP) && qqvipInfo != null; + if (flag2) + { + gameObject.SetActive(qqvipInfo.is_vip && !qqvipInfo.is_svip); + gameObject2.SetActive(qqvipInfo.is_svip); + } + else + { + gameObject.SetActive(false); + gameObject2.SetActive(false); + } + } + } + + public void RefreshGameCenterInfo() + { + bool flag = !base.IsLoaded(); + if (!flag) + { + bool flag2 = !base.IsVisible(); + if (!flag2) + { + GameObject gameObject = base.uiBehaviour.m_AvatarFrame.transform.Find("CoverPanel/WC").gameObject; + bool flag3 = XSingleton.singleton.Channel == XAuthorizationChannel.XAuthorization_WeChat && XSingleton.singleton.IsSystemOpened(XSysDefine.XSys_Platform_StartPrivilege) && XSingleton.singleton.GetLaunchTypeServerInfo() == StartUpType.StartUp_WX; + if (flag3) + { + gameObject.SetActive(true); + } + else + { + gameObject.SetActive(false); + } + } + } + } + + public void RefreshSelfMemberPrivilegeIcon() + { + bool flag = !base.IsLoaded(); + if (!flag) + { + bool flag2 = DlgBase.singleton.IsVisible(); + if (flag2) + { + IXUISprite ixuisprite = base.uiBehaviour.m_AvatarFrame.transform.Find("CoverPanel/Tq").GetComponent("XUISprite") as IXUISprite; + ixuisprite.SetSprite(XWelfareDocument.GetSelfMemberPrivilegeIconName()); + } + } + } + + public void SetTencentImage() + { + bool flag = XSingleton.singleton.playerInfo != null; + if (flag) + { + string pictureLarge = XSingleton.singleton.playerInfo.data.pictureLarge; + XSingleton.singleton.SetMainIcon(pictureLarge); + XSingleton.singleton.Load(pictureLarge, this.m_uiBehaviour.m_txtAvatar, this.m_uiBehaviour); + } + else + { + XSingleton.singleton.Load(string.Empty, this.m_uiBehaviour.m_txtAvatar, this.m_uiBehaviour); + } + this.SetHeadIcon(); + } + + public void SetHeadIcon() + { + XPrerogativeDocument specificDocument = XDocuments.GetSpecificDocument(XPrerogativeDocument.uuID); + XSingleton.singleton.ParseHeadIcon(specificDocument.PlayerSetid, base.uiBehaviour.m_sprFrame); + } + + public void SetVip() + { + XRechargeDocument specificDocument = XDocuments.GetSpecificDocument(XRechargeDocument.uuID); + } + + public void SetLevel(uint lv) + { + base.uiBehaviour.m_Level.SetText(lv.ToString()); + } + + private void RefreshPing() + { + XSingleton.singleton.RefreshPing(base.uiBehaviour.m_lblTime, base.uiBehaviour.m_sliderBattery, base.uiBehaviour.m_lblFree); + } + + public void SetName(string name) + { + } + + public void SetPowerpoint(int value) + { + IXUILabel ixuilabel = base.uiBehaviour.m_PlayerPPT.transform.Find("Power").GetComponent("XUILabel") as IXUILabel; + this._curPPT = value; + ixuilabel.SetText(value.ToString()); + DlgBase.singleton.ShowPPT(value); + } + + public void OnPowerpointChanged(int oldValue, int newValue) + { + } + + public void SetExp(XPlayerAttributes attr) + { + } + + public void RefreshFatigeTime(object obj) + { + uint timeLeft = DlgBase.singleton.GetTimeLeft(ItemEnum.FATIGUE); + ulong virtualItemCount = XSingleton.singleton.Doc.XBagDoc.GetVirtualItemCount(ItemEnum.FATIGUE); + ulong num = ulong.Parse(XSingleton.singleton.GetValue("MaxRecoverFatigue")); + base.uiBehaviour.m_CurFatige.SetText(string.Format("{0}/{1}", virtualItemCount, num)); + bool flag = virtualItemCount >= num; + if (flag) + { + base.uiBehaviour.m_CoverOneTime.SetText("00:00"); + base.uiBehaviour.m_AllCoverTime.SetText("00:00"); + bool flag2 = this._fatigeRefreshToken > 0u; + if (flag2) + { + XSingleton.singleton.KillTimer(this._fatigeRefreshToken); + this._fatigeRefreshToken = 0u; + } + } + else + { + base.uiBehaviour.m_CoverOneTime.SetText(DlgBase.singleton.FormatTime(timeLeft)); + uint time = (uint)((ulong)timeLeft + (num - virtualItemCount) * 360UL); + base.uiBehaviour.m_AllCoverTime.SetText(DlgBase.singleton.FormatTime(time)); + this._fatigeRefreshToken = XSingleton.singleton.SetTimer(1f, this._refreshFatigeTimeCb, null); + } + } + + public void ShowFatigeRecoverTime(object obj) + { + base.uiBehaviour.m_RecoverTime.SetVisible(true); + this.RefreshFatigeTime(null); + } + + private void OnPressAddFatige(IXUIButton sp, bool state) + { + if (state) + { + this._fatigePressTime = DateTime.Now; + this._pressToken = XSingleton.singleton.SetTimer(0.3f, this._showFatigeRecoverTimeCb, null); + } + else + { + bool flag = !base.uiBehaviour.m_RecoverTime.IsVisible(); + if (flag) + { + DlgBase.singleton.ShowBorad(ItemEnum.FATIGUE); + } + else + { + base.uiBehaviour.m_RecoverTime.SetVisible(false); + } + bool flag2 = this._pressToken > 0u; + if (flag2) + { + XSingleton.singleton.KillTimer(this._pressToken); + this._pressToken = 0u; + } + bool flag3 = this._fatigeRefreshToken > 0u; + if (flag3) + { + XSingleton.singleton.KillTimer(this._fatigeRefreshToken); + this._fatigeRefreshToken = 0u; + } + } + } + + public void ForceOpenSysIcons(XSysDefine sys) + { + this.SetGridAnimateSmooth(false); + bool flag = !this._bH1Opened; + if (flag) + { + this._bH1Opened = true; + this.OnMainSysChange(); + } + } + + public void OnSysChange(XSysDefine sys) + { + this.OnMainSysChange(); + } + + private void OnAvatarClick(IXUISprite go) + { + bool flag = !base.IsLoaded(); + if (!flag) + { + bool flag2 = DlgBase.singleton.IsVisible(); + DlgBase.singleton.SetVisible(!flag2, true); + bool flag3 = XSingleton.singleton.SceneType != SceneType.SCENE_BIGMELEE_READY; + if (flag3) + { + DlgBase.singleton.SetVisibleWithAnimation(true, null); + } + } + } + + private bool _CanClick() + { + float time = Time.time; + bool flag = time - this.m_fClickTime > 3f; + bool result; + if (flag) + { + this.m_fClickTime = time; + result = true; + } + else + { + result = false; + } + return result; + } + + private bool OnExitGuildClick(IXUIButton go) + { + bool flag = !base.IsLoaded(); + bool result; + if (flag) + { + result = true; + } + else + { + bool flag2 = !this._CanClick(); + if (flag2) + { + result = true; + } + else + { + XSingleton.singleton.ReqLeaveScene(); + bool flag3 = XSingleton.singleton.SceneType == SceneType.SCENE_FAMILYGARDEN; + if (flag3) + { + HomePlantDocument doc = HomePlantDocument.Doc; + doc.ClearFarmInfo(); + doc.HomeSprite.ClearInfo(); + doc.GardenId = 0UL; + } + result = true; + } + } + return result; + } + + private void ShowCharSysListFrame() + { + XPlayerAttributes attr = XSingleton.singleton.Player.Attributes as XPlayerAttributes; + int num = 28; + for (int i = 0; i < base.uiBehaviour.m_SysChar.Length; i++) + { + bool flag = XSingleton.singleton.IsSystemOpened(base.uiBehaviour.m_SysChar[i], attr); + base.uiBehaviour.GetSysButton(base.uiBehaviour.m_SysChar[i]).SetVisible(flag); + bool flag2 = flag; + if (flag2) + { + num += 80; + } + } + } + + private bool TryCheckInGuildSystem(XSysDefine sys) + { + bool flag = !base.IsLoaded(); + bool result; + if (flag) + { + XSingleton.singleton.AddErrorLog("XMainInterface is Dispose!", null, null, null, null, null); + result = false; + } + else + { + bool flag2 = Array.IndexOf(base.uiBehaviour.m_SysGuild, sys) == -1; + if (flag2) + { + result = true; + } + else + { + XGuildDocument specificDocument = XDocuments.GetSpecificDocument(XGuildDocument.uuID); + bool flag3 = !specificDocument.bInGuild; + if (flag3) + { + result = false; + } + else + { + uint unlockLevel = XGuildDocument.GuildConfig.GetUnlockLevel(sys); + bool flag4 = specificDocument.Level < unlockLevel; + if (flag4) + { + XSingleton.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_MAZE_NO_GUILD_LEVEL", new object[] + { + unlockLevel + }), "fece00"); + result = false; + } + else + { + bool flag5 = !XSingleton.singleton.IsSystemOpened(sys); + if (flag5) + { + XSingleton.singleton.ShowSystemTip(XStringDefineProxy.GetString("GUILD_MAZE_NO_PLAYER_LEVEL", new object[] + { + XSingleton.singleton.GetSystemOpenLevel(sys) + }), "fece00"); + result = false; + } + else + { + result = true; + } + } + } + } + } + return result; + } + + public void OnSysIconClicked(XSysDefine sys) + { + this.OnSysIconClicked(base.uiBehaviour.GetSysButton(sys)); + } + + public bool OnSysIconClicked(IXUIButton go) + { + bool flag = !base.IsLoaded(); + bool result; + if (flag) + { + result = true; + } + else + { + XSysDefine xsysDefine = (XSysDefine)go.ID; + bool flag2 = this.DramaDlgCloseTime > 0f; + if (flag2) + { + bool flag3 = Time.time - this.DramaDlgCloseTime < 1f; + if (flag3) + { + return true; + } + } + bool flag4 = !this.TryCheckInGuildSystem(xsysDefine); + if (flag4) + { + result = true; + } + else + { + Dictionary dictionary = new Dictionary(); + XSysDefine xsysDefine2 = xsysDefine; + if (xsysDefine2 <= XSysDefine.XSys_OldFriendsBack) + { + if (xsysDefine2 <= XSysDefine.XSys_MentorshipMsg_Tip) + { + if (xsysDefine2 <= XSysDefine.XSys_WeekEndNest) + { + if (xsysDefine2 <= XSysDefine.XSys_Home_MyHome) + { + switch (xsysDefine2) + { + case XSysDefine.XSys_Character: + this.ShowCharSysListFrame(); + goto IL_1362; + case XSysDefine.XSys_Level: + { + DlgBase.singleton.IsTaskMode = false; + bool flag5 = XSingleton.singleton.SceneID != 1u; + if (flag5) + { + DlgBase.singleton.FadeShow(); + } + else + { + this._TaskNaviHandler.NavigateToBattle(); + } + goto IL_1362; + } + case XSysDefine.XSys_Item: + DlgBase.singleton.ShowWorkGameSystem(XSysDefine.XSys_Item); + goto IL_1362; + case XSysDefine.XSys_Skill: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_Char: + case XSysDefine.XSys_Fashion: + case XSysDefine.XSys_Bag: + case XSysDefine.XSys_TShow: + case XSysDefine.XSys_Confession: + case XSysDefine.XSys_TShowRule: + case XSysDefine.XSys_FlowerRank: + case XSysDefine.XSys_Camp: + case XSysDefine.XSys_Design: + case XSysDefine.XSys_SuperReward: + case XSysDefine.XSys_Draw: + case XSysDefine.XSys_Mall: + case XSysDefine.XSys_Target: + case (XSysDefine)36: + case XSysDefine.XSys_ServerActivity: + case (XSysDefine)38: + case XSysDefine.XSys_LevelReward: + case (XSysDefine)43: + case XSysDefine.XSys_ReceiveEnergy: + case XSysDefine.XSys_SystemActivity: + case XSysDefine.XSys_BossRush: + case XSysDefine.XSys_DragonCrusade: + case XSysDefine.XSys_Arena: + case XSysDefine.XSys_Activity: + case (XSysDefine)53: + case XSysDefine.XSys_MulActivity: + case XSysDefine.XSys_PVPAcitivity: + case XSysDefine.XSys_DragonCoin: + case (XSysDefine)66: + case XSysDefine.XSys_WeekShareReward: + case XSysDefine.XSys_DungeonShareReward: + case XSysDefine.XSys_Maquee: + case XSysDefine.XSys_SendFlower: + case XSysDefine.XSys_Mentorship: + case XSysDefine.XSys_3GFree: + case XSysDefine.XSys_ChatGroup: + case (XSysDefine)79: + case (XSysDefine)83: + case (XSysDefine)84: + case XSysDefine.XSys_GuildRedPacket: + case XSysDefine.XSys_GayValley: + case XSysDefine.XSys_GayValleyManager: + goto IL_133D; + case XSysDefine.XSys_Horse: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_Guild: + { + XGuildDocument specificDocument = XDocuments.GetSpecificDocument(XGuildDocument.uuID); + bool flag6 = specificDocument != null; + if (flag6) + { + specificDocument.TryShowGuildHallUI(); + } + goto IL_1362; + } + case XSysDefine.XSys_Recycle: + DlgBase.singleton.ShowWorkGameSystem(XSysDefine.XSys_Recycle); + goto IL_1362; + case XSysDefine.XSys_Auction: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_CardCollect: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_Mail: + DlgBase.singleton.ShowWorkGameSystem(XSysDefine.XSys_Mail_System); + goto IL_1362; + case XSysDefine.XSys_Wifi: + goto IL_1362; + case XSysDefine.XSys_Strong: + DlgBase.singleton.ShowContent(FunctionDef.ZHANLI); + goto IL_1362; + case XSysDefine.XSys_Reward: + DlgBase.singleton.ShowWorkGameSystem(XSysDefine.XSys_Reward); + goto IL_1362; + case XSysDefine.XSys_OnlineReward: + DlgBase.singleton.SetVisible(true, true); + goto IL_1362; + case XSysDefine.XSys_Setting: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_Rank: + DlgBase.singleton.ShowRank(XSysDefine.XSys_Rank); + goto IL_1362; + case XSysDefine.XSys_EquipCreate: + DlgBase.singleton.ShowWorkGameSystem(XSysDefine.XSys_EquipCreate); + goto IL_1362; + case XSysDefine.XSys_LevelSeal: + DlgBase.singleton.Show(XSysDefine.XSys_LevelSeal, false); + goto IL_1362; + case XSysDefine.XSys_SuperRisk: + DlgBase.singleton.Show(true, 0); + goto IL_1362; + case XSysDefine.XSys_Qualifying: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_Spectate: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_DailyAcitivity: + DlgBase.singleton.ShowWorkGameSystem(XSysDefine.XSys_DailyAcitivity); + goto IL_1362; + case XSysDefine.XSys_ExcellentLive: + { + XSpectateDocument specificDocument2 = XDocuments.GetSpecificDocument(XSpectateDocument.uuID); + specificDocument2.ClickData = specificDocument2.MainInterfaceData; + specificDocument2.SetMainInterfaceBtnFalse(); + string label = string.Format(XSingleton.singleton.ReplaceReturn(XStringDefineProxy.GetString("ExcellentLiveTips")), specificDocument2.GetTitle(specificDocument2.ClickData.liveInfo)); + string @string = XStringDefineProxy.GetString("COMMON_OK"); + string string2 = XStringDefineProxy.GetString("COMMON_CANCEL"); + XSingleton.singleton.ShowModalDialog(label, @string, string2, new ButtonClickEventHandler(this.OnExcellentLiveClick)); + goto IL_1362; + } + case XSysDefine.XSys_MobaAcitivity: + DlgBase.singleton.ShowWorkGameSystem(XSysDefine.XSys_MobaAcitivity); + goto IL_1362; + case XSysDefine.XSys_Money: + XSingleton.singleton.OpenSystem(XSysDefine.XSys_Recharge, 0UL); + goto IL_1362; + case XSysDefine.XSys_Coin: + { + XPurchaseView singleton = DlgBase.singleton; + singleton.ReqQuickCommonPurchase(ItemEnum.GOLD); + goto IL_1362; + } + case XSysDefine.XSys_Power: + { + XPurchaseView singleton2 = DlgBase.singleton; + singleton2.ReqQuickCommonPurchase(ItemEnum.FATIGUE); + goto IL_1362; + } + case XSysDefine.XSys_GameMall: + DlgBase.singleton.ShowMall(XSysDefine.XSys_GameMall_Dragon, MallType.WEEK, 0UL); + goto IL_1362; + case XSysDefine.XSys_Carnival: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_OtherPlayerInfo: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_Chat: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_Friends: + DlgBase.singleton.OnShowFriendDlg(); + goto IL_1362; + case XSysDefine.XSys_PK: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_Broadcast: + this.OnQGameClick(go); + goto IL_1362; + case XSysDefine.XSys_GuildHall: + { + XGuildDocument specificDocument3 = XDocuments.GetSpecificDocument(XGuildDocument.uuID); + bool flag7 = !specificDocument3.bInGuild; + if (flag7) + { + XSingleton.singleton.ShowSystemTip(ErrorCode.ERR_GUILD_NOT_IN_GUILD, "fece00"); + } + else + { + DlgBase.singleton.SetVisibleWithAnimation(true, null); + } + goto IL_1362; + } + case XSysDefine.XSys_GuildRelax: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_GuildDragon: + break; + case XSysDefine.XSys_GuildPvp: + goto IL_A0D; + case XSysDefine.XSys_GuildMine: + goto IL_A54; + case XSysDefine.XSys_CrossGVG: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_Team: + { + DlgBase.singleton.ShowTeamView(); + XTeamDocument specificDocument4 = XDocuments.GetSpecificDocument(XTeamDocument.uuID); + goto IL_1362; + } + case XSysDefine.XSys_SevenActivity: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_Title: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + default: + switch (xsysDefine2) + { + case XSysDefine.XSys_Home: + case XSysDefine.XSys_Home_Cooking: + case XSysDefine.XSys_Home_Fishing: + case XSysDefine.XSys_Home_Feast: + case XSysDefine.XSys_Home_MyHome: + DlgBase.singleton.ShowWorkGameSystem(xsysDefine); + goto IL_1362; + case XSysDefine.XSys_Home_Plant: + DlgBase.singleton.ShowWorkGameSystem(XSysDefine.XSys_Home); + goto IL_1362; + default: + goto IL_133D; + } + break; + } + } + else + { + if (xsysDefine2 == XSysDefine.XSys_Pet_Pairs) + { + DlgBase.singleton.SetVisible(true, true); + goto IL_1362; + } + if (xsysDefine2 != XSysDefine.XSys_WeekEndNest) + { + goto IL_133D; + } + DlgBase.singleton.SetVisible(true, true); + goto IL_1362; + } + } + else if (xsysDefine2 <= XSysDefine.XSys_Rank_WorldBoss) + { + if (xsysDefine2 == XSysDefine.XSys_Mall_Home) + { + DlgBase.singleton.ShowShopSystem(xsysDefine, 0UL); + goto IL_1362; + } + if (xsysDefine2 != XSysDefine.XSys_Rank_WorldBoss) + { + goto IL_133D; + } + DlgBase.singleton.ShowRank(XSysDefine.XSys_Rank_WorldBoss); + XWorldBossDocument specificDocument5 = XDocuments.GetSpecificDocument(XWorldBossDocument.uuID); + specificDocument5.SetMainInterfaceBtnState(false); + goto IL_1362; + } + else + { + if (xsysDefine2 == XSysDefine.XSys_LevelSeal_Tip) + { + XLevelSealDocument specificDocument6 = XDocuments.GetSpecificDocument(XLevelSealDocument.uuID); + specificDocument6.ReqLevelSealButtonClick(); + goto IL_1362; + } + if (xsysDefine2 != XSysDefine.XSys_MentorshipMsg_Tip) + { + goto IL_133D; + } + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + } + } + else if (xsysDefine2 <= XSysDefine.XSys_Welfare_FirstRechange) + { + if (xsysDefine2 <= XSysDefine.XSys_Battlefield) + { + if (xsysDefine2 == XSysDefine.XSys_Activity_WorldBoss) + { + DlgBase.singleton.ShowView(); + goto IL_1362; + } + switch (xsysDefine2) + { + case XSysDefine.XSys_Activity_CaptainPVP: + { + XCaptainPVPDocument specificDocument7 = XDocuments.GetSpecificDocument(XCaptainPVPDocument.uuID); + specificDocument7.SetMainInterfaceBtnState(false); + string label2 = XSingleton.singleton.ReplaceReturn(XStringDefineProxy.GetString("MainInterfaceCaptainPVPTips")); + string string3 = XStringDefineProxy.GetString("BtnTips_EnterNow"); + string string4 = XStringDefineProxy.GetString("BtnTips_Then"); + XSingleton.singleton.ShowModalDialog(label2, string3, string4, new ButtonClickEventHandler(this.OnCaptainJoin)); + goto IL_1362; + } + case XSysDefine.XSys_Activity_GoddessTrial: + case XSysDefine.XSys_Activity_TeamTowerSingle: + goto IL_133D; + case XSysDefine.XSys_BigMelee: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_BigMeleeEnd: + { + XBigMeleeEntranceDocument specificDocument8 = XDocuments.GetSpecificDocument(XBigMeleeEntranceDocument.uuID); + DlgHandlerBase.EnsureCreate(ref specificDocument8.RankHandler, base.uiBehaviour.m_Canvas, true, null); + specificDocument8.RankHandler.SetType(false); + specificDocument8.MainInterfaceStateEnd = false; + this.RefreshH5ButtonState(XSysDefine.XSys_BigMeleeEnd, true); + goto IL_1362; + } + case XSysDefine.XSys_Battlefield: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + XBattleFieldEntranceDocument.Doc.SetMainInterfaceBtnState(false); + goto IL_1362; + default: + goto IL_133D; + } + } + else + { + switch (xsysDefine2) + { + case XSysDefine.XSys_MulActivity_SkyArena: + XSingleton.singleton.OpenSystem(XSysDefine.XSys_MulActivity_SkyArena, 0UL); + goto IL_1362; + case XSysDefine.XSys_MulActivity_Race: + XSingleton.singleton.OpenSystem(XSysDefine.XSys_MulActivity_Race, 0UL); + goto IL_1362; + case XSysDefine.XSys_MulActivity_WeekendParty: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_MulActivity_SkyArenaEnd: + { + DlgBase.singleton.ShowRank(XSysDefine.XSys_Rank_SkyArena); + PtcC2M_MulActivityIconSysReq ptcC2M_MulActivityIconSysReq = new PtcC2M_MulActivityIconSysReq(); + ptcC2M_MulActivityIconSysReq.Data.id = (uint)XFastEnumIntEqualityComparer.ToInt(XSysDefine.XSys_MulActivity_SkyArenaEnd); + XSingleton.singleton.Send(ptcC2M_MulActivityIconSysReq); + XSkyArenaEntranceDocument.Doc.MainInterfaceStateEnd = false; + this.RefreshH5ButtonState(XSysDefine.XSys_MulActivity_SkyArenaEnd, true); + goto IL_1362; + } + case (XSysDefine)556: + case (XSysDefine)557: + case (XSysDefine)558: + case (XSysDefine)559: + goto IL_133D; + case XSysDefine.XSys_Welfare: + DlgBase.singleton.Show(XSysDefine.XSys_None); + goto IL_1362; + default: + if (xsysDefine2 != XSysDefine.XSys_Welfare_FirstRechange) + { + goto IL_133D; + } + DlgBase.singleton.Show(XSysDefine.XSys_Welfare_FirstRechange); + goto IL_1362; + } + } + } + else if (xsysDefine2 <= XSysDefine.Xsys_Backflow) + { + if (xsysDefine2 == XSysDefine.XSys_Welfare_NiceGirl) + { + DlgBase.singleton.Show(XSysDefine.XSys_Welfare_NiceGirl); + goto IL_1362; + } + if (xsysDefine2 != XSysDefine.Xsys_Backflow) + { + goto IL_133D; + } + DlgBase.singleton.SetVisible(true, true); + goto IL_1362; + } + else + { + if (xsysDefine2 == XSysDefine.Xsys_TaJieHelp) + { + DlgBase.singleton.SetVisible(true, true); + goto IL_1362; + } + if (xsysDefine2 == XSysDefine.XSys_OperatingActivity) + { + DlgBase.singleton.Show(XSysDefine.XSys_None, false); + goto IL_1362; + } + if (xsysDefine2 != XSysDefine.XSys_OldFriendsBack) + { + goto IL_133D; + } + DlgBase.singleton.Show(XSysDefine.XSys_OldFriendsBack, false); + goto IL_1362; + } + } + else if (xsysDefine2 <= XSysDefine.XSys_GuildMineMain) + { + if (xsysDefine2 <= XSysDefine.XSys_GuildRelax_VoiceQA) + { + if (xsysDefine2 <= XSysDefine.XSys_GroupRecruitAuthorize) + { + if (xsysDefine2 == XSysDefine.XSys_NPCFavor) + { + XSingleton.singleton.OpenSystem(XSysDefine.XSys_NPCFavor, 0UL); + goto IL_1362; + } + if (xsysDefine2 != XSysDefine.XSys_GroupRecruitAuthorize) + { + goto IL_133D; + } + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + } + else + { + if (xsysDefine2 == XSysDefine.XSys_ThemeActivity) + { + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + } + if (xsysDefine2 != XSysDefine.XSys_GuildRelax_VoiceQA) + { + goto IL_133D; + } + XVoiceQADocument specificDocument9 = XDocuments.GetSpecificDocument(XVoiceQADocument.uuID); + bool isVoiceQAIng = specificDocument9.IsVoiceQAIng; + if (isVoiceQAIng) + { + DlgBase.singleton.SetVisible(true, true); + } + else + { + string label3 = XSingleton.singleton.ReplaceReturn(XStringDefineProxy.GetString("VoiceQA_Enter_Description_" + specificDocument9.TempType.ToString())); + string string5 = XStringDefineProxy.GetString("VoiceQA_Enter_btn1"); + string string6 = XStringDefineProxy.GetString("VoiceQA_Enter_btn2"); + XSingleton.singleton.ShowModalDialog(label3, string5, string6, new ButtonClickEventHandler(this.OnVoiceQAJoin), new ButtonClickEventHandler(this.OnVoiceQARefuse), false, XTempTipDefine.OD_START, 50); + } + goto IL_1362; + } + } + else if (xsysDefine2 <= XSysDefine.XSys_GuildBoon_RedPacket) + { + if (xsysDefine2 == XSysDefine.XSys_GuildRelax_JokerMatch) + { + XGuildJockerMatchDocument specificDocument10 = XDocuments.GetSpecificDocument(XGuildJockerMatchDocument.uuID); + specificDocument10.SendReqJokerMatchJoin(); + goto IL_1362; + } + if (xsysDefine2 != XSysDefine.XSys_GuildBoon_RedPacket) + { + goto IL_133D; + } + XGuildRedPacketDocument specificDocument11 = XDocuments.GetSpecificDocument(XGuildRedPacketDocument.uuID); + specificDocument11.ReqGetLast(); + goto IL_1362; + } + else + { + if (xsysDefine2 == XSysDefine.XSys_GuildChallenge) + { + goto IL_1362; + } + if (xsysDefine2 == XSysDefine.XSys_GuildQualifier) + { + XGuildDocument specificDocument12 = XDocuments.GetSpecificDocument(XGuildDocument.uuID); + bool flag8 = !specificDocument12.bInGuild; + if (flag8) + { + XSingleton.singleton.ShowSystemTip(ErrorCode.ERR_GUILD_NOT_IN_GUILD, "fece00"); + } + else + { + DlgBase.singleton.SetVisibleWithAnimation(true, null); + } + goto IL_1362; + } + if (xsysDefine2 != XSysDefine.XSys_GuildMineMain) + { + goto IL_133D; + } + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + } + } + else if (xsysDefine2 <= XSysDefine.XSys_IDIP_ZeroReward) + { + if (xsysDefine2 <= XSysDefine.XSys_GuildInherit) + { + if (xsysDefine2 == XSysDefine.XSys_GuildDailyTask) + { + DlgBase.singleton.SetVisible(true, true); + goto IL_1362; + } + if (xsysDefine2 != XSysDefine.XSys_GuildInherit) + { + goto IL_133D; + } + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + } + else + { + switch (xsysDefine2) + { + case XSysDefine.XSys_JockerKing: + { + XJokerKingDocument specificDocument13 = XDocuments.GetSpecificDocument(XJokerKingDocument.uuID); + specificDocument13.JokerKingMatchAdd(); + goto IL_1362; + } + case XSysDefine.XSys_Team_TeamList: + case XSysDefine.XSys_Team_MyTeam: + case XSysDefine.XSys_GuildWeeklyBountyTask: + goto IL_133D; + case XSysDefine.XSys_Team_Invited: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_GuildDailyRefresh: + DlgBase.singleton.SetVisible(true, true); + goto IL_1362; + case XSysDefine.XSys_GuildDailyRequest: + DlgBase.singleton.SetVisible(true, true); + goto IL_1362; + default: + { + if (xsysDefine2 != XSysDefine.XSys_IDIP_ZeroReward) + { + goto IL_133D; + } + XIDIPDocument specificDocument14 = XDocuments.GetSpecificDocument(XIDIPDocument.uuID); + string leftTimeString = specificDocument14.GetLeftTimeString(); + bool flag9 = leftTimeString == "0"; + if (flag9) + { + specificDocument14.ZeroRewardBtnState = false; + this.RefreshH5ButtonState(XSysDefine.XSys_IDIP_ZeroReward, true); + } + else + { + string label4 = string.Format(XStringDefineProxy.GetString("IDIP_TIPS_ZEROREWARDClick"), leftTimeString); + XSingleton.singleton.ShowModalDialog(label4, XStringDefineProxy.GetString("COMMON_OK")); + } + goto IL_1362; + } + } + } + } + else if (xsysDefine2 <= XSysDefine.XSys_SpriteSystem) + { + if (xsysDefine2 == XSysDefine.XSys_Photo) + { + XDanceDocument.Doc.GetAllDanceIDs(); + this.RefreshV3BtnSelect(go); + DlgBase.singleton.SetVisible(true, true); + DlgBase.singleton.ShowMainView(); + goto IL_1362; + } + if (xsysDefine2 != XSysDefine.XSys_SpriteSystem) + { + goto IL_133D; + } + DlgBase.singleton.ShowWorkGameSystem(XSysDefine.XSys_SpriteSystem_Main); + goto IL_1362; + } + else + { + switch (xsysDefine2) + { + case XSysDefine.XSys_QuickRide: + { + this.RefreshV3BtnSelect(go); + XPetDocument specificDocument15 = XDocuments.GetSpecificDocument(XPetDocument.uuID); + bool flag10 = XSingleton.singleton.XPlayerData.Outlook.state.type == OutLookStateType.OutLook_RidePetCopilot; + if (flag10) + { + specificDocument15.OnReqOffPetPairRide(); + } + else + { + bool flag11 = specificDocument15.Pets.Count == 0; + if (flag11) + { + XSingleton.singleton.ShowSystemTip(XStringDefineProxy.GetString("PET_NONE"), "fece00"); + } + else + { + specificDocument15.ReqRecentMount(); + } + } + goto IL_1362; + } + case XSysDefine.XSys_AppStore_Praise: + case (XSysDefine)946: + case (XSysDefine)947: + case (XSysDefine)948: + case XSysDefine.XSys_WebView: + case XSysDefine.XSys_GameHorde: + case (XSysDefine)955: + case XSysDefine.XSys_ProfessionChange: + case XSysDefine.XSys_Questionnaire: + case (XSysDefine)964: + case (XSysDefine)965: + case (XSysDefine)966: + case (XSysDefine)967: + case (XSysDefine)968: + case (XSysDefine)969: + goto IL_133D; + case XSysDefine.XSys_Transform: + { + XTransformDocument specificDocument16 = XDocuments.GetSpecificDocument(XTransformDocument.uuID); + specificDocument16.ReqSwitch(); + goto IL_1362; + } + case XSysDefine.XSys_GameCommunity: + { + bool flag12 = this._GameCommunityHandler == null; + if (flag12) + { + this._GameCommunityHandler = DlgHandlerBase.EnsureCreate(ref this._GameCommunityHandler, base.uiBehaviour.m_SecondMenu.transform, true, this); + } + else + { + this._GameCommunityHandler.SetVisible(!this._GameCommunityHandler.IsVisible()); + } + goto IL_1362; + } + case XSysDefine.XSys_FriendCircle: + dictionary["link"] = XSingleton.singleton.GetValue("FriendsCircleUrl"); + XSingleton.singleton.XPlatform.SendExtDara("open_wx_deeplink", Json.Serialize(dictionary)); + goto IL_1362; + case XSysDefine.XSys_QQVIP: + XPlatformAbilityDocument.Doc.ClickRedPointNtf(); + XPlatformAbilityDocument.Doc.OpenQQVipRechargeH5(); + goto IL_1362; + case XSysDefine.XSys_SystemAnnounce: + DlgBase.singleton.SetVisible(true, true); + goto IL_1362; + case XSysDefine.XSys_HeroBattle: + { + XHeroBattleDocument specificDocument17 = XDocuments.GetSpecificDocument(XHeroBattleDocument.uuID); + specificDocument17.MaininterfaceState = false; + this.RefreshH5ButtonState(XSysDefine.XSys_HeroBattle, true); + string label5 = XSingleton.singleton.ReplaceReturn(XStringDefineProxy.GetString("MainInterfaceHeroBattlePVPTips")); + string string7 = XStringDefineProxy.GetString("BtnTips_EnterNow"); + string string8 = XStringDefineProxy.GetString("BtnTips_Then"); + XSingleton.singleton.ShowModalDialog(label5, string7, string8, new ButtonClickEventHandler(this.OnHeroBattleJoin)); + goto IL_1362; + } + case XSysDefine.XSys_GuildBossMainInterface: + break; + case XSysDefine.XSys_GuildMineMainInterface: + goto IL_A54; + case XSysDefine.XSys_GuildPvpMainInterface: + goto IL_A0D; + case XSysDefine.XSys_TeamLeague: + { + XFreeTeamVersusLeagueDocument specificDocument18 = XDocuments.GetSpecificDocument(XFreeTeamVersusLeagueDocument.uuID); + specificDocument18.SetMainInterfaceBtnState(false); + string label6 = XSingleton.singleton.ReplaceReturn(XStringDefineProxy.GetString("MainInterfaceTeamLeagueTips")); + string string9 = XStringDefineProxy.GetString("BtnTips_EnterNow"); + string string10 = XStringDefineProxy.GetString("BtnTips_Then"); + XSingleton.singleton.ShowModalDialog(label6, string9, string10, new ButtonClickEventHandler(this.OnTeamLeagueJoin)); + goto IL_1362; + } + case XSysDefine.XSys_GuildMineEnd: + { + RpcC2M_QueryResWar rpcC2M_QueryResWar = new RpcC2M_QueryResWar(); + rpcC2M_QueryResWar.oArg.param = QueryResWarEnum.RESWAR_FLOWAWARD; + XSingleton.singleton.Send(rpcC2M_QueryResWar); + XGuildMineEntranceDocument specificDocument19 = XDocuments.GetSpecificDocument(XGuildMineEntranceDocument.uuID); + specificDocument19.MainInterfaceStateEnd = false; + this.RefreshH5ButtonState(XSysDefine.XSys_GuildMineEnd, true); + goto IL_1362; + } + case XSysDefine.XSys_GuildTerritory: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_GuildTerritoryIconInterface: + { + XGuildTerritoryDocument specificDocument20 = XDocuments.GetSpecificDocument(XGuildTerritoryDocument.uuID); + specificDocument20.OnClickTerritoryIcon(); + goto IL_1362; + } + case XSysDefine.XSys_GuildTerritoryAllianceInterface: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_GuildTerritoryMessageInterface: + { + DlgBase.singleton.SetVisibleWithAnimation(true, null); + XGuildTerritoryDocument specificDocument21 = XDocuments.GetSpecificDocument(XGuildTerritoryDocument.uuID); + specificDocument21.bHavaShowMessageIcon = false; + goto IL_1362; + } + default: + if (xsysDefine2 == XSysDefine.XSys_Platform_StartPrivilege) + { + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + } + switch (xsysDefine2) + { + case XSysDefine.XSys_Exchange: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_GuildCollectMainInterface: + { + XGuildCollectDocument specificDocument22 = XDocuments.GetSpecificDocument(XGuildCollectDocument.uuID); + specificDocument22.SetMainInterfaceBtnState(false); + XGuildDocument specificDocument23 = XDocuments.GetSpecificDocument(XGuildDocument.uuID); + bool bInGuild = specificDocument23.bInGuild; + if (bInGuild) + { + string label7 = XSingleton.singleton.ReplaceReturn(XStringDefineProxy.GetString("GuildCollectJoinTips1")); + string string11 = XStringDefineProxy.GetString("BtnTips_EnterNow"); + string string12 = XStringDefineProxy.GetString("BtnTips_Then"); + XSingleton.singleton.ShowModalDialog(label7, string11, string12, new ButtonClickEventHandler(this.OnJoinGuildBtnClick)); + } + else + { + string label8 = XSingleton.singleton.ReplaceReturn(XStringDefineProxy.GetString("GuildCollectJoinTips2")); + string string13 = XStringDefineProxy.GetString("BtnTips_EnterGuild"); + string string14 = XStringDefineProxy.GetString("BtnTips_Then"); + XSingleton.singleton.ShowModalDialog(label8, string13, string14, new ButtonClickEventHandler(this.OnJoinGuildBtnClick)); + } + goto IL_1362; + } + case XSysDefine.XSys_GuildCollect: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + case XSysDefine.XSys_BackFlowMall: + case XSysDefine.XSys_BackFlowWelfare: + case (XSysDefine)995: + goto IL_133D; + case XSysDefine.XSys_GuildCollectSummon: + { + XGuildCollectDocument specificDocument24 = XDocuments.GetSpecificDocument(XGuildCollectDocument.uuID); + specificDocument24.QuerySummon(); + goto IL_1362; + } + default: + goto IL_133D; + } + break; + } + } + DlgBase.singleton.ShowGuildBossView(); + goto IL_1362; + IL_A0D: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + XGuildArenaDocument specificDocument25 = XDocuments.GetSpecificDocument(XGuildArenaDocument.uuID); + specificDocument25.bHasAvailableArenaIcon = false; + goto IL_1362; + IL_A54: + DlgBase.singleton.SetVisibleWithAnimation(true, null); + goto IL_1362; + IL_133D: + XSingleton.singleton.AddErrorLog("This system hasn't finished: ", xsysDefine.ToString(), null, null, null, null); + IL_1362: + result = true; + } + } + return result; + } + + public void SetSystemRedPointState(XSysDefine sys, bool state) + { + bool flag = sys == XSysDefine.XSys_GuildDailyTask; + if (flag) + { + this._TaskNaviHandler.TaskHandler.RefreshVisibleContents(); + } + else + { + bool flag2 = sys == XSysDefine.XSys_GuildWeeklyBountyTask; + if (flag2) + { + this._TaskNaviHandler.TaskHandler.RefreshVisibleContents(); + } + else + { + IXUIButton sysButton = base.uiBehaviour.GetSysButton(sys); + bool flag3 = sysButton == null; + if (!flag3) + { + Transform transform = sysButton.gameObject.transform.Find("RedPoint"); + bool flag4 = transform != null; + if (flag4) + { + transform.gameObject.SetActive(state); + } + } + } + } + } + + public void InitRedPointsWhenShow() + { + XGameSysMgr singleton = XSingleton.singleton; + for (int i = 0; i < base.uiBehaviour.m_SysButtonsMapping.Length; i++) + { + bool flag = base.uiBehaviour.m_SysButtonsMapping[i] != null; + if (flag) + { + XSysDefine sys = (XSysDefine)i; + List childSys = singleton.GetChildSys(sys); + for (int j = 0; j < childSys.Count; j++) + { + singleton.RecalculateRedPointState(childSys[j], false); + } + singleton.UpdateRedPointOnHallUI(sys); + } + } + this.OnGuildSysChange(); + } + + public void InitSevenLoginWhenShow() + { + bool flag = base.uiBehaviour == null || base.uiBehaviour.m_SevenLoginMessage == null; + if (!flag) + { + XSevenLoginDocument specificDocument = XDocuments.GetSpecificDocument(XSevenLoginDocument.uuID); + bool flag2 = !specificDocument.bHasAvailableSevenIcon; + if (!flag2) + { + string empty = string.Empty; + string empty2 = string.Empty; + bool flag3 = specificDocument.TryGetHallMessage(out empty, out empty2); + if (flag3) + { + base.uiBehaviour.m_SevenLoginMessage.SetText(empty); + base.uiBehaviour.m_SevenLoginSprite.SetSprite(empty2); + base.uiBehaviour.m_SevenLoginSprite.MakePixelPerfect(); + } + } + } + } + + public void SetMultiActivityTips(object o = null) + { + XActivityDocument doc = XActivityDocument.Doc; + bool flag = base.uiBehaviour.m_MulActTips.IsVisible() && doc.MainInterfaceTips != null && doc.MainInterfaceTips != ""; + if (flag) + { + base.uiBehaviour.m_MulActTips.SetText(doc.MainInterfaceTips); + IXUITweenTool ixuitweenTool = base.uiBehaviour.m_MulActTips.gameObject.GetComponent("XUIPlayTween") as IXUITweenTool; + ixuitweenTool.PlayTween(true, -1f); + } + XSingleton.singleton.KillTimer(this.MulActTipsToken); + this.MulActTipsToken = XSingleton.singleton.SetTimer((float)this._MulActTipsCD, new XTimerMgr.ElapsedEventHandler(this.SetMultiActivityTips), null); + } + + public void OnVoiceBtnAppear(uint textType) + { + XVoiceQADocument specificDocument = XDocuments.GetSpecificDocument(XVoiceQADocument.uuID); + specificDocument.MainInterFaceBtnState = true; + this.RefreshH5ButtonState(XSysDefine.XSys_GuildRelax_VoiceQA, true); + } + + public bool OnVoiceQAJoin(IXUIButton btn) + { + XVoiceQADocument specificDocument = XDocuments.GetSpecificDocument(XVoiceQADocument.uuID); + specificDocument.VoiceQAJoinChoose(true, specificDocument.TempType); + DlgBase.singleton.SetVisible(false, true); + return true; + } + + public bool OnVoiceQARefuse(IXUIButton btn) + { + XVoiceQADocument specificDocument = XDocuments.GetSpecificDocument(XVoiceQADocument.uuID); + specificDocument.VoiceQAJoinChoose(false, specificDocument.TempType); + DlgBase.singleton.SetVisible(false, true); + return true; + } + + private bool OnCaptainJoin(IXUIButton btn) + { + XSingleton.singleton.OpenSystem(XSysDefine.XSys_Activity_CaptainPVP, 0UL); + DlgBase.singleton.SetVisible(false, true); + return true; + } + + private bool OnTeamLeagueJoin(IXUIButton btn) + { + LeagueBattleTimeState todayState = XFreeTeamVersusLeagueDocument.Doc.TodayState; + bool flag = todayState == LeagueBattleTimeState.LBTS_CrossElimination || todayState == LeagueBattleTimeState.LBTS_Elimination; + if (flag) + { + DlgBase.singleton.SetVisibleWithAnimation(true, null); + } + else + { + DlgBase.singleton.SetVisibleWithAnimation(true, null); + } + DlgBase.singleton.SetVisible(false, true); + return true; + } + + private bool OnHeroBattleJoin(IXUIButton btn) + { + XSingleton.singleton.OpenSystem(XSysDefine.XSys_HeroBattle, 0UL); + DlgBase.singleton.SetVisible(false, true); + return true; + } + + private bool OnExcellentLiveClick(IXUIButton btn) + { + DlgBase.singleton.SetVisible(false, true); + XSpectateDocument specificDocument = XDocuments.GetSpecificDocument(XSpectateDocument.uuID); + specificDocument.MainInterfaceEnterQuery(); + return true; + } + + private bool OnJoinGuildBtnClick(IXUIButton btn) + { + DlgBase.singleton.SetVisible(false, true); + XGuildDocument specificDocument = XDocuments.GetSpecificDocument(XGuildDocument.uuID); + specificDocument.TryEnterGuildScene(); + return true; + } + + public void ShowRemoveSealLeftTime(IXUILabel label, ref XLeftTimeCounter _LevelSealCDCounter, ref bool isLevelSealCountdown) + { + XLevelSealDocument specificDocument = XDocuments.GetSpecificDocument(XLevelSealDocument.uuID); + int leftTime = specificDocument.GetLeftTime(); + bool flag = leftTime >= 86400; + if (flag) + { + isLevelSealCountdown = false; + string text = string.Format(XSingleton.singleton.GetString("SEAL_REMOVE_LEFT"), XSingleton.singleton.TimeAccFormatString(leftTime, 1, 1)); + label.SetText(text); + } + else + { + bool flag2 = leftTime <= 0; + if (flag2) + { + isLevelSealCountdown = false; + string text2 = string.Format(XSingleton.singleton.GetString("SEAL_REMOVE_LEFT"), "00:00"); + label.SetText(text2); + } + else + { + isLevelSealCountdown = true; + bool flag3 = _LevelSealCDCounter == null; + if (flag3) + { + _LevelSealCDCounter = new XLeftTimeCounter(label, false); + } + _LevelSealCDCounter.SetLeftTime((float)leftTime, -1); + _LevelSealCDCounter.SetFormatString(XSingleton.singleton.GetString("SEAL_REMOVE_LEFT")); + _LevelSealCDCounter.SetTimeFormat(2, 3, 3, false); + _LevelSealCDCounter.SetCarry(); + } + } + } + + public void PlayGetPartnerEffect() + { + XSingleton.singleton.CreateAndPlay("Effects/FX_Particle/UIfx/UI_yh", base.uiBehaviour.transform, Vector3.zero, Vector3.one, 1f, true, 3f, true); + } + + public void ShowLiveCount(uint count) + { + base.uiBehaviour.m_LiveTips.SetActive(count > 0u); + bool flag = count > 9u; + if (flag) + { + base.uiBehaviour.m_LiveCount.SetText("..."); + } + else + { + base.uiBehaviour.m_LiveCount.SetText(count.ToString()); + } + } + + public bool SetSystemAnnounce() + { + SystemAnnounce.RowData sysAnnounceData = XSingleton.singleton.GetSysAnnounceData(XSingleton.singleton.XPlayerData.Level); + bool flag = sysAnnounceData == null; + bool result; + if (flag) + { + result = false; + } + else + { + IXUIButton sysButton = base.uiBehaviour.GetSysButton(XSysDefine.XSys_SystemAnnounce); + IXUILabel ixuilabel = sysButton.gameObject.transform.Find("Level").GetComponent("XUILabel") as IXUILabel; + ixuilabel.SetText(sysAnnounceData.OpenAnnounceLevel.ToString()); + IXUISprite ixuisprite = sysButton.gameObject.transform.Find("Icon").GetComponent("XUISprite") as IXUISprite; + ixuisprite.spriteName = sysAnnounceData.AnnounceIcon; + IXUISprite ixuisprite2 = sysButton.gameObject.transform.Find("Name").GetComponent("XUISprite") as IXUISprite; + ixuisprite2.spriteName = sysAnnounceData.TextSpriteName; + ixuisprite2.MakePixelPerfect(); + result = true; + } + return result; + } + + public void SetGetExpAnimation(ulong exp, Vector3 pos) + { + bool flag = Camera.main == null; + if (!flag) + { + XSingleton.singleton.AddGreenLog("exp:", exp.ToString(), null, null, null, null); + int curExpInd = this._curExpInd; + this._curExpInd = (this._curExpInd + 1) % this._maxExpCount; + Vector3 vector = Camera.main.WorldToScreenPoint(pos); + Vector3 vector2 = XSingleton.singleton.UICamera.ScreenToWorldPoint(vector); + vector2.z = 0f; + base.uiBehaviour.m_ExpValueMgr[curExpInd].gameObject.transform.InverseTransformPoint(vector2); + base.uiBehaviour.m_ExpValueMgr[curExpInd].SetText(string.Format("jy+{0}", exp)); + base.uiBehaviour.m_ExpAnimationMgr[curExpInd].PlayTween(true, -1f); + } + } + + public Vector3 GetSelectDanceMotionBtnPos() + { + bool flag = this.lastSelectV3Button != null; + Vector3 result; + if (flag) + { + result = this.lastSelectV3Button.gameObject.transform.position; + } + else + { + result = Vector3.zero; + } + return result; + } + + private void RefreshV3BtnSelect(IXUIButton newBtn) + { + bool flag = this._DanceMotionHandler != null; + if (flag) + { + this._DanceMotionHandler.SetVisible(false); + } + bool flag2 = this.lastSelectV3Button != null; + if (flag2) + { + Transform transform = this.lastSelectV3Button.gameObject.transform.Find("Select"); + bool flag3 = transform != null; + if (flag3) + { + transform.gameObject.SetActive(false); + } + } + bool flag4 = newBtn != null; + if (flag4) + { + Transform transform2 = newBtn.gameObject.transform.Find("Select"); + bool flag5 = transform2 != null; + if (flag5) + { + transform2.gameObject.SetActive(true); + } + } + this.lastSelectV3Button = newBtn; + } + + private bool OnMotionClicked(IXUIButton btn) + { + bool flag = !base.IsLoaded(); + bool result; + if (flag) + { + result = true; + } + else + { + bool flag2 = false; + bool flag3 = this.lastSelectV3Button != null && this.lastSelectV3Button == btn && this._DanceMotionHandler != null && this._DanceMotionHandler.IsVisible(); + if (flag3) + { + flag2 = true; + } + this.RefreshV3BtnSelect(btn); + bool flag4 = !flag2 && this._DanceMotionHandler != null; + if (flag4) + { + this._DanceMotionHandler.SetVisible(true); + XDanceDocument.Doc.GetDanceIDs((uint)btn.ID); + } + result = true; + } + return result; + } + + public void RefreshMotionPanel(List motions) + { + bool flag = this._DanceMotionHandler != null && this._DanceMotionHandler.IsVisible(); + if (flag) + { + this._DanceMotionHandler.RefreshMotionPanel(motions); + } + } + + private void OnV3SwitchBtnClick(IXUISprite iSp) + { + bool flag = !base.IsLoaded(); + if (!flag) + { + this._V3SwitchBtnState = !this._V3SwitchBtnState; + int tweenGroup = this._V3SwitchBtnState ? 1 : 2; + base.uiBehaviour.m_V3ListTween.SetTweenGroup(tweenGroup); + base.uiBehaviour.m_V3ListTween.PlayTween(true, -1f); + base.uiBehaviour.m_V3SwitchTween.SetTweenGroup(tweenGroup); + base.uiBehaviour.m_V3SwitchTween.PlayTween(true, -1f); + bool flag2 = !this._V3SwitchBtnState; + if (flag2) + { + bool flag3 = this._DanceMotionHandler != null; + if (flag3) + { + this._DanceMotionHandler.SetVisible(false); + } + } + else + { + XTransformDocument specificDocument = XDocuments.GetSpecificDocument(XTransformDocument.uuID); + specificDocument.ReqLeftTime(); + } + } + } + + private void OnH2SwitchBtnClick(IXUISprite iSp) + { + bool flag = !base.IsLoaded(); + if (!flag) + { + this._H2SwitchBtnState = !this._H2SwitchBtnState; + bool h2SwitchBtnState = this._H2SwitchBtnState; + if (h2SwitchBtnState) + { + GameObject gameObject = base.uiBehaviour.m_H2SwitchBtn.gameObject.transform.Find("RedPoint").gameObject; + gameObject.SetActive(false); + } + int tweenGroup = this._H2SwitchBtnState ? 1 : 0; + base.uiBehaviour.m_H2ListTween.SetTweenGroup(tweenGroup); + base.uiBehaviour.m_H2SwitchTween.SetTweenGroup(tweenGroup); + base.uiBehaviour.m_H2ListTween.PlayTween(true, -1f); + base.uiBehaviour.m_H2SwitchTween.PlayTween(true, -1f); + } + } + + public void CalH2SwitchBtnRedPointState(IXUITweenTool o = null) + { + bool flag = !base.IsLoaded(); + if (!flag) + { + GameObject gameObject = base.uiBehaviour.m_H2SwitchBtn.gameObject.transform.Find("RedPoint").gameObject; + bool h2SwitchBtnState = this._H2SwitchBtnState; + if (h2SwitchBtnState) + { + gameObject.SetActive(false); + } + else + { + gameObject.SetActive(this.CalMenuUIRedPoint(XSysDefine.XSys_GameMall) || this.CalMenuUIRedPoint(XSysDefine.XSys_Auction) || this.CalMenuUIRedPoint(XSysDefine.XSys_Reward) || this.CalMenuUIRedPoint(XSysDefine.XSys_Welfare) || this.CalMenuUIRedPoint(XSysDefine.Xsys_Backflow) || this.CalMenuUIRedPoint(XSysDefine.XSys_Strong) || this.CalMenuUIRedPoint(XSysDefine.XSys_Spectate) || this.CalMenuUIRedPoint(XSysDefine.XSys_OperatingActivity) || this.CalMenuUIRedPoint(XSysDefine.XSys_Welfare_FirstRechange) || this.CalMenuUIRedPoint(XSysDefine.XSys_SevenActivity) || this.CalMenuUIRedPoint(XSysDefine.XSys_ThemeActivity) || this.CalMenuUIRedPoint(XSysDefine.XSys_Carnival)); + } + } + } + + private void OnMenuSwitchBtnClick(IXUISprite iSp) + { + bool flag = !base.IsLoaded(); + if (!flag) + { + this._MenuSwitchBtnState = !this._MenuSwitchBtnState; + this.CalMenuSwitchBtnRedPointState(); + int tweenGroup = this._MenuSwitchBtnState ? 1 : 2; + base.uiBehaviour.m_MenuSwitchBtnTween.SetTweenGroup(tweenGroup); + bool flag2 = this.m_curScene == SceneType.SCENE_HALL; + if (flag2) + { + base.uiBehaviour.m_SysListH0Tween.SetTweenGroup(tweenGroup); + base.uiBehaviour.m_SysListH0Tween.PlayTween(true, -1f); + } + else + { + bool flag3 = this.m_curScene == SceneType.SCENE_GUILD_HALL; + if (flag3) + { + base.uiBehaviour.m_SysListH2Tween.SetTweenGroup(tweenGroup); + base.uiBehaviour.m_SysListH2Tween.PlayTween(true, -1f); + } + else + { + bool flag4 = this.m_curScene == SceneType.SCENE_FAMILYGARDEN; + if (flag4) + { + base.uiBehaviour.m_SysListH3Tween.SetTweenGroup(tweenGroup); + base.uiBehaviour.m_SysListH3Tween.PlayTween(true, -1f); + } + } + } + base.uiBehaviour.m_SysListH1Tween.SetTweenGroup(tweenGroup); + base.uiBehaviour.m_SysListH1Tween.PlayTween(true, -1f); + base.uiBehaviour.m_MenuSwitchBtnTween.PlayTween(true, -1f); + } + } + + public void CalMenuSwitchBtnRedPointState() + { + bool flag = !base.IsVisible(); + if (!flag) + { + GameObject gameObject = base.uiBehaviour.m_MenuSwitchBtn.gameObject.transform.Find("RedPoint").gameObject; + bool menuSwitchBtnState = this._MenuSwitchBtnState; + if (menuSwitchBtnState) + { + bool flag2 = this.m_curScene == SceneType.SCENE_HALL; + if (flag2) + { + gameObject.SetActive(this.CalMenuUIRedPoint(XSysDefine.XSys_Friends) || this.CalMenuUIRedPoint(XSysDefine.XSys_Home) || this.CalMenuUIRedPoint(XSysDefine.XSys_Rank) || this.CalMenuUIRedPoint(XSysDefine.XSys_CardCollect) || this.CalMenuUIRedPoint(XSysDefine.XSys_NPCFavor)); + } + else + { + bool flag3 = this.m_curScene == SceneType.SCENE_GUILD_HALL; + if (flag3) + { + gameObject.SetActive(this.CalMenuUIRedPoint(XSysDefine.XSys_GuildHall) || this.CalMenuUIRedPoint(XSysDefine.XSys_GuildRelax)); + } + } + } + else + { + bool flag4 = false; + foreach (XSysDefine sys in base.uiBehaviour.m_SysH1) + { + flag4 = (flag4 || this.CalMenuUIRedPoint(sys)); + } + gameObject.SetActive(flag4); + } + } + } + + private bool CalMenuUIRedPoint(XSysDefine sys) + { + return XSingleton.singleton.IsSystemOpened(sys) && XSingleton.singleton.GetSysRedPointStateConsiderBlock(sys); + } + + private void RefreshListSwitchBtnVisable(IXUIObject iSp, IXUIList uiList, IXUIList uiList2 = null) + { + bool flag = false; + for (int i = 0; i < uiList.gameObject.transform.childCount; i++) + { + Transform child = uiList.gameObject.transform.GetChild(i); + bool activeSelf = child.gameObject.activeSelf; + if (activeSelf) + { + flag = true; + break; + } + } + bool flag2 = uiList2 == null || flag; + if (flag2) + { + iSp.SetVisible(flag); + } + else + { + for (int j = 0; j < uiList2.gameObject.transform.childCount; j++) + { + Transform child2 = uiList2.gameObject.transform.GetChild(j); + bool activeSelf2 = child2.gameObject.activeSelf; + if (activeSelf2) + { + flag = true; + break; + } + } + iSp.SetVisible(flag); + } + } + + private void RefreshV3H1OnOtherScene() + { + foreach (XSysDefine sys in base.uiBehaviour.m_SysV3) + { + this.OnSingleSysChange(sys, false); + } + base.uiBehaviour.m_SysListV3.Refresh(); + foreach (XSysDefine sys2 in base.uiBehaviour.m_SysH1) + { + this.OnSingleSysChange(sys2, false); + } + base.uiBehaviour.m_SysListH1.Refresh(); + } + + public bool IsSupportQgame() + { + bool flag = XSingleton.singleton.Channel == XAuthorizationChannel.XAuthorization_QQ; + bool flag2 = SystemInfo.processorType.StartsWith("Intel"); + bool flag3 = SystemInfo.systemMemorySize >= XSingleton.singleton.GetInt("QGameMemory"); + return XSingleton.singleton.XBroadCast.IsBroadState() && flag && !flag2 && flag3; + } + + private bool OnQGameClick(IXUIButton btn) + { + bool isPlaying = DlgBase.singleton.isPlaying; + bool result; + if (isPlaying) + { + XSingleton.singleton.ShowSystemTip(XStringDefineProxy.GetString("Replay_IsPlaying"), "fece00"); + result = false; + } + else + { + XRadioDocument specificDocument = XDocuments.GetSpecificDocument(XRadioDocument.uuID); + bool flag = specificDocument.roomState == XRadioDocument.BigRoomState.OutRoom; + if (flag) + { + XSingleton.singleton.XBroadCast.EnterHall(); + PtcC2G_CloseHintNtf ptcC2G_CloseHintNtf = new PtcC2G_CloseHintNtf(); + ptcC2G_CloseHintNtf.Data.systemid = 80u; + XSingleton.singleton.Send(ptcC2G_CloseHintNtf); + } + else + { + XSingleton.singleton.ShowSystemTip(XStringDefineProxy.GetString("ERR_FM_FORBID1"), "fece00"); + } + result = true; + } + return result; + } + + public void RefreshGuildCollectTime(int time, int summonTime) + { + base.uiBehaviour.m_GuildCollectLeftTime.SetText(XSingleton.singleton.TimeFormatString(time, 2, 3, 4, false, true)); + base.uiBehaviour.m_GuildCollectSummonTime.SetText(XSingleton.singleton.TimeFormatString(summonTime, 2, 3, 4, false, true)); + } + + public void OnShowFlowBack() + { + Transform uiroot = XSingleton.singleton.UIRoot; + bool flag = uiroot != null; + if (flag) + { + Transform transform = uiroot.Find("Camera"); + bool flag2 = transform != null; + if (flag2) + { + XFx xfx = XSingleton.singleton.CreateUIFx("Effects/FX_Particle/UIfx/UI_huanyinghuigu", transform, false); + bool flag3 = xfx != null; + if (flag3) + { + float num = 1.3f; + xfx.DelayDestroy = num; + XSingleton.singleton.DestroyFx(xfx, false); + XSingleton.singleton.SetTimer(num, delegate(object param) + { + string @string = XStringDefineProxy.GetString("BackFlowWelcom"); + string string2 = XStringDefineProxy.GetString("BackFlowWelcomCotent"); + XSingleton.singleton.ShowModalDialogWithTitle(@string, string2, XStringDefineProxy.GetString(XStringDefine.COMMON_OK), delegate(IXUIButton button) + { + this.MainDoc.BackFlow = false; + DlgBase.singleton.SetVisible(false, true); + XSingleton.singleton.Pause = false; + return true; + }, 50); + }, null); + } + } + } + } + + public void SetTransformLeftTime(float time) + { + bool flag = !base.IsLoaded(); + if (!flag) + { + base.uiBehaviour.m_TransformLeftTime.SetLeftTime(time, -1); + } + } + } +} -- cgit v1.1-26-g67d0