示例#1
0
        public void SetData(int iconID)
        {
            string iconStr   = LegionModel.GetInstance().dicLegionSpriteName[iconID % 100];
            string iconBGStr = LegionModel.GetInstance().dicLegionBGSpriteName[iconID / 100];

            SetData(iconStr, iconBGStr, iconID);
        }
示例#2
0
        /// <summary>
        /// 修改军团名称和图标的核心方法
        /// </summary>
        private void OnClickChangeLegionName()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            if (BtInput.value.Length <= 1)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.MessageDialogue_1, EB.Localizer.GetString("ID_codefont_in_LegionLogic_11096"));
                return;
            }
            if (iconID == data.legionIconID && BtInput.value == data.legionName)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.MessageDialogue_1, EB.Localizer.GetString("ID_codefont_in_LegionNameEditView_2604"));
                mDMono.gameObject.SetActive(false);
                return;
            }
            if (!EB.ProfanityFilter.Test(BtInput.value))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.MessageDialogue_1, EB.Localizer.GetString("ID_codefont_in_LegionLogic_10580"));
                return;
            }
            if (BalanceResourceUtil.GetUserDiamond() < AlliancesManager.Instance.Config.RenameCost)
            {
                BalanceResourceUtil.HcLessMessage();
                return;
            }

            LTHotfixApi.GetInstance().ExceptionFunc = FuncProcess;//截取异常进行处理
            EB.Sparx.Request request = LTHotfixApi.GetInstance().Post("/alliances/rename");
            request.AddData("aid", LegionModel.GetInstance().legionData.legionID);
            request.AddData("name", BtInput.value);
            request.AddData("iconID", iconID);
            LTHotfixApi.GetInstance().BlockService(request, ResProcess /* (Hashtable resData) => { }*/);//向服务器发送请求上传修改后的信息
            //AlliancesManager.Instance.Detail.IconID = iconID;//容错步骤,如果发0给服务器,服务器不会下发该数据,这里先存储,如果服务器不下发就用这里设置的,服务器下发了用服务器的
            mDMono.gameObject.SetActive(false);
        }
示例#3
0
 public static LegionModel GetInstance()
 {
     if (_instance == null)
     {
         _instance = new LegionModel();
     }
     return(_instance);
 }
示例#4
0
 public void ShowUI(bool isShow)
 {
     mDMono.gameObject.CustomSetActive(isShow);
     this.isShow = isShow;
     if (isShow)
     {
         memberItemScroll.SetItemDatas(LegionModel.GetInstance().legionData.listMember.ToArray());
     }
 }
示例#5
0
 public override void SetMenuData(object param)
 {
     if (param != null)
     {
         SelfItemdata       = param as AllianceTechSkill;
         aid                = LegionModel.GetInstance().legionData.legionID;
         skillName.text     = skillNameShadow.text = SelfItemdata.skillName;
         skillSp.spriteName = SelfItemdata.skillIcon;
     }
 }
示例#6
0
        //改变位置
        public void changeBattleFieldPosition(int FieldNumber, int type, int position, System.Action <Hashtable> dataHandler)
        {
            EB.Sparx.Request request = endPoint.Post("/awar/changeBattleFieldPosition");

            request.AddData("toFieldNumber", FieldNumber);
            request.AddData("toType", type);
            request.AddData("toPosition", position);
            request.AddData("aid", LegionModel.GetInstance().legionData.legionID);

            BlockService(request, dataHandler);
        }
示例#7
0
 public void Fill(AllianceDonateChest data)
 {
     if (data == null)
     {
         EB.Debug.LogError("LegionDonateChest data is null,please check");
         return;
     }
     chestScore.text = data.score.ToString();
     chestData       = data;
     aid             = LegionModel.GetInstance().legionData.legionID;
     SetRecievedState();
 }
示例#8
0
        //帮主换位
        public void leaderChangeMemberPosition(int FieldNumber, int type, int position1, int position2, System.Action <Hashtable> dataHandler)
        {
            EB.Sparx.Request request = endPoint.Post("/awar/leaderChangeMemberPosition");

            request.AddData("fieldNumber", FieldNumber);
            request.AddData("type", type);
            request.AddData("position1", position1);
            request.AddData("position2", position2);
            request.AddData("aid", LegionModel.GetInstance().legionData.legionID);

            BlockService(request, dataHandler);
        }
示例#9
0
        /// <summary>获取公会科技加成</summary>
        private static LTAttributesData GetPartnerLegionAttributes(LTAttributesData baseAttr, LTPartnerData partnerData)
        {
            LTAttributesData attrData = new LTAttributesData();

            if (!LegionModel.GetInstance().isJoinedLegion)
            {
                return(attrData);
            }
            var levedic = AlliancesManager.Instance.Account.legionTechInfo.TechlevelDic;

            if (levedic != null)
            {
                List <AllianceTechSkill> data = AllianceTemplateManager.Instance.mTechSkillList;
                float Atkadd = 0, Defadd = 0, MaxHpadd = 0;
                for (int i = 0; i < data.Count; i++)
                {
                    var skilllist = data[i];
                    if (partnerData.HeroInfo.char_type != (eRoleAttr)skilllist.charType)
                    {
                        continue;
                    }
                    if (levedic.TryGetValue(skilllist.skillid, out int level))
                    {
                        switch (data[i].addtionType)
                        {
                        case (int)Data.TechSkillAddtionType.ATK:
                            Atkadd += skilllist.levelinfo[level].addition;
                            break;

                        case (int)Data.TechSkillAddtionType.DEF:
                            Defadd += skilllist.levelinfo[level].addition;
                            break;

                        case (int)Data.TechSkillAddtionType.MaxHp:
                            MaxHpadd += skilllist.levelinfo[level].addition;
                            break;

                        default:
                            break;
                        }
                    }
                }
                attrData.m_MaxHP = baseAttr.m_MaxHP * MaxHpadd;
                attrData.m_ATK   = baseAttr.m_ATK * Atkadd;
                attrData.m_DEF   = baseAttr.m_DEF * Defadd;
            }
            return(attrData);
        }
示例#10
0
 /// <summary>
 /// 打开后传参
 /// </summary>
 /// <param name="param"></param>
 public override void SetMenuData(object param)
 {
     LegionEvent.CloseLegionHudUI            += controller.Close;
     LegionEvent.NotifyLegionAccount         += OnLegionAccount;
     LegionEvent.NotifyUpdateSearchItemDatas += SetData;
     Hotfix_LT.Messenger.AddListener <int>(Hotfix_LT.EventName.LegionSearchMessageCallBack, LegionSearchMessageCallBackFucc);
     if (LegionModel.GetInstance().searchItemDatas != null)
     {
         SetData(LegionModel.GetInstance().searchItemDatas);
     }
     //要是当前的创建军团界面没有关掉的就先关掉,因为界面会缓存上一次界面情况
     if (legionCreateView != null)
     {
         legionCreateView.mDMono.gameObject.SetActive(false);
     }
 }
示例#11
0
        private void OnClickIconBGBtn(GameObject obj)
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            int tempIconBGID = Array.IndexOf(IconBGButtons, obj);

            if (curIconBGID == tempIconBGID)
            {
                return;
            }

            curIconBGID       = tempIconBGID;
            IconBG.spriteName = LegionModel.GetInstance().dicLegionBGSpriteName[curIconBGID];
            IconBGSelects[curIconBGID].SetActive(true);
            IconBGSelects[oldIconBGID].SetActive(false);
            oldIconBGID = curIconBGID;
        }
示例#12
0
        /// <summary>
        /// 设置扫荡相关
        /// </summary>
        private void SetBossWipeInfo(bool isRewardCouldGot)
        {
            bool isCanWipeOut = isRewardCouldGot && (Data.VIPTemplateManager.Instance.GetTotalNum(Data.VIPPrivilegeKey.CanBlitzAlliCampaign) > 0);
            int  current      = LegionModel.GetInstance().legionData.todayExp;
            int  total        = m_CurrentBoss.donate;

            if (isCanWipeOut)
            {
                v_ChallengeBtn.transform.localPosition = new Vector3(-548, -600, 0);
            }
            else
            {
                v_ChallengeBtn.transform.localPosition = new Vector3(-265, -600, 0);
            }
            v_WipeOutBtn.SetActive(!(current < total) && isCanWipeOut);
        }
示例#13
0
        /// <summary>
        /// 点击布阵界面后的战斗按钮回调
        /// </summary>
        private void OnClickStart()
        {
            v_UIController.v_Api.RequestBossChallenge(m_CurrentBoss.monsterId, delegate(Hashtable result)
            {
                if (result != null)
                {
                    DataLookupsCache.Instance.CacheData(result);
                }
            });
            Hashtable data = new Hashtable();

            data.Add("legionData", LegionModel.GetInstance().legionData);
            data.Add("choiceState", ChoiceState.Activity);
            GlobalMenuManager.Instance.PushCache("LTLegionMainMenu", data);
            GlobalMenuManager.Instance.PushCache("LTLegionFBUI", m_BossIndex);
        }
示例#14
0
 private void UpdateUI()
 {
     if (SelfItemdata == null)
     {
         controller.Close();
         return;
     }
     AlliancesManager.Instance.Account.legionTechInfo.TechlevelDic.TryGetValue(SelfItemdata.skillid, out curSkillLevel);
     nextSkillLevel = curSkillLevel >= SelfItemdata.maxLevel ? -1 : curSkillLevel + 1;
     Legionlevel    = LegionModel.GetInstance().legionData.legionLevel;
     if (SelfItemdata.levelinfo.Count > curSkillLevel)
     {
         string skilldex;
         skilldex      = string.Format(SelfItemdata.skilldesTemplate, curSkillLevel, FloatToPercent(SelfItemdata.levelinfo[curSkillLevel].addition));
         curLevel.text = curlevelShadow.text = skilldex;
         if (nextSkillLevel != -1 && SelfItemdata.levelinfo.Count > nextSkillLevel)
         {
             skilldex    = string.Format(SelfItemdata.skilldesTemplate, nextSkillLevel, FloatToPercent(SelfItemdata.levelinfo[nextSkillLevel].addition));
             totalMedal  = BalanceResourceUtil.GetUserAllianceDonate();
             costMedal   = SelfItemdata.levelinfo[curSkillLevel].cost;
             colorstr    = costMedal > totalMedal ? "[ff6699]" : "[42fe79]";
             medalnumstr = string.Format("{0}{1}/{2}[-]", colorstr, totalMedal, costMedal);
             medalspobj.CustomSetActive(true);
             medalspobj.GetComponent <UIWidget>().ResetAnchors();
             medalNum.transform.localPosition = normallabelpos;
             LTUIUtil.SetGreyButtonEnable(breakBtn, true);
         }
         else if (nextSkillLevel == -1)
         {
             medalnumstr = EB.Localizer.GetString("ID_HAS_MAX_LEVEL");
             medalNum.transform.localPosition = maxlevellabelpos;
             medalspobj.CustomSetActive(false);
             LTUIUtil.SetGreyButtonEnable(breakBtn, false);
         }
         medalNum.text  = medalNumShadow.text = medalnumstr;
         nextLevel.text = nextLevelShadow.text = skilldex;
         if (!isFristEnter)
         {
             //if (!fx.IsPlaying())
             //{
             fx.Play(true);
             //}
         }
         isFristEnter = false;
     }
     isCouldClick = true;
 }
示例#15
0
        public void SetIcon(string iconStr)
        {
            int iconID = 0;

            int.TryParse(iconStr, out iconID);
            int legionIconIndex   = iconID % 100;
            int legionBgIconIndex = iconID / 100;

            if (LegionModel.GetInstance().dicLegionSpriteName.ContainsKey(legionIconIndex))
            {
                Icon.spriteName = LegionModel.GetInstance().dicLegionSpriteName[legionIconIndex];
            }
            if (LegionModel.GetInstance().dicLegionBGSpriteName.ContainsKey(legionBgIconIndex))
            {
                IconBG.spriteName = LegionModel.GetInstance().dicLegionBGSpriteName[legionBgIconIndex];
            }
        }
示例#16
0
        public void OpenUI()
        {
            mDMono.gameObject.SetActive(true);
            if (mTs == null)
            {
                mTs = mDMono.transform.GetComponent <TweenScale>();
            }
            mTs.ResetToBeginning();
            mTs.PlayForward();

            iconID            = 0;
            Icon.spriteName   = LegionModel.GetInstance().dicLegionSpriteName[0];
            IconBG.spriteName = LegionModel.GetInstance().dicLegionBGSpriteName[0];
            LTUIUtil.SetText(CoinNumLab, AlliancesManager.Instance.Config.CreateCost.ToString());
            string colorStr = BalanceResourceUtil.GetUserDiamond() >= AlliancesManager.Instance.Config.CreateCost ? LT.Hotfix.Utility.ColorUtility.WhiteColorHexadecimal : LT.Hotfix.Utility.ColorUtility.RedColorHexadecimal;

            CoinNumLab.text = string.Format("[{0}]{1}[-]", colorStr, AlliancesManager.Instance.Config.CreateCost);
        }
示例#17
0
        private string GetMemberPos(eAllianceMemberRole curPos, bool isPromote)
        {
            string str   = "";
            int    index = (int)curPos;

            if (isPromote)
            {
                index++;
            }
            else
            {
                index--;
            }

            str = LegionModel.GetInstance().GetMemberPosName((eAllianceMemberRole)index);

            return(str);
        }
示例#18
0
        public AllianceLevelRankItemData(Hashtable data, int index)
        {
            m_Index  = index;
            m_Rank   = EB.Dot.Integer("r", data, m_Rank);
            m_IconId = EB.Dot.Integer("icon_id", data, 0);

            m_Icon        = LegionModel.GetInstance().dicLegionSpriteName[m_IconId % 100];
            m_BadgeBGIcon = LegionModel.GetInstance().dicLegionBGSpriteName[m_IconId / 100];

            m_Name       = EB.Dot.String("an", data, "");
            m_OwnerName  = EB.Dot.String("on", data, "");
            m_OwnerLevel = EB.Dot.Integer("ol", data, 0);
            int tplId = EB.Dot.Integer("t_id", data, 15011);
            int skin  = EB.Dot.Integer("os", data, 0);

            if (tplId != 0)
            {
                var tpl = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(tplId);
                if (tpl == null)
                {
                    tpl = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(10011);
                }
                if (tpl != null)
                {
                    var heroInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(tpl.character_id, skin);
                    if (heroInfo != null)
                    {
                        m_OwnerModel = heroInfo.model_name;//需添加皮肤
                    }
                    else
                    {
                        EB.Debug.LogError("cannot found heroInfo for c_id={0}", tpl.character_id);
                    }
                }
            }
            else
            {
                EB.Debug.LogError("AllianceLevelRankItemData tplId is null");
            }

            m_Parm      = EB.Dot.String("l", data, "");
            m_PeopleNum = EB.Dot.Integer("pm", data, 0);
        }
示例#19
0
 private int Qualify()
 {
     if (CurrentTabValue == LTLegionWarTabValue.Qualify)
     {
         return(9);
     }
     else if (CurrentTabValue == LTLegionWarTabValue.Semifinal)
     {
         List <LegionRankData> SemiFinalLegions = LTLegionWarManager.Instance.SemiOrFinalLegionList.SemiLegionRankList;
         for (int i = 0; i < SemiFinalLegions.Count; i++)
         {
             if (SemiFinalLegions[i] != null && LegionModel.GetInstance().legionData.legionID == SemiFinalLegions[i].id)
             {
                 return(i);
             }
         }
     }
     else if (CurrentTabValue == LTLegionWarTabValue.Final)
     {
         List <LegionRankData> FinalLegions = new List <LegionRankData>();
         var dataList = LTLegionWarManager.Instance.SemiOrFinalLegionList.SemiLegionRankList;
         for (var i = 0; i < dataList.Count; i++)
         {
             var Data = dataList[i];
             if (Data != null && Data.enter)
             {
                 FinalLegions.Add(LTLegionWarManager.Instance.SemiOrFinalLegionList.Find(Data.id));
             }
             ;
         }
         for (int i = 0; i < FinalLegions.Count; i++)
         {
             if (LegionModel.GetInstance().legionData.legionID == FinalLegions[i].id)
             {
                 return(i + 4);
             }
         }
     }
     return(99);
 }
示例#20
0
        /* public void OnOpenQualifyWar() {
         *   LTLegionWarManager.Instance.OnOpenQualifyWar();
         * }
         *
         * public void OnCloseLegionWar()
         * {
         *   LTLegionWarManager.Instance.CloseAllianceWar();
         *   MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_MainMenuButton_725"));
         * }*/

        public void LegionWar()
        {
            InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 0.5f);
            if (LegionModel.GetInstance().isJoinedLegion)
            {
                GlobalMenuManager.Instance.Open("LTLegionWarJoinView");
            }
            else
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.MessageDialogue_2, EB.Localizer.GetString("ID_codefont_in_FuncTemplateManager_5098"), delegate(int r)
                {
                    if (r == 0)
                    {
                        GlobalMenuManager.Instance.Open("LTSearchJTMenu");
                        if ((LegionModel.GetInstance().searchItemDatas == null || LegionModel.GetInstance().searchItemDatas.Length == 0) || Time.unscaledTime - LegionModel.GetInstance().searchListTime > 10)  //无军团列表数据或最近一次不是自动搜索或拉取数据超过CD10秒
                        {
                            LegionModel.GetInstance().searchListTime = Time.unscaledTime;
                            AlliancesManager.Instance.RequestAllianceList();
                        }
                    }
                });
            }
        }
示例#21
0
        //点击立马交互处理函数
        private void OnImmediatelyIntactFunc(GameObject player, GameObject interactable)
        {
            //if (SceneLogicManager.isCampaign())return;
            //在这里区分 玩家之间交互, 玩家与NPC之间的交互
            if (interactable == null)//点击地面
            {
                FusionAudio.PostEvent("UI/MainView/ShowSelfSelection", true);
            }
            else if (interactable.GetComponent <PlayerController>() != null)
            {
                FusionAudio.PostEvent("UI/MainView/ShowSelfSelection", true);
                if (interactable != null)
                {
                    //目标可被点击
                    long   uid = interactable.GetComponent <PlayerController>().playerUid;
                    string playerName;

                    if (GetIsTargetInFightState(uid) || GetIsTargetInDartState(uid))
                    {
                        //目标是否处于战斗等不可交互状态
                        MessageTemplateManager.ShowMessage(902069);
                        return;
                    }
                    else if (GetIsRedName(uid.ToString(), out playerName))
                    {
                        //目标是否是可被攻击的(红名玩家)
                        if (BalanceResourceUtil.GetUserLevel() < AlliancesManager.Instance.DartConfig.AttackRedNameLevelLimit)
                        {
                            //目标当前等级过高不可被攻击
                            Hashtable h = Johny.HashtablePool.Claim();
                            h.Add("0", AlliancesManager.Instance.DartConfig.AttackRedNameLevelLimit);
                            MessageTemplateManager.ShowMessage(902096, h, null);
                        }
                        else
                        {
                            //目标可被攻击
                            int aid = 0;
                            DataLookupsCache.Instance.SearchIntByID("mainlands.pl." + uid + ".aid", out aid);
                            if (aid > 0 && AllianceUtil.GetIsInAlliance(uid))
                            {
                                //不可攻击同军团玩家
                                MessageTemplateManager.ShowMessage(902095);
                            }
                            else
                            {
                                //是否要发起攻击
                                MessageTemplateManager.ShowMessage(902058, playerName, delegate(int result)
                                {
                                    if (result == 0)
                                    {
                                        if (!LegionModel.GetInstance().isJoinedLegion)
                                        {
                                            MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, string.Format(EB.Localizer.GetString("ID_NOT_JOIN_ALLIANCE")));
                                            return;
                                        }
                                        string pn;
                                        if (GetIsRedName(AllianceUtil.GetLocalUid().ToString(), out pn))
                                        {
                                            MessageTemplateManager.ShowMessage(902103);
                                        }
                                        else
                                        {
                                            AlliancesManager.Instance.AttackRedName(uid);
                                        }
                                    }
                                });
                            }
                        }
                        return;
                    }
                    DataLookupsCache.Instance.SetCache("intact.player", uid, true);

                    if (UIStack.Instance.GetBackStackCount() > 1)
                    {
                        EB.Debug.LogWarning("Don't Open OtherPlayerInfoView");
                        EB.Debug.Log(UIStack.Instance.GetBackStackItem());
                        return;
                    }
                    EB.Debug.Log(UIStack.Instance.GetBackStackItem());
                    GlobalMenuManager.Instance.Open("OtherPlayerInfoView");

                    //if (null != PlayerIntactUI.Instance)
                    //	PlayerIntactUI.Instance.Uid = uid;
                }
            }
            else
            {
                if (IsGhost(interactable))
                {
                    FusionAudio.PostEvent("SFX_CombatView_BattleStart");
                }
            }
        }
示例#22
0
        public void OnEnterBtnClick()
        {
            FusionAudio.PostEvent("UI/General/ButtonClick");
            if (!(LTLegionWarManager.Instance.serveCurState > 0 && LTLegionWarManager.Instance.serveCurState < 4))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_NOT_IN_ACTIVITY_TIME"));
                return;
            }
            if (!LegionModel.GetInstance().isJoinedLegion)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTLegionWarJoinController_13125"));
                return;
            }

            LTLegionWarFinalController.Legions = new List <LegionRankData> {
                new LegionRankData(), new LegionRankData()
            };
            int qualify = Qualify();

            if (qualify < 9 && LadderManager.Instance.Info.Rank == 0)
            {
                LadderManager.Instance.GetInfo();
            }
            switch (qualify)
            {
            case 0:
            {        //0-3,玩家有半决赛资格
                LTLegionWarFinalController.Legions[0]      = SemiFinalCellList[0].item;
                LTLegionWarFinalController.Legions[1]      = SemiFinalCellList[1].item;
                LTLegionWarManager.Instance.SemiFinalField = 0;
                GlobalMenuManager.Instance.Open("LTLegionWarFinalView");
            }; break;

            case 1:
            {
                LTLegionWarFinalController.Legions[0]      = SemiFinalCellList[2].item;
                LTLegionWarFinalController.Legions[1]      = SemiFinalCellList[3].item;
                LTLegionWarManager.Instance.SemiFinalField = 1;
                GlobalMenuManager.Instance.Open("LTLegionWarFinalView");
            }; break;

            case 2:
            {
                LTLegionWarFinalController.Legions[0]      = SemiFinalCellList[3].item;
                LTLegionWarFinalController.Legions[1]      = SemiFinalCellList[2].item;
                LTLegionWarManager.Instance.SemiFinalField = 1;
                GlobalMenuManager.Instance.Open("LTLegionWarFinalView");
            }; break;

            case 3:
            {
                LTLegionWarFinalController.Legions[0]      = SemiFinalCellList[1].item;
                LTLegionWarFinalController.Legions[1]      = SemiFinalCellList[0].item;
                LTLegionWarManager.Instance.SemiFinalField = 0;
                GlobalMenuManager.Instance.Open("LTLegionWarFinalView");
            }; break;

            case 4:
            {        //4-5,玩家有决赛资格
                LTLegionWarFinalController.Legions[0]      = FinalCellList[0].item;
                LTLegionWarFinalController.Legions[1]      = FinalCellList[1].item;
                LTLegionWarManager.Instance.SemiFinalField = 0;
                GlobalMenuManager.Instance.Open("LTLegionWarFinalView");
            }; break;

            case 5:
            {
                LTLegionWarFinalController.Legions[0]      = FinalCellList[1].item;
                LTLegionWarFinalController.Legions[1]      = FinalCellList[0].item;
                LTLegionWarManager.Instance.SemiFinalField = 0;
                GlobalMenuManager.Instance.Open("LTLegionWarFinalView");
            }; break;

            case 9:
            {        //预赛资格
                GlobalMenuManager.Instance.Open("LTLegionWarQualifyView");
            }; break;

            case 99:
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LTLegionWarJoinController_17668"));
                EB.Debug.Log(EB.Localizer.GetString("ID_codefont_in_LTLegionWarJoinController_17722"));
            }; break;

            default:
            {
                EB.Debug.LogError(EB.Localizer.GetString("ID_codefont_in_LTLegionWarJoinController_17821"));
            }; break;
            }
            ;
        }
示例#23
0
        private void SetBoss(int index, bool updateInfo)
        {
            index         = index % Hotfix_LT.Data.AllianceTemplateManager.Instance.mFBBossList.Count;
            m_CurrentBoss = Hotfix_LT.Data.AllianceTemplateManager.Instance.mFBBossList[index];
            SetBoss(m_CurrentBoss);
            //将左右按钮隐藏及打开设置
            bool leftBtnVisible  = index != 0;
            bool rightBtnVisible = index != Hotfix_LT.Data.AllianceTemplateManager.Instance.mFBBossList.Count - 1;

            v_LeftBossBtn.SetActive(leftBtnVisible);
            v_RightBossBtn.SetActive(rightBtnVisible);

            //刷新排行榜
            v_RankController.F_UpdateBossRank(m_CurrentBoss.monsterId);
            int current = LegionModel.GetInstance().legionData.todayExp;

            if (updateInfo)
            {
                //获取当前BOSS的挑战次数
                LegionLogic.GetInstance().OnSendGetCurDonateInfo((Hashtable obj) =>
                {
                    DataLookupsCache.Instance.CacheData(obj);
                    Hashtable hashtable    = EB.Dot.Object("alliance", obj, null);
                    hashtable              = EB.Dot.Object("todayDonateTimes", hashtable, null);
                    m_BossChallengeNumInfo = EB.Dot.Object("boss", hashtable, null);
                    MaxBoxCount            = EB.Dot.Integer("bossBoxCount." + m_CurrentBoss.monsterId.ToString(), hashtable, -1);
                    //设置扫荡相关
                    SetBossWipeInfo(MaxBoxCount > -1);
                    int challenge = EB.Dot.Integer(m_CurrentBoss.monsterId.ToString(), m_BossChallengeNumInfo, 0);
                    if (challenge >= 0)
                    {
                        //设置当前的BOSS挑战次数
                        SetChanllengeBtnTips(m_CurrentBoss.challenge - challenge, m_CurrentBoss.challenge);
                    }
                    LegionLogic.GetInstance().IsOpenLegionFB();
                    SetBossRedPoint(v_LeftBossRes, index - 1, current, leftBtnVisible);
                    SetBossRedPoint(v_RightBossRes, index + 1, current, rightBtnVisible);
                });
            }
            else
            {
                int challenge = EB.Dot.Integer(m_CurrentBoss.monsterId.ToString(), m_BossChallengeNumInfo, 0);
                //设置扫荡相关
                SetBossWipeInfo(DataLookupsCache.Instance.SearchDataByID <int>("alliance.todayDonateTimes.bossBoxCount." + m_CurrentBoss.monsterId.ToString(), out MaxBoxCount));
                if (challenge >= 0)
                {
                    //设置当前的BOSS挑战次数
                    SetChanllengeBtnTips(m_CurrentBoss.challenge - challenge, m_CurrentBoss.challenge);
                }
                //判断是否需要打开相应的红点
                SetBossRedPoint(v_LeftBossRes, index - 1, current, leftBtnVisible);
                SetBossRedPoint(v_RightBossRes, index + 1, current, rightBtnVisible);
            }

            //处理进度条的情况
            int total = m_CurrentBoss.donate;

            v_ChallengeBtn.SetActive(!(current < total));
            v_ProgressPanel.SetActive(current < total);
            SetProgressPanel(current, total);
        }
示例#24
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;
            }
        }
示例#25
0
 private void OnLegionIconEditFunc(int iconId)
 {
     iconID            = iconId;
     Icon.spriteName   = LegionModel.GetInstance().dicLegionSpriteName[iconID % 100];
     IconBG.spriteName = LegionModel.GetInstance().dicLegionBGSpriteName[iconID / 100];
 }
示例#26
0
 public void ReqMercenaryReward(Action <Hashtable> dataHandler)
 {
     EB.Sparx.Request request = endPoint.Post("/alliances/getHireReward");
     request.AddData("aid", LegionModel.GetInstance().legionData.legionID);
     BlockService(request, dataHandler);
 }