Ejemplo n.º 1
0
    public void UpdateItem(GengXinYouLi data)
    {
        if (!this.m_bInited)
        {
            base.AwakeBase(BindingContext.BindingContextMode.MonoBinding, false);
        }
        this.Data = data;
        if (this.Data == null || this.Data.ItemId.get_Count() != this.Data.ItemNum.get_Count())
        {
            Debug.Log("<color=red>Error:</color>[有礼更新]GengXinYouLi配置数据异常");
            return;
        }
        this.mLastPack = DataReader <ResourceSplit> .Get(this.Data.FinishPar - 1);

        if (this.mLastPack == null)
        {
            Debug.Log("<color=red>Error:</color>[有礼更新]ResourceSplit配置数据异常");
            return;
        }
        this.Pack = DataReader <ResourceSplit> .Get(this.Data.FinishPar);

        if (this.Pack == null)
        {
            Debug.Log("<color=red>Error:</color>[有礼更新]ResourceSplit配置数据异常");
            return;
        }
        UIHelper.GetText(base.get_transform(), "txTitle").set_text(string.Format(GameDataUtils.GetChineseContent(513143, false), OperateActivityManager.Instance.SwitchChineseNumber(this.mLastPack.ID)));
        UIHelper.GetText(base.get_transform(), "txMaxLv").set_text(string.Format(GameDataUtils.GetChineseContent(513144, false), this.mLastPack.LvLimit));
        using (List <UpdateAcInfo> .Enumerator enumerator = OperateActivityManager.Instance.LocalUpdateGiftInfos.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                UpdateAcInfo current = enumerator.get_Current();
                if (current.acId == this.Data.Id)
                {
                    this.IsOnlyLocalDownload = (current.status != UpdateAcInfo.AcStep.STEP.Ready && this.Data.FinishPar > OperateActivityManager.Instance.CurrentVersion);
                    break;
                }
            }
        }
        this.Status = UpdateAcInfo.AcStep.STEP.Ready;
        this.Size   = this.Pack.SizeMbit;
    }
Ejemplo n.º 2
0
    public void UpdatePassiveSkillItem(ArtifactSkill artifactSkillCfg)
    {
        this.artifactSkillCfgData = artifactSkillCfg;
        if (artifactSkillCfg == null)
        {
            return;
        }
        if (!this.isInit)
        {
            this.InitUI();
        }
        this.skillID = artifactSkillCfg.id;
        ResourceManager.SetSprite(this.m_skillIcon, GameDataUtils.GetIcon(artifactSkillCfg.icon));
        bool flag = SkillUIManager.Instance.CheckArtifactSkillIsUnlock(this.skillID);

        this.m_goFrameMaskObj.SetActive(!flag);
        this.m_skillLvText.set_text(GameDataUtils.GetChineseContent(this.artifactSkillCfgData.name, false));
        this.Selected = false;
    }
Ejemplo n.º 3
0
    public static string SwitchChineseNumber(long number, int type = 0)
    {
        string text = number.ToString();

        if (type == 1 && text.get_Length() > 16)
        {
            return(Utils.FloorNumber(text, 16, GameDataUtils.GetChineseContent(330027, false) + GameDataUtils.GetChineseContent(330027, false)));
        }
        if (type == 1 && text.get_Length() > 15)
        {
            return(Utils.FloorNumber(text, 15, GameDataUtils.GetChineseContent(330030, false) + GameDataUtils.GetChineseContent(330028, false) + GameDataUtils.GetChineseContent(330027, false)));
        }
        if (text.get_Length() > 12)
        {
            return(Utils.FloorNumber(text, 12, GameDataUtils.GetChineseContent(330028, false) + GameDataUtils.GetChineseContent(330027, false)));
        }
        if (type == 1 && text.get_Length() > 11)
        {
            return(Utils.FloorNumber(text, 11, GameDataUtils.GetChineseContent(330030, false) + GameDataUtils.GetChineseContent(330027, false)));
        }
        if (text.get_Length() > 8)
        {
            return(Utils.FloorNumber(text, 8, GameDataUtils.GetChineseContent(330027, false)));
        }
        if (type == 1 && text.get_Length() > 7)
        {
            return(Utils.FloorNumber(text, 7, GameDataUtils.GetChineseContent(330030, false) + GameDataUtils.GetChineseContent(330028, false)));
        }
        if (type == 0 && text.get_Length() > 5)
        {
            return(Utils.FloorNumber(text, 4, GameDataUtils.GetChineseContent(330028, false)));
        }
        if (type == 1 && text.get_Length() > 4)
        {
            return(Utils.FloorNumber(text, 4, GameDataUtils.GetChineseContent(330028, false)));
        }
        if (type == 1 && text.get_Length() > 3)
        {
            return(Utils.FloorNumber(text, 3, GameDataUtils.GetChineseContent(330030, false)));
        }
        return(text);
    }
Ejemplo n.º 4
0
    private void RefreshSelectSkillDesc(int skillID)
    {
        Skill skill = DataReader <Skill> .Get(skillID);

        if (skill == null)
        {
            return;
        }
        this.skillNameText.set_text(GameDataUtils.GetChineseContent(skill.name, false));
        this.skillDescText.set_text(GameDataUtils.GetChineseContent(skill.describeId, false));
        this.skillCdText.set_text(string.Format("冷却时间:<color=red>{0}秒</color>", (float)skill.cd * 0.001f));
        JiNengShengJiBiao skillUpgradeCfgDataByID = SkillUIManager.Instance.GetSkillUpgradeCfgDataByID(skillID);

        if (skillUpgradeCfgDataByID != null)
        {
            this.skillBasicDamageText.set_text(string.Format("基础伤害:<color=#ff7d4b>{0:P1}</color>", skillUpgradeCfgDataByID.skillDate1));
        }
        bool flag = SkillUIManager.Instance.CheckSkillIsUnLock(skillID);

        base.FindTransform("SkillUnLockImg").get_gameObject().SetActive(!flag);
        bool flag2 = SkillUIManager.Instance.CheckSkillIsCanUpgrade(skillID);

        base.FindTransform("SkillLvFullImg").get_gameObject().SetActive(!flag2 && flag);
        bool flag3 = EntityWorld.Instance.EntSelf.Lv >= SkillUIManager.Instance.SkillCanUpLevel;

        base.FindTransform("SkillCanNotUp").get_gameObject().SetActive(flag && !flag3);
        if (flag && flag2 && flag3)
        {
            this.SetSkillUpgradeBtnState(true);
            base.FindTransform("SkillUpItemInfo").get_gameObject().SetActive(true);
            JiNengShengJiBiao skillNextLvCfgDataByID = SkillUIManager.Instance.GetSkillNextLvCfgDataByID(skillID);
            if (skillNextLvCfgDataByID != null)
            {
                this.SetSkillUpgradeItem(11, skillNextLvCfgDataByID.itemNum.get_Item(0));
            }
        }
        else
        {
            this.SetSkillUpgradeBtnState(false);
            base.FindTransform("SkillUpItemInfo").get_gameObject().SetActive(false);
        }
    }
Ejemplo n.º 5
0
    private void InitExpirePanel(bool isMyOwnVip = false)
    {
        List <int> list = null;

        if (isMyOwnVip)
        {
            VipDengJi vipDengJi = DataReader <VipDengJi> .Get(EntityWorld.Instance.EntSelf.VipLv);

            if (vipDengJi != null)
            {
                list = vipDengJi.effect;
            }
        }
        else
        {
            List <vipTiYanQia> dataList    = DataReader <vipTiYanQia> .DataList;
            vipTiYanQia        vipTiYanQia = dataList.get_Item(0);
            if (dataList != null)
            {
                list = vipTiYanQia.effect;
            }
        }
        string empty = string.Empty;
        int    num   = -1;

        this.ClearExpireScroll();
        for (int i = 0; i < list.get_Count(); i++)
        {
            int        key        = list.get_Item(i);
            VipXiaoGuo vipXiaoGuo = DataReader <VipXiaoGuo> .Get(key);

            if (vipXiaoGuo != null)
            {
                string chineseContent = GameDataUtils.GetChineseContent(vipXiaoGuo.name, true);
                if (!string.IsNullOrEmpty(chineseContent))
                {
                    num++;
                    this.UpdateExpireCardItemInfo(num, chineseContent);
                }
            }
        }
    }
Ejemplo n.º 6
0
    public void BuyExtentTimes()
    {
        if (this.TodayRestTimes > 0)
        {
            return;
        }
        if (this.TodayExtendTimes >= this.MaxVipTimes)
        {
            DialogBoxUIViewModel.Instance.ShowAsConfirm(GameDataUtils.GetChineseContent(513531, false), GameDataUtils.GetChineseContent(513528, false), null, GameDataUtils.GetChineseContent(505114, false), "button_orange_1", null);
            return;
        }
        if (this.TodayExtendTimes >= this.MaxExtendTimes)
        {
            DialogBoxUIViewModel.Instance.ShowAsOKCancel(GameDataUtils.GetChineseContent(621264, false), GameDataUtils.GetChineseContent(505105, false), null, delegate
            {
                LinkNavigationManager.OpenVIPUI2Privilege();
            }, "取 消", "确 定", "button_orange_1", "button_yellow_1", null, true, true);
            return;
        }
        FanPaiSheZhi fanPaiSheZhi = DataReader <FanPaiSheZhi> .Get("price");

        if (fanPaiSheZhi == null || fanPaiSheZhi.date.get_Count() == 0)
        {
            return;
        }
        int num;

        if (this.TodayExtendTimes < fanPaiSheZhi.date.get_Count())
        {
            num = fanPaiSheZhi.date.get_Item(this.TodayExtendTimes);
        }
        else
        {
            num = fanPaiSheZhi.date.get_Item(fanPaiSheZhi.date.get_Count() - 1);
        }
        string content = string.Format("是否花费{0}钻石增加一次通关奖励次数", num);

        DialogBoxUIViewModel.Instance.ShowAsOKCancel("购买通关奖励次数", content, null, delegate
        {
            this.SendExtendMemoryFlopTimes();
        }, "取 消", "确 定", "button_orange_1", "button_yellow_1", null, true, true);
    }
Ejemplo n.º 7
0
 private void OnClickQuickEnterTeamBtn(GameObject go)
 {
     if (TeamBasicManager.Instance.MyTeamData != null)
     {
         return;
     }
     if (!ActivityCenterManager.Instance.CheckActivityIsOpen(10002))
     {
         string chineseContent = GameDataUtils.GetChineseContent(513526, false);
         UIManagerControl.Instance.ShowToastText(chineseContent);
         return;
     }
     if (MultiPlayerManager.Instance.remainChallengeTimes <= 0)
     {
         string text = "您的参与次数不足";
         UIManagerControl.Instance.ShowToastText(text);
         return;
     }
     MultiPlayerManager.Instance.SendDarkTrainQuickEnterReq();
 }
Ejemplo n.º 8
0
    private void OnBuyProductClicked(GameObject go)
    {
        NovicePacksPush novicePacksPush = NewPeoperGiftPackageManager.Instance.getNovicePacksPush();

        if (novicePacksPush.pack.price > EntityWorld.Instance.EntSelf.Diamond)
        {
            DialogBoxUIViewModel.Instance.ShowAsOKCancel(GameDataUtils.GetChineseContent(510106, false), GameDataUtils.GetChineseContent(510107, false), delegate
            {
            }, delegate
            {
                this.OnClickMaskAction();
                LinkNavigationManager.OpenVIPUI2Recharge();
            }, GameDataUtils.GetChineseContent(505113, false), GameDataUtils.GetChineseContent(505114, false), "button_orange_1", "button_yellow_1", null, true, true);
        }
        else
        {
            base.FindTransform("ButtonBuyPro").GetComponent <ButtonCustom>().set_enabled(false);
            NewPeoperGiftPackageManager.Instance.sendBuyDiscountItemReq();
        }
    }
Ejemplo n.º 9
0
    private string NumChange(int types, int values)
    {
        if (types != 0)
        {
            return(Math.Round((double)values / 10.0, 1).ToString("F1") + "%");
        }
        long num = 0L;

        if ((double)values < 10000.0)
        {
            return(values.ToString());
        }
        double num2 = (double)values / 10000.0;

        if (long.TryParse(num2.ToString(), ref num))
        {
            return(string.Format(GameDataUtils.GetChineseContent(14, false), num.ToString()));
        }
        return(string.Format(GameDataUtils.GetChineseContent(14, false), Math.Round(num2, 2).ToString("F2")));
    }
Ejemplo n.º 10
0
    public void NotificationOffline(int seconds)
    {
        int num = 1;

        if (!this.IsLocalPushOn(num))
        {
            return;
        }
        if (!this.IsSystemOn(num))
        {
            return;
        }
        Debug.Log("[离线挂机], seconds = " + seconds);
        TuiSongTongZhi tuiSongTongZhi = DataReader <TuiSongTongZhi> .Get(num);

        if (tuiSongTongZhi != null)
        {
            NativeCallManager.NotificationMessage(tuiSongTongZhi.id, GameDataUtils.GetChineseContent(tuiSongTongZhi.detail, false), DateTime.get_Now().AddSeconds((double)seconds), NotificationRepeatInterval.None);
        }
    }
Ejemplo n.º 11
0
 private bool OnClickCity(HuntMapItem item)
 {
     if (item.CurState == HuntMapItem.State.OPEN)
     {
         HuntUI.LastSelectMapId = item.Id;
         this.SelectMapItem(item);
         this.RefreshRightPanel();
         this.RefreshLeftPanel((GuaJiDiTuPeiZhi)item.Data);
         return(true);
     }
     if (item.CurState == HuntMapItem.State.LOW)
     {
         UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(511618, false));
     }
     else if (item.CurState == HuntMapItem.State.HIGH)
     {
         UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(511617, false));
     }
     return(false);
 }
Ejemplo n.º 12
0
    private void BuyBox()
    {
        RechargeGoodsInfo rechargeGoodsInfo = RechargeManager.Instance.GetRechargeGoodsInfo(this.ID);

        if (rechargeGoodsInfo != null)
        {
            int todayRechargeCount = RechargeManager.Instance.GetTodayRechargeCount(this.ID);
            if (todayRechargeCount > 0)
            {
                UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(517002, false));
                return;
            }
            Dict     dict     = rechargeGoodsInfo.dropID.get_Item(0);
            BoxBuyUI boxBuyUI = UIManagerControl.Instance.OpenUI("BoxBuyUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush) as BoxBuyUI;
            boxBuyUI.SetShowItem(dict.key, delegate
            {
                RechargeManager.Instance.ExecutionToRechargeDiamond(this.ID);
            });
        }
    }
Ejemplo n.º 13
0
 public void RefreshUI()
 {
     BountyProductionItem[] productionItems = this.ProductionItems;
     for (int i = 0; i < productionItems.Length; i++)
     {
         BountyProductionItem bountyProductionItem = productionItems[i];
         bountyProductionItem.get_gameObject().SetActive(false);
     }
     for (int j = 0; j < BountyManager.Instance.Info.productions.get_Count(); j++)
     {
         ProductionInfo info = BountyManager.Instance.Info.productions.get_Item(j);
         this.ProductionItems[j].get_gameObject().SetActive(true);
         this.ProductionItems[j].GetComponent <BountyProductionItem>().UpdateData(info);
     }
     this.Score.set_text(string.Format(GameDataUtils.GetChineseContent(513631, false), BountyManager.Instance.Info.score.ToString()));
     this.detailDaily.UpdateUI();
     this.detailUrgent.UpdateUI();
     this.OnClickTagButton();
     this.OnSecondsPast();
 }
Ejemplo n.º 14
0
 private void OnDrawAllMailAttachRes(short state, DrawAllMailAttachRes down = null)
 {
     if (state != 0 || down == null)
     {
         StateManager.Instance.StateShow(state, 0);
         return;
     }
     if (down.itemIds.get_Count() > 0)
     {
         UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(502086, false));
     }
     for (int i = 0; i < down.mailIds.get_Count(); i++)
     {
         this.RemoveOne2Mails(down.mailIds.get_Item(i));
     }
     if (MailUIViewModel.Instance != null && MailUIViewModel.Instance.get_enabled())
     {
         MailUIViewModel.Instance.ShowAs(MailUIViewModel.MailUIStatus.list, true);
     }
 }
Ejemplo n.º 15
0
 private void OnClickOK(GameObject go)
 {
     this.selectProductLogic();
     if (ActivityTossDiscountManager.Instance.isHaveCurrentShangPinId())
     {
         this.Show(false);
         UIStackManager.Instance.PopUIPrevious(base.uiType);
         if (ActivityTossDiscountUI.Instance != null)
         {
             ActivityTossDiscountUI.Instance.confirmSelectPro(go);
         }
     }
     else
     {
         DialogBoxUIViewModel.Instance.ShowAsConfirm(GameDataUtils.GetChineseContent(1005022, false), "您没有选中商品!", delegate
         {
             InstanceManager.TryPause();
         }, GameDataUtils.GetNoticeText(102), "button_orange_1", null);
     }
 }
Ejemplo n.º 16
0
    private void DoSubtile(JuQingShiJian plotInfo)
    {
        List <string> list = new List <string>();

        using (List <int> .Enumerator enumerator = plotInfo.word.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                int current = enumerator.get_Current();
                list.Add(GameDataUtils.GetChineseContent(current, false));
            }
        }
        base.get_gameObject().GetComponent <CameraPathAnimator>().Pause();
        SubtitlesUI subtitlesUI = UIManagerControl.Instance.OpenUI("SubtitlesUI", null, false, UIType.NonPush) as SubtitlesUI;

        subtitlesUI.Init(list, delegate
        {
            base.get_gameObject().GetComponent <CameraPathAnimator>().Play();
        });
    }
Ejemplo n.º 17
0
    protected void UpdateQueueDialog()
    {
        if (this.IsSingleBossWaiting)
        {
            if (DataReader <Monster> .Contains(this.SingleBossWaitingBossTypeID))
            {
                Monster monster = DataReader <Monster> .Get(this.SingleBossWaitingBossTypeID);

                WildBossWaitingUI wildBossWaitingUI = UIManagerControl.Instance.OpenUI("WildBossWaitingUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush) as WildBossWaitingUI;
                wildBossWaitingUI.SetData(monster.icon2, GameDataUtils.GetChineseContent(monster.name, false), this.SingleBossWaitingBossRank, (this.BossHpLmt != 0L) ? ((float)((double)this.BossCurHp / (double)this.BossHpLmt)) : 1f, this.wildBossUICurrentDataList, this.wildBossUIWaitingDataList, this.selfWaitingData);
            }
        }
        else if (this.IsMultiBossWaiting && DataReader <Monster> .Contains(this.MultiBossWaitingBossTypeID))
        {
            Monster monster2 = DataReader <Monster> .Get(this.MultiBossWaitingBossTypeID);

            WildBossWaitingUI wildBossWaitingUI2 = UIManagerControl.Instance.OpenUI("WildBossWaitingUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush) as WildBossWaitingUI;
            wildBossWaitingUI2.SetData(monster2.icon2, GameDataUtils.GetChineseContent(monster2.name, false), this.MultiBossWaitingBossRank, (this.BossHpLmt != 0L) ? ((float)((double)this.BossCurHp / (double)this.BossHpLmt)) : 1f, this.wildBossUICurrentDataList, this.wildBossUIWaitingDataList, this.selfWaitingData);
        }
    }
Ejemplo n.º 18
0
 private void selectProductLogic()
 {
     ActivityTossDiscountManager.Instance.CurrentShangPinId = ActivityTossDiscountManager.Instance.TempSelectProductId;
     ActivityTossDiscountManager.Instance.setIsSelectItemById(ActivityTossDiscountManager.Instance.CurrentShangPinId);
     if (ActivityTossDiscountManager.Instance.IsAlreadyConfirm)
     {
         DialogBoxUIViewModel.Instance.ShowAsConfirm(GameDataUtils.GetChineseContent(1005022, false), "已经选中过了商品,请先更换!", delegate
         {
             InstanceManager.TryPause();
         }, GameDataUtils.GetNoticeText(102), "button_orange_1", null);
         return;
     }
     if (ActivityTossDiscountUI.Instance != null)
     {
         ActivityTossDiscountUI.Instance.updateItemLogoByItemId(true, -1);
         ActivityTossDiscountUI.Instance.RefreshUI();
     }
     this.updateItemLogoByItemId(true, -1);
     this.RefreshUI();
 }
Ejemplo n.º 19
0
 public void BeginMemoryFlop()
 {
     if (this.IsLockBeginMemoryFlop)
     {
         UIManagerControl.Instance.ShowToastText("请等待服务器返回奖励");
         return;
     }
     if (this.TodayRestTimes > 0)
     {
         this.SendBeginMemoryFlop();
     }
     else if (!this.IsTodayRestBuyTimesOn())
     {
         UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(500119, false));
     }
     else
     {
         this.BuyExtentTimes();
     }
 }
Ejemplo n.º 20
0
 protected void OnClickBtnExit(GameObject go)
 {
     if (this.status == MushroomHitStatus.Ready || this.status == MushroomHitStatus.Start)
     {
         this.GoPause();
         UIManagerControl.Instance.OpenUI("DialogBoxUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
         DialogBoxUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(621264, false), GameDataUtils.GetChineseContent(340022, false), null, delegate
         {
             this.ReStart();
         }, delegate
         {
             this.GoEnd();
         }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null);
     }
     else
     {
         this.Show(false);
         UIStackManager.Instance.PopUIPrevious(base.uiType);
     }
 }
Ejemplo n.º 21
0
    private string GetElementTypeTextFromID(int id)
    {
        switch (id)
        {
        case 1:
            return(GameDataUtils.GetChineseContent(505054, false));

        case 2:
            return(GameDataUtils.GetChineseContent(505055, false));

        case 3:
            return(GameDataUtils.GetChineseContent(505056, false));

        case 4:
            return(GameDataUtils.GetChineseContent(505057, false));

        default:
            return(GameDataUtils.GetChineseContent(505054, false));
        }
    }
Ejemplo n.º 22
0
 protected override void InitUI()
 {
     base.InitUI();
     this.Mode1Tips     = base.FindTransform("Tips1").get_gameObject();
     this.Mode2Tips     = base.FindTransform("Tips2").get_gameObject();
     this.Mode3Tips     = base.FindTransform("Tips3").get_gameObject();
     this.Mode2Time     = base.FindTransform("Time2").GetComponent <Text>();
     this.Mode3Time     = base.FindTransform("Time3").GetComponent <Text>();
     this.FreeDraw2     = base.FindTransform("FreeDrawText2").GetComponent <Text>();
     this.FreeDraw3     = base.FindTransform("FreeDrawText3").GetComponent <Text>();
     this.freeDrawDesc  = GameDataUtils.GetChineseContent(621073, false);
     this.LuckyButton1  = base.FindTransform("LuckyButton1").GetComponent <ButtonCustom>();
     this.LuckyButton10 = base.FindTransform("LuckyButton10").GetComponent <ButtonCustom>();
     this.LuckyButton1.onClickCustom  = new ButtonCustom.VoidDelegateObj(this.OnClickOne);
     this.LuckyButton10.onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickTen);
     this.LuckyNum1       = base.FindTransform("ButtonArea1Num").GetComponent <Text>();
     this.LuckyNum10      = base.FindTransform("ButtonArea10Num").GetComponent <Text>();
     this.LuckyItemIcon1  = base.FindTransform("ButtonArea1Icon").GetComponent <Image>();
     this.LuckyItemIcon10 = base.FindTransform("ButtonArea10Icon").GetComponent <Image>();
 }
Ejemplo n.º 23
0
 public void OnClickExecutTask(GameObject go)
 {
     if (InstanceManagerUI.IsPetLimit())
     {
         return;
     }
     if (!BackpackManager.Instance.ShowBackpackFull())
     {
         if (BountyManager.Instance.isSelectDaily)
         {
             if (BountyManager.Instance.Info.productions.get_Count() >= 4)
             {
                 DialogBoxUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(513640, false), GameDataUtils.GetChineseContent(513641, false), null, null, delegate
                 {
                     NetworkManager.Send(new BountyAcceptTaskReq
                     {
                         taskId = BountyManager.Instance.Info.taskId
                     }, ServerType.Data);
                 }, GameDataUtils.GetChineseContent(500012, false), GameDataUtils.GetChineseContent(500011, false), "button_orange_1", "button_yellow_1", null);
             }
             else
             {
                 NetworkManager.Send(new BountyAcceptTaskReq
                 {
                     taskId = BountyManager.Instance.Info.taskId
                 }, ServerType.Data);
             }
         }
         else if (BountyManager.Instance.Info.productions.get_Count() >= 4)
         {
             UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(513641, false), 1f, 2f);
         }
         else
         {
             NetworkManager.Send(new BountyAcceptTaskReq
             {
                 taskId = (!BountyManager.Instance.isSelectDaily) ? BountyManager.Instance.Info.urgentTaskId : BountyManager.Instance.Info.taskId
             }, ServerType.Data);
         }
     }
 }
Ejemplo n.º 24
0
    protected override void SetOneSkill(int cellIndex, int talentId, int talentLv, int nextTalentLv)
    {
        Transform    child      = base.get_transform().GetChild(cellIndex);
        Text         component  = child.FindChild("texName").GetComponent <Text>();
        Text         component2 = child.FindChild("texLv").GetComponent <Text>();
        Text         component3 = child.FindChild("texNeedLv").GetComponent <Text>();
        Text         component4 = child.FindChild("texDesc").GetComponent <Text>();
        Image        component5 = child.FindChild("imgNatural").GetComponent <Image>();
        Image        component6 = child.FindChild("imgMaterial").GetComponent <Image>();
        Text         component7 = child.FindChild("texMaterial").GetComponent <Text>();
        ButtonCustom component8 = child.FindChild("btnLvUp").GetComponent <ButtonCustom>();
        string       desc       = PetEvoGlobal.GetDesc(talentId);

        if (PetEvoGlobal.IsEnoughStar(PetBasicUIViewModel.PetID, talentId))
        {
            component.set_text(PetEvoGlobal.GetName(talentId));
            component4.set_text(desc);
            component4.set_color(new Color32(165, 90, 65, 255));
            ImageColorMgr.SetImageColor(component5, false);
        }
        else
        {
            string        text          = string.Empty;
            int           requireStar   = PetEvoGlobal.GetRequireStar(PetBasicUIViewModel.PetID, talentId);
            PetConversion petConversion = DataReader <PetConversion> .Get(requireStar);

            if (petConversion != null)
            {
                text = string.Format(GameDataUtils.GetChineseContent(400018, false), petConversion.tianfuSuffix);
                component.set_text(PetEvoGlobal.GetName(talentId) + text);
            }
            component4.set_text(TextColorMgr.FilterColor(desc));
            component4.set_color(Color.get_gray());
            ImageColorMgr.SetImageColor(component5, true);
        }
        component3.get_gameObject().SetActive(false);
        component2.get_gameObject().SetActive(false);
        component8.get_gameObject().SetActive(false);
        component6.get_gameObject().SetActive(false);
        component7.get_gameObject().SetActive(false);
    }
Ejemplo n.º 25
0
    private void OnClickOk(GameObject go)
    {
        if (this.selectGoods == null || this.selectGoods.get_Count() <= 0)
        {
            this.Show(false);
            return;
        }
        int num = 0;

        if (GuildStorageManager.Instance.GuildStorageInfo != null && GuildStorageManager.Instance.GuildStorageInfo.baseInfo != null)
        {
            num = GuildStorageManager.Instance.GuildStorageInfo.baseInfo.capacity - GuildStorageManager.Instance.GuildStorageInfo.baseInfo.size;
        }
        if (this.selectGoods.get_Count() > num)
        {
            UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(621608, false));
            return;
        }
        List <int>            list     = new List <int>();
        List <EquipBriefInfo> m_equips = new List <EquipBriefInfo>();

        for (int i = 0; i < this.selectGoods.get_Count(); i++)
        {
            EquipBriefInfo equipBriefInfo = new EquipBriefInfo();
            equipBriefInfo.equipId = this.selectGoods.get_Item(i).GetLongId();
            if (DataReader <zZhuangBeiPeiZhiBiao> .Contains(this.selectGoods.get_Item(i).GetItemId()))
            {
                equipBriefInfo.position = DataReader <zZhuangBeiPeiZhiBiao> .Get(this.selectGoods.get_Item(i).GetItemId()).position;
            }
            list.Add(this.selectGoods.get_Item(i).GetItemId());
            m_equips.Add(equipBriefInfo);
        }
        int    equipsTotalPoint = GuildStorageManager.Instance.GetEquipsTotalPoint(list, true);
        string content          = string.Format(GameDataUtils.GetChineseContent(621602, false), equipsTotalPoint);

        DialogBoxUIViewModel.Instance.ShowAsOKCancel(GameDataUtils.GetChineseContent(621264, false), content, null, delegate
        {
            GuildStorageManager.Instance.SendGuildStorageDonateEquipReq(m_equips);
            this.Show(false);
        }, "取 消", "确 定", "button_orange_1", "button_yellow_1", null, true, true);
    }
Ejemplo n.º 26
0
    protected override void InitUI()
    {
        base.InitUI();
        string chineseContent  = GameDataUtils.GetChineseContent(513517, false);
        string chineseContent2 = GameDataUtils.GetChineseContent(513516, false);

        string[] theWeekText = new string[]
        {
            string.Empty,
            GameDataUtils.GetChineseContent(513519, false),
            GameDataUtils.GetChineseContent(513520, false),
            GameDataUtils.GetChineseContent(513521, false),
            GameDataUtils.GetChineseContent(513522, false),
            GameDataUtils.GetChineseContent(513523, false),
            GameDataUtils.GetChineseContent(513524, false),
            GameDataUtils.GetChineseContent(513525, false)
        };
        SpecialInstanceItem component = base.FindTransform("Guard").GetComponent <SpecialInstanceItem>();

        component.Init(SpecialFightMode.Hold, new Action <SpecialFightMode>(this.OnClickEnterDetail), chineseContent, chineseContent2, theWeekText);
        this.SelectModeList.Add(component);
        SpecialInstanceItem component2 = base.FindTransform("Escort").GetComponent <SpecialInstanceItem>();

        component2.Init(SpecialFightMode.Protect, new Action <SpecialFightMode>(this.OnClickEnterDetail), chineseContent, chineseContent2, theWeekText);
        this.SelectModeList.Add(component2);
        SpecialInstanceItem component3 = base.FindTransform("Attack").GetComponent <SpecialInstanceItem>();

        component3.Init(SpecialFightMode.Save, new Action <SpecialFightMode>(this.OnClickEnterDetail), chineseContent, chineseContent2, theWeekText);
        this.SelectModeList.Add(component3);
        SpecialInstanceItem component4 = base.FindTransform("Exp").GetComponent <SpecialInstanceItem>();

        component4.Init(SpecialFightMode.Expericence, new Action <SpecialFightMode>(this.OnClickEnterDetail), chineseContent, chineseContent2, theWeekText);
        this.SelectModeList.Add(component4);
        this.Detail                = base.FindTransform("Detail").get_gameObject();
        this.ModeSelect            = base.FindTransform("ModeSelect").get_gameObject();
        this.DetailUI              = this.Detail.GetComponent <SpecialInstanceDetail>();
        this.animator              = base.GetComponent <Animator>();
        this.SpecBtn               = base.FindTransform("SpecBtn").GetComponent <ButtonCustom>();
        this.SpecBtn.onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickSpec);
        this.UpdateUI();
    }
Ejemplo n.º 27
0
    public void TryShowTimeoutRecommend()
    {
        if (this.timeoutFashionDataIDs.get_Count() == 0)
        {
            return;
        }
        if (!UIManagerControl.Instance.IsOpen("TownUI"))
        {
            return;
        }
        TownUI townUI = UIManagerControl.Instance.GetUIIfExist("TownUI") as TownUI;

        if (!townUI)
        {
            return;
        }
        string timeoutFashionDataID = this.timeoutFashionDataIDs.get_Item(0);

        this.timeoutFashionDataIDs.RemoveAt(0);
        while (!DataReader <ShiZhuangXiTong> .Contains(timeoutFashionDataID) && this.timeoutFashionDataIDs.get_Count() > 0)
        {
            timeoutFashionDataID = this.timeoutFashionDataIDs.get_Item(0);
            this.timeoutFashionDataIDs.RemoveAt(0);
        }
        if (!DataReader <ShiZhuangXiTong> .Contains(timeoutFashionDataID))
        {
            return;
        }
        ShiZhuangXiTong shiZhuangXiTong = DataReader <ShiZhuangXiTong> .Get(timeoutFashionDataID);

        if (!DataReader <Items> .Contains(shiZhuangXiTong.itemsID))
        {
            return;
        }
        Items items = DataReader <Items> .Get(shiZhuangXiTong.itemsID);

        townUI.SetFashionTimeoutRecommend(items.icon, GameDataUtils.GetChineseContent(1005022, false), GameDataUtils.GetChineseContent(1005023, false), GameDataUtils.GetChineseContent(1005024, false), delegate
        {
            FashionManager.Instance.OpenBuyFashionUI(timeoutFashionDataID);
        }, new Action(this.TryShowTimeoutRecommend));
    }
Ejemplo n.º 28
0
 private void OnGetExtraRewardRes(int state, List <ItemBriefInfo> list)
 {
     if (state >= 0)
     {
         if (state > 0 && list != null)
         {
             XDict <int, long> rewards = new XDict <int, long>();
             for (int i = 0; i < list.get_Count(); i++)
             {
                 rewards.Add(list.get_Item(i).cfgId, list.get_Item(i).count);
             }
             if (rewards.Count > 0)
             {
                 this.mFxId3 = FXSpineManager.Instance.ReplaySpine(this.mFxId3, 803, TownUI.Instance.FXNav, "TownUI", 14002, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
                 this.mFxId1 = FXSpineManager.Instance.ReplaySpine(this.mFxId1, 801, TownUI.Instance.FXNav, "TownUI", 14000, delegate
                 {
                     this.mFxId2  = FXSpineManager.Instance.ReplaySpine(this.mFxId2, 802, TownUI.Instance.FXNav, "TownUI", 14001, null, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
                     string title = "获得任务额外奖励";
                     if (MainTaskManager.Instance.LastGetExtraRewardTaskType == 8)
                     {
                         title = GameDataUtils.GetChineseContent(310047, false);
                     }
                     else if (MainTaskManager.Instance.LastGetExtraRewardTaskType == 3)
                     {
                         title = GameDataUtils.GetChineseContent(310046, false);
                     }
                     RewardUI rewardUI = LinkNavigationManager.OpenRewardUI(UINodesManager.MiddleUIRoot);
                     rewardUI.isClick  = false;
                     rewardUI.SetRewardItem(title, rewards.Keys, rewards.Values, true, false, delegate
                     {
                         FXSpineManager.Instance.DeleteSpine(this.mFxId1, true);
                         FXSpineManager.Instance.DeleteSpine(this.mFxId2, true);
                         FXSpineManager.Instance.DeleteSpine(this.mFxId3, true);
                     }, null);
                 }, "UI", 0f, 0f, 1f, 1f, false, FXMaskLayer.MaskState.None);
             }
         }
         MainTaskManager.Instance.ExtraRewardQueue.Dequeue();
         this.CheckExtraReward();
     }
 }
Ejemplo n.º 29
0
 private void Start()
 {
     this.Element1.get_transform().FindChild("TextTile").GetComponent <Text>().set_text(this.GetSubElementTypeTextFromID(1));
     this.Element2.get_transform().FindChild("TextTile").GetComponent <Text>().set_text(this.GetSubElementTypeTextFromID(2));
     this.Element3.get_transform().FindChild("TextTile").GetComponent <Text>().set_text(this.GetSubElementTypeTextFromID(3));
     this.Element4.get_transform().FindChild("TextTile").GetComponent <Text>().set_text(this.GetSubElementTypeTextFromID(4));
     this.Element5.get_transform().FindChild("TextTile").GetComponent <Text>().set_text(this.GetSubElementTypeTextFromID(5));
     this.Element6.get_transform().FindChild("TextTile").GetComponent <Text>().set_text(this.GetSubElementTypeTextFromID(6));
     this.Element1.get_transform().FindChild("TextOpen").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(505050, false));
     this.Element2.get_transform().FindChild("TextOpen").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(505050, false));
     this.Element3.get_transform().FindChild("TextOpen").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(505050, false));
     this.Element4.get_transform().FindChild("TextOpen").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(505050, false));
     this.Element5.get_transform().FindChild("TextOpen").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(505050, false));
     this.Element6.get_transform().FindChild("TextOpen").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(505050, false));
     this.BtnGround.get_transform().FindChild("TextName1").GetComponent <Text>().set_text(this.GetElementTypeTextFromID(1));
     this.BtnGround.get_transform().FindChild("TextName2").GetComponent <Text>().set_text(this.GetElementTypeTextFromID(1));
     this.BtnFire.get_transform().FindChild("TextName1").GetComponent <Text>().set_text(this.GetElementTypeTextFromID(2));
     this.BtnFire.get_transform().FindChild("TextName2").GetComponent <Text>().set_text(this.GetElementTypeTextFromID(2));
     this.BtnWater.get_transform().FindChild("TextName1").GetComponent <Text>().set_text(this.GetElementTypeTextFromID(3));
     this.BtnWater.get_transform().FindChild("TextName2").GetComponent <Text>().set_text(this.GetElementTypeTextFromID(3));
     this.BtnLighting.get_transform().FindChild("TextName1").GetComponent <Text>().set_text(this.GetElementTypeTextFromID(4));
     this.BtnLighting.get_transform().FindChild("TextName2").GetComponent <Text>().set_text(this.GetElementTypeTextFromID(4));
     this.ManagerFxidBG(this.lastType);
     this.TextUpgradeConditionTitle.set_text(GameDataUtils.GetChineseContent(505059, false));
     this.TextNowEffectTitle.set_text(GameDataUtils.GetChineseContent(505040, false));
     this.TextUpgradeEffectTitle.set_text(GameDataUtils.GetChineseContent(505041, false));
     this.TextCostTitle.set_text(GameDataUtils.GetChineseContent(505042, false));
     this.BtnUpdate.get_transform().FindChild("Text").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(505043, false));
     this.Element1.onClickCustom    = new ButtonCustom.VoidDelegateObj(this.OnClickElement1);
     this.Element2.onClickCustom    = new ButtonCustom.VoidDelegateObj(this.OnClickElement2);
     this.Element3.onClickCustom    = new ButtonCustom.VoidDelegateObj(this.OnClickElement3);
     this.Element4.onClickCustom    = new ButtonCustom.VoidDelegateObj(this.OnClickElement4);
     this.Element5.onClickCustom    = new ButtonCustom.VoidDelegateObj(this.OnClickElement5);
     this.Element6.onClickCustom    = new ButtonCustom.VoidDelegateObj(this.OnClickElement6);
     this.BtnGround.onClickCustom   = new ButtonCustom.VoidDelegateObj(this.OnClickBtn1);
     this.BtnFire.onClickCustom     = new ButtonCustom.VoidDelegateObj(this.OnClickBtn2);
     this.BtnWater.onClickCustom    = new ButtonCustom.VoidDelegateObj(this.OnClickBtn3);
     this.BtnLighting.onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickBtn4);
     this.BtnBack.onClickCustom     = new ButtonCustom.VoidDelegateObj(this.OnClickBtnBack);
     this.BtnUpdate.onClickCustom   = new ButtonCustom.VoidDelegateObj(this.OnClickBtnUpdate);
 }
Ejemplo n.º 30
0
    public void OnOffLineRes(short state, OffLineRes down = null)
    {
        if (state != 0)
        {
            if (state == 206)
            {
                Items items = DataReader <Items> .Get(down.itemId);

                if (items != null)
                {
                    UIManagerControl.Instance.ShowToastText(string.Format(GameDataUtils.GetChineseContent(509004, false), items.minLv));
                }
            }
            else
            {
                StateManager.Instance.StateShow(state, 0);
            }
            return;
        }
        if (down != null)
        {
            if (this.dataList != null)
            {
                this.dataList.hasTime = down.hasTime;
            }
            else
            {
                this.dataList         = new OffLineLoginPush();
                this.dataList.hasTime = down.hasTime;
            }
            int getTime = down.GetTime;
            if (getTime % 60 == 0)
            {
                UIManagerControl.Instance.ShowToastText(string.Format(GameDataUtils.GetChineseContent(330035, false), getTime / 60));
            }
            else
            {
                UIManagerControl.Instance.ShowToastText(string.Format(GameDataUtils.GetChineseContent(330035, false), Math.Round(getTime / 60m, 1).ToString("F1")));
            }
        }
    }