Ejemplo n.º 1
0
        public void OnGotoEscortClick()
        {
            if (!Hotfix_LT.Data.EventTemplateManager.Instance.IsTimeOK("escort_start", "escort_stop"))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_AllianceEscortUtil_4329"));
                return;
            }

            if (AllianceUtil.GetIsInTransferDart(""))
            {
                return;
            }

            GlobalMenuManager.Instance.ComebackToMianMenu();
            Hotfix_LT.Data.SpecialActivityTemplate temp = Hotfix_LT.Data.EventTemplateManager.Instance.GetSpecialActivity(9005);
            string[] strs = temp.nav_parameter.Split(';');
            if (strs.Length < 2)
            {
                EB.Debug.LogError(string.Format("NavParameter is Error, Length less than 2! activityID = {0}, param = {1}", temp.id, temp.nav_parameter));
            }
            else
            {
                EB.Coroutines.Run(FindPath(strs));
            }
        }
Ejemplo n.º 2
0
        public void OnGotoLegionWar()
        {
            if (AllianceUtil.GetIsInTransferDart(""))
            {
                return;
            }

            if (!(warTime == LegionWarTimeLine.QualifyGame || warTime == LegionWarTimeLine.SemiFinal || warTime == LegionWarTimeLine.Final))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LegionPageActivity_7613"));
                return;
            }

            Hotfix_LT.Data.SpecialActivityTemplate temp = Hotfix_LT.Data.EventTemplateManager.Instance.GetSpecialActivity(9004);
            string[] strs = temp.nav_parameter.Split(';');
            if (strs.Length < 2)
            {
                EB.Debug.LogError(string.Format("NavParameter is Error, Length less than 2! activityID = {0}, param = {1}", temp.id, temp.nav_parameter));
            }
            else
            {
                GlobalMenuManager.Instance.ComebackToMianMenu();
                EB.Coroutines.Run(FindPath(strs));
            }
        }
Ejemplo n.º 3
0
        public void OnBattleBtnClick()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");

            if (AllianceUtil.GetIsInTransferDart(null))
            {
                return;
            }

            if (BalanceResourceUtil.EnterVigorCheck(NewGameConfigTemplateManager.Instance.GetResourceBattleEnterVigor(mInstanceType)))
            {
                return;
            }

            if (mLeftTimes <= 0)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTResourceInstanceHudController_6819"));
            }
            else if (!LTResourceInstanceManager.Instance.IsLevelEnough(mChooseLevel))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, string.Format(EB.Localizer.GetString("ID_codefont_in_LTResourceInstanceHudController_7027"), mChooseLevel.level));
            }
            else if (LTResourceInstanceManager.Instance.IsLock(mChooseLevel, mInstanceType))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTResourceInstanceHudController_7254"));
            }
            else
            {
                BattleReadyHudController.Open(mActivityTbl.battle_type, StartBattleRequest, mChooseLevel.layout);
            }
        }
Ejemplo n.º 4
0
        public static void NpcFind(string parameter, int activityid)
        {
            if (string.IsNullOrEmpty(parameter))
            {
                EB.Debug.LogError("Activity NavParameter (xxxscene;xxxlocator)  is illegal {0}", activityid);
                return;
            }

            string[] splits = parameter.Split(';');
            if (splits != null && splits.Length == 2)
            {
                if (AllianceUtil.GetIsInTransferDart(null))
                //if (PlayerManager.LocalPlayerController().IsPlayerInDart())
                {
                    //WorldMapPathManager.Instance.StartPathFindToNpc(MainLandLogic.GetInstance().CurrentSceneName, splits[0], splits[1]);
                }
                else
                {
                    WorldMapPathManager.Instance.StartPathFindToNpcFly(MainLandLogic.GetInstance().CurrentSceneName, splits[0], splits[1]);
                }
            }
            else
            {
                EB.Debug.LogError("Activity NavParameter (xxxscene;xxxlocator) is illegal {0}", activityid);
            }
        }
Ejemplo n.º 5
0
        public void OnBlitzBtnClick()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            if (AllianceUtil.GetIsInTransferDart(null))
            {
                return;
            }

            if (BalanceResourceUtil.EnterVigorCheck(NewGameConfigTemplateManager.Instance.GetResourceBattleEnterVigor(mInstanceType)))
            {
                return;
            }

            if (mLeftTimes <= 0)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTResourceInstanceHudController_6819"));
                return;
            }
            else if (!LTResourceInstanceManager.Instance.IsLevelEnough(mChooseLevel))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, string.Format(EB.Localizer.GetString("ID_codefont_in_LTResourceInstanceHudController_7027"), mChooseLevel.level));
                return;
            }
            else if (LTResourceInstanceManager.Instance.IsLock(mChooseLevel, mInstanceType))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTResourceInstanceHudController_7254"));
                return;
            }

            if (_startBlitzRequesting)
            {
                return;
            }

            _startBlitzRequesting = true;

            LTResourceInstanceManager.Instance.Blitz(mChooseLevel.id, (int)mActivityTbl.battle_type, delegate
            {
                Hashtable table     = Johny.HashtablePool.Claim();
                table["isConfirm"]  = false;
                Action action       = InitUI;
                table["action"]     = action;
                table["battleType"] = (mInstanceType == ResourceInstanceType.Gold ? eBattleType.TreasuryBattle : eBattleType.ExpSpringBattle);
                GlobalMenuManager.Instance.Open("LTResInstanceBlitzView", table);
                if (mInstanceType == ResourceInstanceType.Gold)
                {
                    FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.gold_camp_topic,
                                                           FusionTelemetry.GamePlayData.gold_camp_event_id, FusionTelemetry.GamePlayData.gold_camp_umengId, "reward");
                }
                else
                {
                    FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.exp_camp_topic,
                                                           FusionTelemetry.GamePlayData.exp_camp_event_id, FusionTelemetry.GamePlayData.exp_camp_umengId, "reward");
                }
                TimerManager.instance.AddTimer(1000, 1, (i) => _startBlitzRequesting = false);
            });
        }
Ejemplo n.º 6
0
        public void OnGotoBtnClick()
        {
            if (curActData.need_alliance && AlliancesManager.Instance.Account.State != eAllianceState.Joined)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTDailyHudController_10226"));
                return;
            }

            if (string.IsNullOrEmpty(curActData.nav_parameter))
            {
                controller.Close();
                return;
            }

            int funcID = 0;

            int.TryParse(curActData.nav_parameter, out funcID);
            if (funcID != 0)
            {
                Hotfix_LT.Data.FuncTemplate funcTem = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(funcID);
                if (funcTem != null)
                {
                    Hotfix_LT.Data.FuncTemplateManager.OpenFunc(funcTem.id, funcTem.parameter);
                    //GlobalMenuManager.Instance.Open(funcTem.ui_model, funcTem.parameter);
                }
                else
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTDailyHudController_10933"));
                    EB.Debug.LogError(string.Format("LTDaily GotoFuncID is Error, Data is Null! funcID = {0}", funcID));
                }
                return;
            }

            string[] strs = curActData.nav_parameter.Split(';');
            if (strs.Length < 2)
            {
                EB.Debug.LogError(string.Format("LTDaily NavParameter is Error, Length less than 2! activityID = {0}, param = {1}", curActData.id, curActData.nav_parameter));
            }
            else
            {
                if (AllianceUtil.GetIsInTransferDart(null))
                {
                    return;
                }

                controller.Close();
                if (strs[1].CompareTo("EnemySpawns_11") == 0)
                {
                    //世界boss特殊处理,需要走到的是目标区域,但是配置的是怪的模型
                    strs[1] = "AreaTrigger_E";
                }
                WorldMapPathManager.Instance.StartPathFindToNpcFly(MainLandLogic.GetInstance().CurrentSceneName, strs[0], strs[1]);
            }
        }
Ejemplo n.º 7
0
 public void OnContinueBtnClick()
 {
     if (AllianceUtil.GetIsInTransferDart(null))
     {
         //WorldMapPathManager.Instance.StartPathFindToNpc(MainLandLogic.GetInstance().CurrentSceneName, Hotfix_LT.Data.SceneTemplateManager.Instance.GetMainLandEncounter(10068).mainland_name, Hotfix_LT.Data.SceneTemplateManager.Instance.GetMainLandEncounter(10068).locator);
     }
     else
     {
         WorldMapPathManager.Instance.StartPathFindToNpcFly(MainLandLogic.GetInstance().CurrentSceneName, Hotfix_LT.Data.SceneTemplateManager.Instance.GetMainLandEncounter(10068).mainland_name, Hotfix_LT.Data.SceneTemplateManager.Instance.GetMainLandEncounter(10068).locator);
     }
     controller.Close();
 }
Ejemplo n.º 8
0
        public void OnGotoLegionFBClick()
        {
            if (AllianceUtil.GetIsInTransferDart(""))
            {
                return;
            }

            InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 0.5f);
            GlobalMenuManager.Instance.Open("LTLegionFBUI");
            FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.alliance_camp_topic,
                                                   FusionTelemetry.GamePlayData.alliance_camp_event_id, FusionTelemetry.GamePlayData.alliance_camp_umengId, "open");
        }
Ejemplo n.º 9
0
        public void OnEnterBtnClick()
        {
            if (campaignId <= 0)
            {
                return;
            }

            if (mainTpl == null)
            {
                return;
            }

            if (AllianceUtil.GetIsInTransferDart(""))
            {
                return;
            }

            if (isRequest)
            {
                return;
            }

            if (!isShowFree)
            {
                int vaildTimes = IsVigorEnough(1);
                if (vaildTimes <= 0)
                {
                    BalanceResourceUtil.TurnToVigorGotView();
                    return;
                }
            }

            Hashtable data = Johny.HashtablePool.Claim();

            data.Add("startCombatCallback", new System.Action(() => {
                if (campaignId <= 0)
                {
                    return;
                }

                if (mCallback != null)
                {
                    mCallback();
                }
                LTInstanceMapModel.Instance.RequestMainFightCampaign(campaignId, SceneLogicManager.isMainlands()?1:0);
            }));
            data.Add("enemyLayout", mainTpl.EncounterGroupId);
            data.Add("battleType", eBattleType.MainCampaignBattle);

            GlobalMenuManager.Instance.Open("LTCombatReadyUI", data);
        }
Ejemplo n.º 10
0
        protected override void OnNavClick()
        {
            if (AllianceUtil.GetIsInTransferDart(null))
            {
                return;
            }

            InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 2);
            System.Action act = new System.Action(delegate
            {
                LTMonopolyInstanceHudController.EnterInstance();
            });
            UIStack.Instance.ShowLoadingScreen(act, false, true, true);
        }
Ejemplo n.º 11
0
        public void OnChallengeBtnClick()
        {
            if (isClickBtn)
            {
                return;
            }
            FusionAudio.PostEvent("UI/General/ButtonClick");

            //判断体力是否足够
            if (BalanceResourceUtil.EnterVigorCheck(EnterVigor))
            {
                return;
            }

            if (AllianceUtil.GetIsInTransferDart(""))
            {
                return;
            }

            if (LTUltimateTrialDataManager.Instance.curCompeteLevel > LTUltimateTrialDataManager.Instance.GetCurCompeteLevel())
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTResourceInstanceHudController_7254"));
                return;
            }

            if (!LTUltimateTrialDataManager.Instance.GetTimeTip(false, true).Equals("open"))
            {
                //赛季结束,不在活动时间
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_EconomyTemplateManager_62898"));
                return;
            }

            int    level       = LTUltimateTrialDataManager.Instance.curCompeteLevel;
            string enemyLayout = LTUltimateTrialDataManager.Instance.GetCurCompeteLayout(level);

            if (string.IsNullOrEmpty(enemyLayout))
            {
                //服务器未开始这个活动,没初始化怪物数据
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_ACTIVITY_NOT_OPEN"));
                return;
            }
            isClickBtn = true;
            InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 0.5f);

            System.Action startCombatCallback = delegate { LTUltimateTrialDataManager.Instance.RequestStarttCompete(level); };

            BattleReadyHudController.Open(eBattleType.InfiniteCompete, startCombatCallback, enemyLayout);
            isClickBtn = false;
        }
Ejemplo n.º 12
0
 /// <summary>
 /// 点击挑战入口
 /// </summary>
 public void OnCliclkChallengeBtn()
 {
     if (AllianceUtil.GetIsInTransferDart(""))
     {
         return;
     }
     if (!m_FuncTpl.IsConditionOK())
     {
         MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, m_FuncTpl.GetConditionStr());
     }
     else
     {
         GlobalMenuManager.Instance.Open("LTChallengeInstanceSelectHud");
     }
 }
Ejemplo n.º 13
0
        public void OnTerritoryItemClick(GameObject go)
        {
            if (AllianceUtil.GetIsInTransferDart(""))
            {
                return;
            }

            int           index         = System.Array.IndexOf(TerritoryGOs, go);
            TerritoryData territoryData = NationManager.Instance.TerritoryList.TerritoryList[index];

            if (territoryData.ADType != eTerritoryAttackOrDefendType.None)
            {
                GlobalMenuManager.Instance.Open("LTNationBattleHudUI", territoryData);
            }
        }
Ejemplo n.º 14
0
        //暂未使用,需要保留防止后面重新启用
        static public void PK(long uid, string targetName, System.Action <EB.Sparx.Response> OnInvitePK)
        {
            if (AllianceUtil.GetIsInTransferDart("ID_PLAYER_NO_BLANK"))
            {
                return;
            }

            if (GetIsRedName(uid))
            {
                int aid = GetAidByUid(uid);
                if (aid > 0 && AllianceUtil.GetIsInAlliance(uid))
                {
                    MessageTemplateManager.ShowMessage(902095);
                    return;
                }
            }
            SocialIntactManager.Instance.InvitePVP(uid, OnInvitePK);
        }
Ejemplo n.º 15
0
        static public void PK(long uid)
        {
            if (AllianceUtil.GetIsInTransferDart("ID_PLAYER_NO_BLANK"))
            {
                return;
            }

            if (GetIsRedName(uid))
            {
                int aid = GetAidByUid(uid);
                if (aid > 0 && AllianceUtil.GetIsInAlliance(uid))
                {
                    MessageTemplateManager.ShowMessage(902095);
                    return;
                }
            }
            SocialIntactManager.Instance.SocialCombat(uid, (resp) =>
            {
                DataLookupsCache.Instance.CacheData(resp.hashtable);
            });
        }
Ejemplo n.º 16
0
        public void OnBtnClick()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");

            if (m_FuncTpl == null)
            {
                return;
            }

            if (AllianceUtil.GetIsInTransferDart(""))
            {
                return;
            }

            GlobalMenuManager.Instance.Open(m_FuncTpl.ui_model, m_FuncTpl.parameter);

            if (m_FuncTpl.ui_model != null && m_FuncTpl.ui_model.Equals("LTResourceInstanceUI"))
            {
                if (m_FuncTpl.parameter == null)
                {
                    return;
                }
                if (m_FuncTpl.parameter.Equals("Exp"))
                {
                    FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.exp_camp_topic,
                                                           FusionTelemetry.GamePlayData.exp_camp_event_id, FusionTelemetry.GamePlayData.exp_camp_umengId, "open");
                }
                else if (m_FuncTpl.parameter.Equals("Gold"))
                {
                    FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.gold_camp_topic,
                                                           FusionTelemetry.GamePlayData.gold_camp_event_id, FusionTelemetry.GamePlayData.gold_camp_umengId, "open");
                }
            }
            else if (m_FuncTpl.ui_model != null && m_FuncTpl.ui_model.Equals("LTAlienMazeHud"))
            {
                FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.puzzle_camp_topic,
                                                       FusionTelemetry.GamePlayData.puzzle_camp_event_id, FusionTelemetry.GamePlayData.puzzle_camp_umengId, "open");
            }
        }
Ejemplo n.º 17
0
        public void OnFastButtonClick(ArenaChallengerController param)
        {
            FusionAudio.PostEvent("UI/Battle/StartBattle");
            if (!canBtnClick || HasBtnClick)
            {
                return;
            }
            HasBtnClick = true;
            int residueNum = VIPTemplateManager.Instance.GetTotalNum(VIPPrivilegeKey.ArenaTimes) + ArenaManager.Instance.Info.buyTimes - ArenaManager.Instance.Info.usedTimes;

            if (residueNum <= 0)
            {
                OnBuyTimesButtonClick();
                return;
            }

            if (AllianceUtil.GetIsInTransferDart("ID_ARENA"))
            {
                return;
            }
            ArenaManager.Instance.fastChallenge(param.Challenger.uid, param.Challenger.rank, true);
        }
Ejemplo n.º 18
0
        public void OnBattleBtnClick()
        {
            if (isClickBtn)
            {
                return;
            }
            isClickBtn = true;
            FusionAudio.PostEvent("UI/General/ButtonClick");

            //判断体力是否足够
            if (BalanceResourceUtil.EnterVigorCheck(EnterVigor))
            {
                isClickBtn = false;
                return;
            }

            if (AllianceUtil.GetIsInTransferDart(""))
            {
                isClickBtn = false;
                return;
            }
            else
            {
                InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 0.5f);
                int    layer       = LTUltimateTrialDataManager.Instance.GetCurLayer();
                string enemyLayout = "";
                var    tpl         = EventTemplateManager.Instance.GetInfiniteChallengeTpl(layer);
                if (tpl != null)
                {
                    enemyLayout = tpl.combat_layout;
                }
                System.Action startCombatCallback = delegate { LTUltimateTrialDataManager.Instance.RequestStartChallenge(layer); };
                BattleReadyHudController.Open(eBattleType.InfiniteChallenge, startCombatCallback, enemyLayout);
                isClickBtn = false;
            }
        }
Ejemplo n.º 19
0
        public void OnChapterClick()
        {
            if (m_ChapterData.IsBoxRewardType())
            {
                if (!LTInstanceUtil.IsChapterComplete(m_ChapterData.ForwardChapterId))
                {
                    int FC = 0;
                    int.TryParse(m_ChapterData.ForwardChapterId, out FC);
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, string.Format(EB.Localizer.GetString("ID_INSTANCE_MAP_BOX_REWRAD_TIP2"), FC % 100));
                    return;
                }
                if (LTInstanceMapModel.Instance.GetMainChapterRewardState(m_ChapterData.Id))
                {
                    return;
                }
                LTInstanceMapModel.Instance.RequestMainChapterReward(m_ChapterData.Id, delegate
                {
                    ContainerObj.CustomSetActive(false);
                    GlobalMenuManager.Instance.Open("LTShowRewardView", m_ChapterData.RewardDataDic[0]);
                });
                return;
            }

            FusionAudio.PostEvent("UI/General/ButtonClick", true);
            if (AllianceUtil.GetIsInTransferDart("ID_CAMPAGIN"))
            {
                return;
            }

            //此处判断进阶条件是否满足
            if (!LTInstanceUtil.GetIsChapterLimitConditionComplete(m_ChapterData, out int currNum))
            {
                //打开跳转界面
                GlobalMenuManager.Instance.Open("PlayerUpgradeTipView", new int[3] {
                    m_ChapterData.Limitparam2, m_ChapterData.Limitparam1, currNum
                });
                return;
            }
            if (BalanceResourceUtil.GetUserLevel() < m_ChapterData.LevelLimit)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, string.Format(EB.Localizer.GetString("ID_codefont_in_LTInstanceMapChapterCtrl_2697"), m_ChapterData.LevelLimit));
                //GlobalMenuManager.Instance.Open("LTPlayerLevelUpTipView", "Levelup");
                return;
            }

            //主线章节入口
            if (LTInstanceMapHudController.curChapterID != null && LTInstanceMapHudController.curChapterID != m_ChapterData.Id)
            {
                return;
            }
            LTInstanceMapHudController.curChapterID = m_ChapterData.Id;

            if (!string.IsNullOrEmpty(m_ChapterData.BeforeChapter))
            {
                string flagStr = PlayerPrefs.GetString(LoginManager.Instance.LocalUserId.Value + m_ChapterData.BeforeChapter);

                if (string.IsNullOrEmpty(flagStr))
                {
                    LTStoryController.OpenStory(OnChapterClick, m_ChapterData.BeforeChapter);
                    PlayerPrefs.SetString(LoginManager.Instance.LocalUserId.Value + m_ChapterData.BeforeChapter, "True");//本地临时保存,等服务器做好了会保存到服务器
                    PlayerPrefs.Save();
                    return;
                }
            }
            Action act = new Action(delegate
            {
                LTMainInstanceHudController.EnterInstance(m_ChapterData.Id);
                LTInstanceMapHudController.curChapterID = null;
            });

            Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.PlayCloudFxEvent, act);
        }
Ejemplo n.º 20
0
        //打开功能页面
        private void PopFuncitonIntactMenu(GameObject player, GameObject interactable)
        {
            if (IsHanterMonster(interactable))
            {
                if (AllianceUtil.GetIsInTransferDart("ID_HANT_MONSTER"))
                {
                    return;
                }

                if (LTBountyTaskConversationController.sTriggerSpecialEvent)  //trigger special event
                {
                    GlobalMenuManager.Instance.Open("LTBountyTaskConversationUI");
                }
                else
                {
                    System.Action dialogueFinish = delegate()
                    {
                        EnemyController _enemyController = interactable.GetComponent <EnemyController>();
                        AttackNpc(_enemyController, eBattleType.HantBattle);
                    };
                    GlobalMenuManager.Instance.Open("LTBountyTaskConversationUI", dialogueFinish);
                }
            }
            else if (IsBeatMonster(interactable))
            {
                if (AllianceUtil.GetIsInTransferDart("ID_BEAT_MONSTER"))
                {
                    return;
                }

                MessageTemplateManager.ShowMessage(902076, null, delegate(int result)
                {
                    if (result == 0)
                    {
                        if (interactable != null)
                        {
                            EnemyController _enemyController = interactable.GetComponent <EnemyController>();
                            AttackNpc(_enemyController, eBattleType.HantBattle);//与悬赏公用一个战斗类型
                        }
                    }
                });
            }
            else if (IsGhost(interactable))
            {
                if (AllianceUtil.GetIsInTransferDart(null))
                {
                    return;
                }

                var activitytmp = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10073);
                if (activitytmp != null)
                {
                    if (!activitytmp.IsConditionOK())
                    {
                        Hashtable data = new Hashtable()
                        {
                            { "0", activitytmp.condition }
                        };
                        MessageTemplateManager.ShowMessage(902009, data, null);
                        return;
                    }
                }

                if (!IsBusy(interactable))
                {
                    if (interactable != null)
                    {
                        EnemyController _enemyController = interactable.GetComponent <EnemyController>();
                        AttackNpc(_enemyController, eBattleType.GhostBattle);
                    }
                }
                else
                {
                    MessageTemplateManager.ShowMessage(902059);
                }
            }
            else if (IsAllianceMonster(interactable))
            {
                if (AllianceUtil.GetIsInTransferDart("ID_ALLIANCE_COPY"))
                {
                    return;
                }


                if (interactable != null)
                {
                    MessageTemplateManager.ShowMessage(902223, null, delegate(int result)
                    {
                        if (result == 0)
                        {
                            EnemyController _enemyController = interactable.GetComponent <EnemyController>();
                            AttackNpc(_enemyController, eBattleType.AllianceCampaignBattle);
                        }
                    });
                }
            }
            else if (IsWorldBoss(interactable))
            {
                if (AllianceUtil.GetIsInTransferDart("ID_WORLD_BOSS"))
                {
                    return;
                }

                var activitytmp = Hotfix_LT.Data.EventTemplateManager.Instance.GetSpecialActivity(LTWorldBossDataManager.ActivityId);
                if (activitytmp != null)
                {
                    var func = Data.FuncTemplateManager.Instance.GetFunc(activitytmp.funcId);
                    if (func != null && !func.IsConditionOK())
                    {
                        MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, func.GetConditionStrSpecial());
                        return;
                    }
                }
                //1 可以战斗 2活动还没开始 3等待复活
                bool start = LTWorldBossDataManager.Instance.IsWorldBossStart();
                if (start)
                {
                    bool islive = LTWorldBossDataManager.Instance.IsLive();
                    if (islive)
                    {
                        /*bool needrevive = IsWorldBossNeedRevive();
                         *              if(needrevive)
                         *              {
                         *  BossReviveEvent e = new BossReviveEvent();
                         *  EventManager.instance.Raise(e);
                         *                      return;
                         *              }*/
                        if (interactable != null)
                        {
                            EnemyController _enemyController = interactable.GetComponent <EnemyController>();
                            //AttackNpc(_enemyController, eBattleType.BossBattle);
                            GlobalMenuManager.Instance.Open("LTWorldBossHud");
                        }
                    }
                    else
                    {
                        MessageTemplateManager.ShowMessage(902185);
                    }
                }
                else
                {
                    MessageTemplateManager.ShowMessage(902090);
                }
            }
            else
            {
            }
        }
Ejemplo n.º 21
0
        static void ProcessSpecialActionTaskRunning(string taskid)
        {
            Hotfix_LT.Data.TaskTemplate taskTpl = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(taskid);
            if (taskTpl == null)
            {
                return;
            }
            int taskspecialtype = 0;;

            if (!int.TryParse(taskTpl.target_parameter_1, out taskspecialtype))
            {
                return;
            }

            switch ((eTaskSpecialType)taskspecialtype)
            {
            case eTaskSpecialType.FINISH_CAMPAIGN:
                if (AllianceUtil.IsInTransferDart)
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855"));
                    return;
                }
                GlobalMenuManager.Instance.Open("LTInstanceMapHud");
                break;

            case eTaskSpecialType.ALLIACE_DONATE:
                LegionLogic.GetInstance().ShowUI(ChoiceState.Donate);
                break;

            case eTaskSpecialType.GOLD_CAMPAIGN:
                if (AllianceUtil.IsInTransferDart)
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855"));
                    return;
                }
                Hotfix_LT.Data.FuncTemplate ftemp = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10020);
                if (ftemp != null && !ftemp.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ftemp.GetConditionStr());
                    return;
                }
                GlobalMenuManager.Instance.Open("LTResourceInstanceUI", "Gold");
                break;

            case eTaskSpecialType.WORLD_CHAT:
                GlobalMenuManager.Instance.Open("ChatHudView", null);
                break;

            case eTaskSpecialType.LADDER:
                StartTaskAcceptNpcPathFinding(taskid);
                break;

            case eTaskSpecialType.ARENA:
                StartTaskAcceptNpcPathFinding(taskid);
                break;

            case eTaskSpecialType.BUY_GOLD:
                GlobalMenuManager.Instance.Open("LTResourceShopUI");
                break;

            case eTaskSpecialType.GAMBLE:
                GlobalMenuManager.Instance.Open("LTDrawCardTypeUI");
                break;

            case eTaskSpecialType.YABIAO:
                StartTaskAcceptNpcPathFinding(taskid);
                break;

            case eTaskSpecialType.UlTIMATE:
                StartTaskAcceptNpcPathFinding(taskid);
                break;

            case eTaskSpecialType.HANT:
                StartTaskAcceptNpcPathFinding(taskid);
                break;

            case eTaskSpecialType.LADDER_CHALLENGE:
                StartTaskAcceptNpcPathFinding(taskid);
                break;

            case eTaskSpecialType.BUY_VIGOR:
                GlobalMenuManager.Instance.Open("LTResourceShopUI");
                break;

            case eTaskSpecialType.BUY_ITEM:
                GlobalMenuManager.Instance.Open("LTStoreUI");
                break;

            case eTaskSpecialType.PK:
                GlobalMenuManager.Instance.ComebackToMianMenu();
                break;

            case eTaskSpecialType.CHALLENGE_CAMPAIGN:
                if (AllianceUtil.IsInTransferDart)
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855"));
                    return;
                }
                GlobalMenuManager.Instance.Open("LTChallengeInstanceSelectHud");
                break;

            case eTaskSpecialType.SEND_VIGOR:
                Hotfix_LT.Data.FuncTemplate ft3 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10057);
                if (ft3 != null && !ft3.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft3.GetConditionStr());
                    return;
                }
                GlobalMenuManager.Instance.Open("FriendHud", null);
                break;

            case eTaskSpecialType.COST_DIAMOND:
                GlobalMenuManager.Instance.Open("LTDrawCardTypeUI", DrawCardType.hc);
                break;

            case eTaskSpecialType.EQUIP_INTENSIFY:
                Hotfix_LT.Data.FuncTemplate ft2 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050);
                if (ft2 != null && !ft2.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft2.GetConditionStr());
                    return;
                }
                InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 0.5f);
                GlobalMenuManager.Instance.Open("LTPartnerEquipmentUI", LTPartnerDataManager.Instance.GetOwnPartnerList()[0]);
                break;

            case eTaskSpecialType.CLASH_OF_HEROES:
                StartTaskAcceptNpcPathFinding(taskid);
                break;

            case eTaskSpecialType.EXP_CAMPAIGN:
                if (AllianceUtil.IsInTransferDart)
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855"));
                    return;
                }
                Hotfix_LT.Data.FuncTemplate ft = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10021);
                if (ft != null && !ft.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft.GetConditionStr());
                    return;
                }
                GlobalMenuManager.Instance.Open("LTResourceInstanceUI", "Exp");
                break;

            case eTaskSpecialType.CHALLENGE_INSTANCE:
                if (AllianceUtil.IsInTransferDart)
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855"));
                    return;
                }
                Hotfix_LT.Data.FuncTemplate f_ch = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10065);
                if (f_ch != null && !f_ch.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, f_ch.GetConditionStr());
                    return;
                }
                GlobalMenuManager.Instance.Open("LTChallengeInstanceSelectHud");
                break;

            case eTaskSpecialType.LEGION_INSSTANCE:
                if (!LegionModel.GetInstance().isJoinedLegion)
                {
                    LegionLogic.GetInstance().ShowUI();
                }
                else
                {
                    GlobalMenuManager.Instance.Open("LTLegionFBUI");
                }
                break;

            case eTaskSpecialType.WORLD_BOSS:
                if (AllianceUtil.GetIsInTransferDart(null))
                {
                    return;
                }
                //配置npc
                GlobalMenuManager.Instance.CloseMenu("NormalTaskView");
                string[] strs = new string[2] {
                    "s001a", "AreaTrigger_E"
                };
                WorldMapPathManager.Instance.StartPathFindToNpcFly(MainLandLogic.GetInstance().CurrentSceneName, strs[0], strs[1]);
                break;

            case eTaskSpecialType.PARENER_ADVANCED:
                Hotfix_LT.Data.FuncTemplate ft4 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050);
                if (ft4 != null && !ft4.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft4.GetConditionStr());
                    return;
                }
                GlobalMenuManager.Instance.Open("LTPartnerView", "Develop_Upgrade");
                break;

            case eTaskSpecialType.PARENER_UPLEVEL:
                Hotfix_LT.Data.FuncTemplate ft5 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050);
                if (ft5 != null && !ft5.IsConditionOK())
                {
                    MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft5.GetConditionStr());
                    return;
                }
                GlobalMenuManager.Instance.Open("LTPartnerView", "Develop");
                break;

            default:
                break;
            }
        }