Ejemplo n.º 1
0
    private void OnClickImgIcon(int activityId)
    {
        Debug.LogError("OnClickImgIcon activityId=" + activityId);
        HuoDongZhongXin huoDongZhongXin = DataReader <HuoDongZhongXin> .Get(activityId);

        if (huoDongZhongXin == null)
        {
            return;
        }
        if (huoDongZhongXin.minLv > EntityWorld.Instance.EntSelf.Lv)
        {
            string text = string.Format(GameDataUtils.GetChineseContent(513512, false), huoDongZhongXin.minLv);
            UIManagerControl.Instance.ShowToastText(text);
            return;
        }
        if (ActivityCenterManager.infoDict.get_Item(activityId).status == ActiveCenterInfo.ActiveStatus.AS.Close)
        {
            if (!this.IsCanLook(huoDongZhongXin))
            {
                UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(513538, false), 2f, 2f);
                return;
            }
        }
        else if (ActivityCenterManager.infoDict.get_Item(activityId).status != ActiveCenterInfo.ActiveStatus.AS.Start)
        {
            UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(513526, false), 2f, 2f);
            return;
        }
        if (activityId == 10001)
        {
            InstanceManagerUI.OpenGangFightUI();
        }
        else if (activityId == 10002)
        {
            MultiPlayerManager.Instance.OpenMultiPlayerUI(10002, "多人活动");
        }
    }
Ejemplo n.º 2
0
    private void OnClickButton(DailyTaskItem item)
    {
        if (item.Type == DailyTaskType.DAILY)
        {
            if (item.CanShowBuy)
            {
                switch (item.DailyData.system)
                {
                case 3:
                    DefendFightManager.Instance.OnBuyDefendTimes(SpecialFightMode.Protect);
                    goto IL_E4;

                case 4:
                    DefendFightManager.Instance.OnBuyDefendTimes(SpecialFightMode.Save);
                    goto IL_E4;

                case 5:
                    DefendFightManager.Instance.OnBuyDefendTimes(SpecialFightMode.Hold);
                    goto IL_E4;

                case 9:
                    SpecialFightManager.Instance.OnBuyExperienceTimes();
                    goto IL_E4;

                case 12:
                    MemCollabManager.Instance.BuyExtentTimes();
                    goto IL_E4;
                }
                LinkNavigationManager.SystemLink(item.DailyData.sysId, true, null);
                IL_E4 :;
            }
            else if (item.DailyData.id == 12040)
            {
                if (MainTaskManager.Instance.GuildTaskId > 0)
                {
                    this.ExecuteGuildTask();
                }
                else if (SystemOpenManager.IsSystemClickOpen(45, 0, true))
                {
                    if (GuildManager.Instance.MyGuildnfo == null)
                    {
                        return;
                    }
                    if (GuildManager.Instance.GuildTaskTotalTimes <= GuildManager.Instance.MyGuildnfo.taskedCount)
                    {
                        UIManagerControl.Instance.ShowToastText(GuildManager.Instance.GetTipContentByKey("BuildWord"));
                        return;
                    }
                    GuildManager.Instance.SendGuildBuildReq(GuildBuildType.GBT.GUILD_TASK);
                }
            }
            else
            {
                LinkNavigationManager.SystemLink(item.DailyData.sysId, true, null);
            }
        }
        else if (item.Type == DailyTaskType.FIND)
        {
            if (item.Task.canFindTimes > 0)
            {
                FindTaskUI uibase = UIManagerControl.Instance.OpenUI("FindTaskUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush) as FindTaskUI;
                uibase.OnOpen("找回任务", (float)item.Task.canFindTimes, (float)((!this.mTogGold.get_isOn()) ? item.DiamondPrice : item.GoldPrice), item.TaskName, this.mTogGold.get_isOn(), delegate(float value)
                {
                    uibase.SetDetailFindTask();
                }, delegate(int value)
                {
                    this.mLastFindItem  = item;
                    this.mLastFindTimes = value;
                    DailyTaskManager.Instance.SendDailyTaskPrizeReq(item.Task.taskId, (!this.mTogGold.get_isOn()) ? 1 : 2, value);
                });
            }
        }
        else if (item.Type == DailyTaskType.LIMIT)
        {
            switch (item.CurrentLimit)
            {
            case 10001:
                InstanceManagerUI.OpenGangFightUI();
                break;

            case 10002:
                MultiPlayerManager.Instance.OpenMultiPlayerUI(10002, "多人活动");
                break;

            case 10003:
                LinkNavigationManager.OpenMushroomHitUI();
                break;

            case 10006:
                LinkNavigationManager.OpenMultiPVPUI();
                break;
            }
            if (item.DailyData.id == 12030)
            {
                if (!GuildManager.Instance.IsJoinInGuild())
                {
                    UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(34157, false));
                    return;
                }
                if (!GuildManager.Instance.IsGuildFieldOpen)
                {
                    UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(513118, false));
                    return;
                }
                if (!SystemOpenManager.IsSystemClickOpen(45, 0, true))
                {
                    return;
                }
                UIManagerControl.Instance.OpenUI("GuildUI", null, false, UIType.FullScreen);
                UIManagerControl.Instance.OpenUI("GuildActivityCenterUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
            }
            else if (item.DailyData.id == 12050)
            {
                if (!GuildManager.Instance.IsJoinInGuild())
                {
                    UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(34157, false));
                    return;
                }
                if (!item.GuildWarOpen)
                {
                    UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(513118, false));
                    return;
                }
                if (!SystemOpenManager.IsSystemClickOpen(45, 0, true))
                {
                    return;
                }
                UIManagerControl.Instance.OpenUI("GuildUI", null, false, UIType.FullScreen);
                UIManagerControl.Instance.OpenUI("GuildWarVSInfoUI", UINodesManager.NormalUIRoot, false, UIType.NonPush);
            }
        }
    }
Ejemplo n.º 3
0
    public static void SystemLink(int systemId, bool isTip = true, Action finish_callback = null)
    {
        if (DataReader <SystemOpen> .Get(systemId) == null)
        {
            Debug.Log("<color=red>Error:</color>找不到对应的系统, systemId = " + systemId);
            return;
        }
        if (!SystemOpenManager.IsSystemClickOpen(systemId, 0, isTip))
        {
            return;
        }
        switch (systemId)
        {
        case 3:
            LinkNavigationManager.OpenSkillUI(finish_callback);
            return;

        case 4:
            LinkNavigationManager.OpenPetUI(finish_callback);
            return;

        case 5:
            LinkNavigationManager.OpenActorUI(finish_callback);
            return;

        case 6:
        case 8:
        case 10:
        case 12:
        case 20:
        case 23:
        case 26:
        case 30:
        case 34:
        case 36:
        case 40:
        case 41:
        case 42:
        case 43:
        case 44:
        case 47:
        case 49:
        case 50:
        case 51:
        case 52:
        case 53:
        case 57:
        case 58:
        case 59:
        case 60:
        case 64:
        case 69:
        case 70:
        case 72:
        case 73:
        case 75:
        case 76:
        case 77:
IL_17C:
            switch (systemId)
            {
            case 102:
                LinkNavigationManager.OpenXMarketUI2();
                return;

            case 104:
                LinkNavigationManager.OpenZeroTaskUI();
                return;

            case 105:
                LinkNavigationManager.OpenPVPShopUI();
                return;

            case 106:
                LinkNavigationManager.OpenVIPUI2VipInvest();
                return;

            case 107:
                LinkNavigationManager.OpenRankUpUI();
                return;

            case 110:
                LinkNavigationManager.OpenMultiPVPUI();
                return;

            case 111:
                LinkNavigationManager.OpenMultiPVEUI();
                return;

            case 112:
                LinkNavigationManager.OpenPetTaskUI();
                return;
            }
            Debug.Log("<color=red>Error:</color>找不到超链接: systemId = " + systemId);
            goto IL_41F;

        case 7:
            UIManagerControl.Instance.OpenUI("LuckDrawUI", null, false, UIType.FullScreen);
            goto IL_41F;

        case 9:
            LinkNavigationManager.OpenFirstPayUI(finish_callback);
            return;

        case 11:
            LinkNavigationManager.OpenDailyTaskUI();
            goto IL_41F;

        case 13:
            LinkNavigationManager.OpenPVPUI();
            goto IL_41F;

        case 14:
            InstanceManagerUI.OpenGangFightUI();
            goto IL_41F;

        case 15:
            LinkNavigationManager.OpenSurvivalChallengeUI();
            goto IL_41F;

        case 16:
            UIManagerControl.Instance.OpenUI("ElementInstanceUI", null, false, UIType.FullScreen);
            goto IL_41F;

        case 17:
            InstanceManagerUI.OpenSpecialInstanceUI();
            goto IL_41F;

        case 18:
            InstanceManagerUI.OpenEliteDungeonUI();
            goto IL_41F;

        case 19:
            MultiPlayerManager.Instance.OpenMultiPlayerUI(10002, "多人副本");
            goto IL_41F;

        case 21:
            LinkNavigationManager.OpenEquipStrengthenUI(EquipLibType.ELT.Weapon, finish_callback);
            return;

        case 22:
            LinkNavigationManager.OpenEquipGemUI(EquipLibType.ELT.Weapon, null);
            goto IL_41F;

        case 24:
            LinkNavigationManager.OpenPetLevelUI();
            goto IL_41F;

        case 25:
            LinkNavigationManager.OpenPetStarUI();
            goto IL_41F;

        case 27:
            InstanceManagerUI.OpenBountyUI();
            goto IL_41F;

        case 28:
            goto IL_41F;

        case 29:
            CurrenciesUIViewModel.Instance.OnClickGold();
            goto IL_41F;

        case 31:
            EnergyManager.Instance.BuyEnergy(null);
            goto IL_41F;

        case 32:
            LinkNavigationManager.OpenVIPUI2VipLimit();
            return;

        case 33:
            LinkNavigationManager.OpenVIPUI2Recharge();
            return;

        case 35:
            LinkNavigationManager.OpenActorUI(delegate
            {
                ActorUI actorUI = UIManagerControl.Instance.GetUIIfExist("ActorUI") as ActorUI;
                if (!actorUI)
                {
                    return;
                }
                actorUI.LogicClickTabToWing();
                if (finish_callback != null)
                {
                    finish_callback.Invoke();
                }
            });
            return;

        case 37:
            LinkNavigationManager.OpenEquipStarUpUI(EquipLibType.ELT.Weapon, finish_callback);
            return;

        case 38:
            LinkNavigationManager.OpenEquipWashUI(EquipLibType.ELT.Weapon, finish_callback);
            return;

        case 39:
            LinkNavigationManager.OpenEquipEnchantmentUI(EquipLibType.ELT.Weapon, finish_callback);
            return;

        case 45:
            LinkNavigationManager.OpenGuildUI(null);
            return;

        case 46:
            UIStackManager.Instance.PopTownUI();
            MainTaskManager.Instance.ExecuteTask(MainTaskManager.Instance.RingTaskId, false);
            goto IL_41F;

        case 48:
            UIStackManager.Instance.PopTownUI();
            goto IL_41F;

        case 54:
            InstanceManagerUI.OpenSpecialInstanceGuardUI();
            goto IL_41F;

        case 55:
            LinkNavigationManager.OpenTramcarUI();
            goto IL_41F;

        case 56:
            InstanceManagerUI.OpenSpecialInstanceAttackUI();
            goto IL_41F;

        case 61:
            LinkNavigationManager.OpenMemCollabUI();
            goto IL_41F;

        case 62:
            LinkNavigationManager.OpenXMarketUI();
            return;

        case 63:
            InstanceManagerUI.OpenSpecialInstanceExperienceUI();
            goto IL_41F;

        case 65:
            LinkNavigationManager.OpenGodSoldierUI();
            goto IL_41F;

        case 66:
            LinkNavigationManager.OpenMushroomHitUI();
            goto IL_41F;

        case 67:
            LinkNavigationManager.OpenGodWeaponUI();
            return;

        case 68:
            LinkNavigationManager.OpenBossBookUI();
            return;

        case 71:
            UIManagerControl.Instance.OpenUI("RadarMapUI", UINodesManager.NormalUIRoot, false, UIType.FullScreen);
            goto IL_41F;

        case 74:
            LinkNavigationManager.OpenHuntUI(0);
            return;

        case 78:
            LinkNavigationManager.OpenEquipSuitForgeUI(EquipLibType.ELT.Weapon, finish_callback);
            return;

        case 79:
            LinkNavigationManager.OpenFriendUI();
            return;
        }
        goto IL_17C;
IL_41F:
        if (finish_callback != null)
        {
            finish_callback.Invoke();
        }
    }
    public void OpenCurrentActivityUI(int activityID)
    {
        if (!this.CurrentACInfoDic.ContainsKey(activityID) || this.CurrentACInfoDic.get_Item(activityID).status != ActiveCenterInfo.ActiveStatus.AS.Start)
        {
            UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(513526, false), 2f, 2f);
            return;
        }
        if (!DataReader <HuoDongZhongXin> .Contains(activityID))
        {
            return;
        }
        HuoDongZhongXin huoDongZhongXin = DataReader <HuoDongZhongXin> .Get(activityID);

        if (huoDongZhongXin == null)
        {
            return;
        }
        if (activityID == 10004 || activityID == 10005)
        {
            if (!GuildManager.Instance.IsJoinInGuild())
            {
                UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(34157, false));
                return;
            }
            if (activityID == 10004)
            {
                GuildActivityCenterUI guildActivityCenterUI = UIManagerControl.Instance.OpenUI("GuildActivityCenterUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush) as GuildActivityCenterUI;
                guildActivityCenterUI.get_transform().SetAsLastSibling();
            }
            else if (activityID == 10005)
            {
                GuildWarVSInfoUI guildWarVSInfoUI = UIManagerControl.Instance.OpenUI("GuildWarVSInfoUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush) as GuildWarVSInfoUI;
                guildWarVSInfoUI.get_transform().SetAsLastSibling();
            }
            return;
        }
        else
        {
            if (huoDongZhongXin.minLv > EntityWorld.Instance.EntSelf.Lv)
            {
                string text = string.Format(GameDataUtils.GetChineseContent(513512, false), huoDongZhongXin.minLv);
                UIManagerControl.Instance.ShowToastText(text);
                return;
            }
            if (activityID == 10001)
            {
                InstanceManagerUI.OpenGangFightUI();
            }
            else if (activityID == 10002)
            {
                MultiPlayerManager.Instance.OpenMultiPlayerUI(10002, "多人活动");
            }
            else if (activityID == 10003)
            {
                LinkNavigationManager.OpenMushroomHitUI();
            }
            else if (activityID == 10006)
            {
                LinkNavigationManager.OpenMultiPVPUI();
            }
            else if (activityID == 10007)
            {
                LinkNavigationManager.SystemLink(55, true, null);
            }
            return;
        }
    }