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); } }
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); } }
private void OnClickBtnGo(GameObject go) { BossBiaoQian bossBiaoQian = DataReader <BossBiaoQian> .Get(this.curBossId); if (bossBiaoQian == null) { return; } int vipLv = EntityWorld.Instance.EntSelf.VipLv; if (vipLv < bossBiaoQian.vipLevel) { UIManagerControl.Instance.OpenUI("DialogBoxUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush); DialogBoxUIViewModel.Instance.ShowAsOKCancel_as(GameDataUtils.GetChineseContent(621264, false), GameDataUtils.GetChineseContent(505106, false), null, null, delegate { this.Show(false); LinkNavigationManager.OpenVIPUI2VipLimit(); }, GameDataUtils.GetNoticeText(103), GameDataUtils.GetNoticeText(102), "button_orange_1", "button_orange_1", null); return; } if (BossBookManager.Instance.TeleportAndNavToBoss(this.curBossId)) { this.Show(false); } }
public void ContinueNavToBoss() { if (this.AfterTeleportNavToBossId > 0) { BossItemInfo bossItemInfo = this.GetBossItemInfo(this.AfterTeleportNavToBossId); if (bossItemInfo == null) { return; } BossBiaoQian bossBiaoQian = DataReader <BossBiaoQian> .Get(this.AfterTeleportNavToBossId); if (bossBiaoQian == null) { return; } if (CityManager.Instance.CurrentCityID != bossBiaoQian.scene) { return; } 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 x = pos.x * 0.01f; float z = pos.y * 0.01f; TimerHeap.AddTimer(500u, 0, delegate { EventDispatcher.Broadcast(EventNames.BeginNav); EntityWorld.Instance.EntSelf.NavToSameScenePoint(x, z, 0f, delegate { EventDispatcher.Broadcast(EventNames.EndNav); }); }); } this.AfterTeleportNavToBossId = 0; } }
public void UpdateBtn(int bossId) { if (this.bossId != bossId) { BossBiaoQian bossBiaoQian = DataReader <BossBiaoQian> .Get(bossId); if (bossBiaoQian != null) { this.m_TextName.set_text(GameDataUtils.GetChineseContent(bossBiaoQian.nameId, false)); this.m_TextTime.set_text(string.Empty); this.m_TextLevel.set_text(bossBiaoQian.step.ToString() + GameDataUtils.GetChineseContent(517516, false)); string iconName = GameDataUtils.GetIconName(bossBiaoQian.icon); ResourceManager.SetSprite(this.m_BtnBossImage, ResourceManager.GetIconSprite(iconName)); } this.bossId = bossId; this.EndCountDown(); } }
private void RefreshModel(BossBiaoQian config) { List <float> offset = config.modelOffset; WaitUI.OpenUI(0u); ModelDisplayManager.Instance.ShowModel(config.modelId, true, new Vector2(offset.get_Item(0), offset.get_Item(1)), delegate(int uid) { this.modelUid = uid; ActorModel uIModel = ModelDisplayManager.Instance.GetUIModel(uid); if (uIModel != null) { Vector3 localPosition = uIModel.get_transform().get_localPosition(); uIModel.get_transform().set_localPosition(new Vector3(localPosition.x, localPosition.y, offset.get_Item(2))); uIModel.get_transform().set_localEulerAngles(new Vector3(0f, config.modelAngle, 0f)); LayerSystem.SetGameObjectLayer(uIModel.get_gameObject(), "CameraRange", 2); } WaitUI.CloseUI(0u); }); }
public override void Init() { base.Init(); this.BossDictionary.Clear(); this.PageDictionary.Clear(); List <BossBiaoQian> dataList = DataReader <BossBiaoQian> .DataList; for (int i = 0; i < dataList.get_Count(); i++) { BossBiaoQian bossBiaoQian = dataList.get_Item(i); if (bossBiaoQian != null) { int page = bossBiaoQian.page; List <int> list; this.PageDictionary.TryGetValue(page, ref list); if (list == null) { list = new List <int>(); this.PageDictionary.Add(page, list); } list.Add(bossBiaoQian.key); if (!this.BossDictionary.ContainsKey(bossBiaoQian.key)) { this.BossDictionary.Add(bossBiaoQian.key, new BossItemInfo { bossId = bossBiaoQian.key }); } } } using (Dictionary <int, List <int> > .ValueCollection.Enumerator enumerator = this.PageDictionary.get_Values().GetEnumerator()) { while (enumerator.MoveNext()) { List <int> current = enumerator.get_Current(); current.Sort((int a, int b) => a.CompareTo(b)); } } }
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); } } }