Пример #1
0
    public void SetSlayLog(int bossId, List <BossKilledLog> logList)
    {
        BossBiaoQian bossBiaoQian = DataReader <BossBiaoQian> .Get(bossId);

        ZhuChengPeiZhi zhuChengPeiZhi = DataReader <ZhuChengPeiZhi> .Get(bossBiaoQian.scene);

        this.m_TextTitle.set_text(GameDataUtils.GetChineseContent(bossBiaoQian.nameId, false) + GameDataUtils.GetChineseContent(517511, false));
        this.m_ScrollLayout.set_anchoredPosition(new Vector2(0f, 0f));
        this.HideCells();
        for (int i = 0; i < logList.get_Count(); i++)
        {
            BossKilledLog bossKilledLog = logList.get_Item(i);
            Transform     transform;
            if (i < this.m_ScrollLayout.get_childCount())
            {
                transform = this.m_ScrollLayout.GetChild(i);
                transform.get_gameObject().SetActive(true);
            }
            else
            {
                GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("BBSlayRecordCell");
                instantiate2Prefab.SetActive(true);
                transform = instantiate2Prefab.get_transform();
                transform.SetParent(this.m_ScrollLayout, false);
            }
            DateTime dateTime = BossBookManager.StampToDateTime(bossKilledLog.dateTimeSec.ToString());
            string   time     = TimeConverter.GetTime(dateTime, TimeFormat.MDHHMM);
            string   text     = string.Format(GameDataUtils.GetChineseContent(517513, false), time, GameDataUtils.GetChineseContent(zhuChengPeiZhi.name, false), bossKilledLog.roleName);
            transform.Find("TextRecord").GetComponent <Text>().set_text(text);
        }
    }
Пример #2
0
    protected void UpdateBossShow(int BossId)
    {
        this.ClearBossInfo();
        if (BossId == 0)
        {
            return;
        }
        BossBiaoQian bossBiaoQian = DataReader <BossBiaoQian> .Get(BossId);

        if (bossBiaoQian == null)
        {
            return;
        }
        this.curBossId = BossId;
        this.m_TextBossName.set_text(GameDataUtils.GetChineseContent(bossBiaoQian.nameId, false));
        ZhuChengPeiZhi zhuChengPeiZhi = DataReader <ZhuChengPeiZhi> .Get(bossBiaoQian.scene);

        this.m_TextHabitat.set_text(GameDataUtils.GetChineseContent(517519, false) + GameDataUtils.GetChineseContent(zhuChengPeiZhi.name, false));
        int vipLv = EntityWorld.Instance.EntSelf.VipLv;

        if (vipLv >= bossBiaoQian.vipLevel)
        {
            this.m_TextBtnGo.set_text(GameDataUtils.GetChineseContent(517518, false));
        }
        else
        {
            this.m_TextBtnGo.set_text(string.Format(GameDataUtils.GetChineseContent(517517, false), bossBiaoQian.vipLevel));
        }
        this.RefreshModel(bossBiaoQian);
        for (int i = 0; i < bossBiaoQian.dropItem.get_Count(); i++)
        {
            ItemShow.ShowItem(this.m_ScrollLayoutDrop, bossBiaoQian.dropItem.get_Item(i), -1L, false, UINodesManager.T2RootOfSpecial, 2001);
        }
    }
Пример #3
0
    protected bool TryUpdateData(int scene)
    {
        ZhuChengPeiZhi mainCity = this.GetMainCity(scene);

        if (mainCity == null)
        {
            return(false);
        }
        this.minimapName = mainCity.name;
        this.titleIcon   = mainCity.title;
        this.minimap     = mainCity.miniMap;
        this.anchorPoint = mainCity.anchorPoint;
        this.linkWay     = mainCity.@interface;
        return(true);
    }
Пример #4
0
    private bool IsTeleportOn(int cityID)
    {
        ZhuChengPeiZhi zhuChengPeiZhi = DataReader <ZhuChengPeiZhi> .Get(cityID);

        return(zhuChengPeiZhi != null && zhuChengPeiZhi.teleport == 1);
    }
Пример #5
0
    public bool TeleportAndNavToBoss(int bossId)
    {
        BossItemInfo bossItemInfo = this.GetBossItemInfo(bossId);

        if (bossItemInfo == null)
        {
            return(false);
        }
        BossBiaoQian bossBiaoQian = DataReader <BossBiaoQian> .Get(bossId);

        if (bossBiaoQian == null)
        {
            return(false);
        }
        bool result = false;
        int  scene  = bossBiaoQian.scene;

        if (CityManager.Instance.CurrentCityID == scene)
        {
            if (bossItemInfo.pos.get_Count() > 0)
            {
                Pos pos;
                if (bossItemInfo.pos.get_Count() > 1)
                {
                    int num = Random.Range(0, bossItemInfo.pos.get_Count());
                    pos = bossItemInfo.pos.get_Item(num);
                }
                else
                {
                    pos = bossItemInfo.pos.get_Item(0);
                }
                float pointX = pos.x * 0.01f;
                float pointZ = pos.y * 0.01f;
                result = true;
                EventDispatcher.Broadcast(EventNames.BeginNav);
                EntityWorld.Instance.EntSelf.NavToSameScenePoint(pointX, pointZ, 0f, delegate
                {
                    EventDispatcher.Broadcast(EventNames.EndNav);
                });
            }
        }
        else if (!this.IsTeleportOn(scene))
        {
            UIManagerControl.Instance.ShowToastText(GameDataUtils.GetChineseContent(517001, false));
        }
        else
        {
            RadarManager.Instance.StopNav();
            ZhuChengPeiZhi zhuChengPeiZhi = DataReader <ZhuChengPeiZhi> .Get(scene);

            if (zhuChengPeiZhi != null)
            {
                this.AfterTeleportNavToBossId = bossId;
                result = true;
                if (zhuChengPeiZhi.mapType == 3)
                {
                    this.SendCondMainCityEnterReq(scene);
                }
                else
                {
                    EventDispatcher.Broadcast <int>(CityManagerEvent.ChangeCityByIntegrationHearth, scene);
                }
            }
        }
        return(result);
    }
    public void SetDropLog(List <BossDropLog> logList)
    {
        this.m_TextTitle.set_text(GameDataUtils.GetChineseContent(517512, false));
        this.m_ScrollLayout.set_anchoredPosition(new Vector2(0f, 0f));
        this.HideCells();
        for (int i = 0; i < logList.get_Count(); i++)
        {
            BossDropLog bossDropLog = logList.get_Item(i);
            Transform   transform;
            if (i < this.m_ScrollLayout.get_childCount())
            {
                transform = this.m_ScrollLayout.GetChild(i);
                transform.get_gameObject().SetActive(true);
            }
            else
            {
                GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("BBDropRecordCell");
                instantiate2Prefab.SetActive(true);
                transform = instantiate2Prefab.get_transform();
                transform.SetParent(this.m_ScrollLayout, false);
            }
            transform.get_gameObject().SetActive(true);
            BossBiaoQian bossBiaoQian = DataReader <BossBiaoQian> .Get(bossDropLog.labelId);

            ZhuChengPeiZhi zhuChengPeiZhi = DataReader <ZhuChengPeiZhi> .Get(bossBiaoQian.scene);

            Text     component  = transform.Find("TextRecord").GetComponent <Text>();
            Text     component2 = transform.Find("TextDrop").GetComponent <Text>();
            DateTime dateTime   = BossBookManager.StampToDateTime(bossDropLog.dateTimeSec.ToString());
            string   time       = TimeConverter.GetTime(dateTime, TimeFormat.MDHHMM);
            string   text       = string.Format(GameDataUtils.GetChineseContent(517514, false), new object[]
            {
                time,
                bossDropLog.roleName,
                GameDataUtils.GetChineseContent(zhuChengPeiZhi.name, false),
                GameDataUtils.GetChineseContent(bossBiaoQian.nameId, false)
            });
            component.set_text(text);
            if (bossDropLog.items.get_Count() > 0)
            {
                int num = this.GetBestQualityItem(bossDropLog.items);
                if (num < 0 && num >= bossDropLog.items.get_Count())
                {
                    num = 0;
                }
                ItemBriefInfo itemBriefInfo = bossDropLog.items.get_Item(num);
                Items         items         = DataReader <Items> .Get(itemBriefInfo.cfgId);

                if (items != null)
                {
                    component2.set_text(GameDataUtils.GetChineseContent(items.name, false));
                    Dictionary <string, Color> textColorByQuality = GameDataUtils.GetTextColorByQuality(items.color);
                    component2.set_color(textColorByQuality.get_Item("TextColor"));
                    component2.GetComponent <Outline>().set_effectColor(textColorByQuality.get_Item("TextOutlineColor"));
                    component2.GetComponent <RectTransform>().set_anchoredPosition(new Vector2(component.get_preferredWidth() + 50f, 0f));
                }
                else
                {
                    component2.set_text(string.Empty);
                }
            }
            else
            {
                component2.set_text(string.Empty);
            }
        }
    }