private string GetFinalTitle(string title) { string result = string.Empty; int actorType = this.actorType; switch (actorType) { case 1: result = TextColorMgr.GetColorByID(title, 102); return(result); case 2: case 4: IL_29: if (actorType != 21) { return(result); } result = TextColorMgr.GetColorByID(title, 104); return(result); case 3: return(result); case 5: return(result); } goto IL_29; }
protected override string GetSenderName(int channel, string senderName) { if (string.IsNullOrEmpty(senderName)) { return(string.Empty); } string result = string.Empty; if (channel != 1) { if (channel != 8) { result = senderName; } else { result = TextColorMgr.GetColorByID(senderName, 1000007); } } else { result = senderName; } return(result); }
protected override string GetSenderName(int channel, string senderName) { if (string.IsNullOrEmpty(senderName)) { return(string.Empty); } return(TextColorMgr.GetColorByID(senderName + ":", 209)); }
protected override string GetContent() { if (this.m_chatInfo.src_channel == 64) { return(TextColorMgr.GetColorByID(GameDataUtils.GetChineseContent(502004, false), 210) + this.m_chatInfo.chat_content); } return(this.m_chatInfo.chat_content); }
public void OpenTreasure(int vipLevel, VipXiaoGuo dataVIPEffect) { if (!TreasureUIViewModel.IsTreasureValid(vipLevel, dataVIPEffect)) { TreasureUIView.Instance.Show(false); return; } UIManagerControl.Instance.OpenUI("TreasureUI", UINodesManager.NormalUIRoot, false, UIType.NonPush); this.ObatinItems.Clear(); this.SpecialItemText = string.Empty; this.VIPEffect = dataVIPEffect; this.VIPLevel10 = GameDataUtils.GetNumIcon10(vipLevel, NumType.Yellow_light); this.VIPLevel1 = GameDataUtils.GetNumIcon1(vipLevel, NumType.Yellow_light); this.BtnOKText = GameDataUtils.GetChineseContent(508009, false); if (dataVIPEffect.value2 > 0 && dataVIPEffect.value3 > 0) { this.ConsumeOn = true; this.ConsumeIcon = GameDataUtils.GetItemIcon(dataVIPEffect.value2); this.ConsumeNum = dataVIPEffect.value3.ToString(); } else { this.ConsumeOn = false; } string text = string.Empty; List <VipBoxItemInfo> vIPBox = VIPManager.Instance.GetVIPBox(dataVIPEffect.effect); if (vIPBox != null) { for (int i = 0; i < vIPBox.get_Count(); i++) { VipBoxItemInfo vipBoxItemInfo = vIPBox.get_Item(i); if (SpecialItem.IsSpecial(vipBoxItemInfo.itemId)) { string colorByID = TextColorMgr.GetColorByID("x" + vipBoxItemInfo.itemCount, 405); if (string.IsNullOrEmpty(text)) { text = GameDataUtils.GetItemName(vipBoxItemInfo.itemId, true, 0L) + colorByID; } else { text = text + ", " + GameDataUtils.GetItemName(vipBoxItemInfo.itemId, true, 0L) + colorByID; } } else { OOItem2Draw oOItem2Draw = new OOItem2Draw(); oOItem2Draw.ID = vipBoxItemInfo.itemId; oOItem2Draw.ItemIcon = GameDataUtils.GetItemIcon(vipBoxItemInfo.itemId); oOItem2Draw.ItemName = Utils.GetItemNum(vipBoxItemInfo.itemId, (long)vipBoxItemInfo.itemCount); this.ObatinItems.Add(oOItem2Draw); } } } this.SpecialItemText = text; }
public static string GetBlank(int count) { string text = string.Empty; for (int i = 0; i < count; i++) { text += ChatManager.Blank; } return(TextColorMgr.GetColorByID(text, 301, 0f)); }
protected override void InitUI() { base.FindTransform("BtnExitName").GetComponent <Text>().set_text(GameDataUtils.GetChineseContent(501002, false)); string colorByID = TextColorMgr.GetColorByID(GameDataUtils.GetChineseContent(501003, false), 405); base.FindTransform("RewardsName").GetComponent <Text>().set_text(colorByID); this.m_lblExpNum = base.FindTransform("ExpNum").GetComponent <Text>(); this.m_lblGoldNum = base.FindTransform("GoldNum").GetComponent <Text>(); this.m_tranItemsRegion = base.FindTransform("ItemsRegion"); this.m_tranItemsRegion.get_gameObject().SetActive(false); }
public static string GetItemProfession(Items dataItem) { if (dataItem.career == 0 || dataItem.career == 999) { return(GameDataUtils.GetChineseContent(514099, false)); } if (dataItem.career == EntityWorld.Instance.EntSelf.TypeID) { return(TextColorMgr.GetColor(UIUtils.GetRoleName(dataItem.career), "A55A41", string.Empty)); } return(TextColorMgr.GetColorByID(UIUtils.GetRoleName(dataItem.career), 1000007)); }
private void SetRemainTime(int seconds) { string time = TimeConverter.GetTime(seconds, TimeFormat.HHMMSS); if (seconds > 0) { this.m_lblTimeNum.set_text(time); } else { this.m_lblTimeNum.set_text(TextColorMgr.GetColorByID(time, 1000007)); } }
private string GetBroadcastContent(ChatManager.ChatInfo chatInfo) { string channelNameWithColor = ChatManager.GetChannelNameWithColor(chatInfo.src_channel); string text = string.Empty; if (!string.IsNullOrEmpty(chatInfo.sender_name)) { text = TextColorMgr.GetColorByID(chatInfo.sender_name + ":", 209); } string text2 = channelNameWithColor + text; string text3 = this.BroadcastContentSplit(chatInfo.chat_content, chatInfo.items); return(text2 + text3); }
public static string GetBlank(float dstLength, int fontSize) { string text = string.Empty; bool flag = true; while (flag) { text += ChatManager.Blank; if (ChatManager.instance.GetPreferredWidth(text, fontSize, false) >= dstLength) { flag = false; } } return(TextColorMgr.GetColorByID(text, 301, 0f)); }
public static string GetChannelNameWithColor(int channel) { string result = string.Empty; switch (channel) { case 1: result = TextColorMgr.GetColorByID(GameDataUtils.GetChineseContent(502000, false), 201); return(result); case 2: result = TextColorMgr.GetColorByID(GameDataUtils.GetChineseContent(502001, false), 203); return(result); case 3: case 5: case 6: case 7: IL_30: if (channel == 32) { result = TextColorMgr.GetColorByID(GameDataUtils.GetChineseContent(502005, false), 212); return(result); } if (channel == 64) { result = TextColorMgr.GetColorByID(GameDataUtils.GetChineseContent(502004, false), 211); return(result); } if (channel != 128) { return(result); } result = TextColorMgr.GetColorByID(GameDataUtils.GetChineseContent(502006, false), 214); return(result); case 4: result = TextColorMgr.GetColorByID(GameDataUtils.GetChineseContent(502002, false), 202); return(result); case 8: result = TextColorMgr.GetColorByID(GameDataUtils.GetChineseContent(502003, false), 204); return(result); } goto IL_30; }
private void SetTime() { int second = ChatTalkTipUIView.GetSecond(); int num = 60 - second; if (num > 10) { this.m_lblTimeTip.set_text(string.Empty); } else { this.m_lblTimeTip.set_text(TextColorMgr.GetColorByID(num + "s", 1000007)); } if (num <= 0 && ChatUIViewModel.Instance != null) { ChatUIViewModel.Instance.SendMessageOfVoice(); } }
protected static string GetStringColorByChannel(int channel, string content) { switch (channel) { case 1: content = TextColorMgr.GetColorByID(content, 205); return(content); case 2: content = TextColorMgr.GetColorByID(content, 207); return(content); case 3: case 5: case 6: case 7: IL_2A: if (channel == 32) { content = TextColorMgr.GetColorByID(content, 213); return(content); } if (channel == 64) { content = TextColorMgr.GetColorByID(content, 208); return(content); } if (channel != 128) { return(content); } content = TextColorMgr.GetColorByID(content, 215); return(content); case 4: content = TextColorMgr.GetColorByID(content, 206); return(content); case 8: content = TextColorMgr.GetColorByID(content, 208); return(content); } goto IL_2A; }
protected void SetModel(Transform root, int modelID) { base.GetAsyncModel(root, modelID, delegate { Monster monster = DataReader <Monster> .Get(this.monsterDataID); AvatarModel avatarModel = DataReader <AvatarModel> .Get(modelID); CharacterController[] componentsInChildren = root.GetComponentsInChildren <CharacterController>(); if (componentsInChildren != null && componentsInChildren.Length > 0) { for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].set_enabled(avatarModel.collideOff == 0); } } this.animator = root.GetComponentInChildren <Animator>(); BillboardManager.Instance.AddBillboardsInfo(23, root, (float)avatarModel.height_HP, (long)this.id, false, true, true); HeadInfoManager.Instance.SetName(23, (long)this.id, TextColorMgr.GetColorByID(string.Format(GameDataUtils.GetChineseContent((!this.isMultiBoss) ? 505163 : 505164, false), this.monsterLv, GameDataUtils.GetChineseContent(monster.name, false), (!this.isMultiBoss) ? DataReader <YeWaiBOSSJieJi> .Get(this.monsterLv).SingleRank : DataReader <YeWaiBOSSJieJi> .Get(this.monsterLv).ManyRank), (!this.isMultiBoss) ? 1000007 : 1000009)); ShadowController.ShowShadow((long)this.id, root, false, modelID); ActorVisibleManager.Instance.Add((long)this.id, root, 23, 0L); this.AppState(); }); }
private void SetMoney(int num) { int num2; if (this.m_iId > 0) { num2 = BaseMarketManager.CurrentManagerInstance.GetCommodityPrice(this.m_iId, num); } else { num2 = this.m_group_price * num; } bool flag = MarketTools.IsEnoughMoney(num2, this.m_money_type); string text = "x" + num2; if (flag) { this.CostNum = " " + text; } else { this.CostNum = " " + TextColorMgr.GetColorByID(text, 1000007); } }
public static string GetColorByQuality(string text, int quality) { return(TextColorMgr.GetColorByID(text, quality)); }
public void SetEquipItemData(EquipSimpleInfo equipSimpleInfo, int hasMaxMoney = 0) { if (equipSimpleInfo == null) { return; } if (!DataReader <zZhuangBeiPeiZhiBiao> .Contains(equipSimpleInfo.cfgId)) { return; } zZhuangBeiPeiZhiBiao zZhuangBeiPeiZhiBiao = DataReader <zZhuangBeiPeiZhiBiao> .Get(equipSimpleInfo.cfgId); Image component = base.FindTransform("ItemFrame").GetComponent <Image>(); if (component != null) { ResourceManager.SetSprite(component, GameDataUtils.GetItemFrame(equipSimpleInfo.cfgId)); } Image component2 = base.FindTransform("ItemIcon").GetComponent <Image>(); if (component2 != null) { ResourceManager.SetSprite(component2, GameDataUtils.GetItemIcon(equipSimpleInfo.cfgId)); } Text component3 = base.FindTransform("ItemName").GetComponent <Text>(); if (component3 != null) { component3.set_text(GameDataUtils.GetItemName(equipSimpleInfo.cfgId, true, 0L)); } Text component4 = base.FindTransform("ItemLv").GetComponent <Text>(); component4.set_text(zZhuangBeiPeiZhiBiao.level.ToString()); Text component5 = base.FindTransform("ItemCareerLimit").GetComponent <Text>(); string equipOccupationName = EquipGlobal.GetEquipOccupationName(zZhuangBeiPeiZhiBiao.id); component5.set_text(equipOccupationName); Text component6 = base.FindTransform("ItemFightingScore").GetComponent <Text>(); Text component7 = base.FindTransform("EquipStepText").GetComponent <Text>(); component7.set_text(string.Format(GameDataUtils.GetChineseContent(505023, false), zZhuangBeiPeiZhiBiao.step)); long num = (long)EquipmentManager.Instance.GetEquipFightingByExcellentAttrs(equipSimpleInfo.cfgId, equipSimpleInfo.excellentAttrs); if (this.fightingText != null) { this.fightingText.set_text(num + string.Empty); } Transform transform = base.FindTransform("BaseAttr"); Attrs attrs = DataReader <Attrs> .Get(zZhuangBeiPeiZhiBiao.attrBaseValue); if (attrs != null) { for (int i = 0; i < attrs.attrs.get_Count(); i++) { if (i > 2) { break; } long value = (long)attrs.values.get_Item(i); transform.FindChild("EquipItem2Text" + i).get_gameObject().SetActive(true); transform.FindChild("EquipItem2Text" + i).FindChild("Item2Text").GetComponent <Text>().set_text(AttrUtility.GetStandardAddDesc((GameData.AttrType)attrs.attrs.get_Item(i), value, "ff7d4b")); } for (int j = attrs.attrs.get_Count(); j < 3; j++) { transform.FindChild("EquipItem2Text" + j).get_gameObject().SetActive(false); } } Transform transform2 = base.FindTransform("ExcellentAttr"); Transform transform3 = base.FindTransform("ExcellentAttrIconList"); transform3.get_gameObject().SetActive(false); if (equipSimpleInfo.excellentAttrs.get_Count() > 0) { transform2.get_gameObject().SetActive(true); int k = 0; int num2 = 0; while (k < equipSimpleInfo.excellentAttrs.get_Count()) { if (k >= 5) { break; } if (equipSimpleInfo.excellentAttrs.get_Item(k).attrId < 0) { transform2.FindChild("EquipItem2Text" + k).get_gameObject().SetActive(false); } else { string excellentTypeColor = EquipGlobal.GetExcellentTypeColor(equipSimpleInfo.excellentAttrs.get_Item(k).color); string text = string.Empty; text = AttrUtility.GetStandardAddDesc(equipSimpleInfo.excellentAttrs.get_Item(k).attrId, equipSimpleInfo.excellentAttrs.get_Item(k).value, excellentTypeColor, excellentTypeColor); transform2.FindChild("EquipItem2Text" + k).get_gameObject().SetActive(true); transform2.FindChild("EquipItem2Text" + k).FindChild("Item2Text").GetComponent <Text>().set_text(text); string excellentRangeText = EquipGlobal.GetExcellentRangeText(equipSimpleInfo.cfgId, equipSimpleInfo.excellentAttrs.get_Item(k).attrId); transform2.FindChild("EquipItem2Text" + k).FindChild("Item2TextRange").GetComponent <Text>().set_text(excellentRangeText); if (equipSimpleInfo.excellentAttrs.get_Item(k).color >= 1f) { transform2.FindChild("EquipItem2Text" + k).FindChild("ItemImg").GetComponent <Image>().set_enabled(true); num2++; } else { transform2.FindChild("EquipItem2Text" + k).FindChild("ItemImg").GetComponent <Image>().set_enabled(false); } } k++; } for (int l = k; l < 5; l++) { transform2.FindChild("EquipItem2Text" + l).get_gameObject().SetActive(false); } if (num2 > 0) { if (!transform3.get_gameObject().get_activeSelf()) { transform3.get_gameObject().SetActive(true); } for (int m = 0; m < num2; m++) { if (num2 >= 3) { break; } transform3.FindChild("Image" + (m + 1)).get_gameObject().SetActive(true); } for (int n = num2; n < 3; n++) { transform3.FindChild("Image" + (n + 1)).get_gameObject().SetActive(false); } } } int num3; for (num3 = 0; num3 < zZhuangBeiPeiZhiBiao.starNum; num3++) { this.starTransformList.get_Item(num3).get_gameObject().SetActive(true); if (equipSimpleInfo.star > num3) { this.starTransformList.get_Item(num3).FindChild("OpenStar").get_gameObject().SetActive(true); string starLevelSpriteName = this.GetStarLevelSpriteName(equipSimpleInfo.starToMaterial.get_Item(num3)); ResourceManager.SetSprite(this.starTransformList.get_Item(num3).FindChild("OpenStar").GetComponent <Image>(), ResourceManager.GetIconSprite(starLevelSpriteName)); } else { this.starTransformList.get_Item(num3).FindChild("OpenStar").get_gameObject().SetActive(false); } } for (int num4 = num3; num4 < this.starTransformList.get_Count(); num4++) { this.starTransformList.get_Item(num4).get_gameObject().SetActive(false); } List <int> list = new List <int>(); list.Add(equipSimpleInfo.cfgId); int equipsTotalPoint = GuildStorageManager.Instance.GetEquipsTotalPoint(list, false); string text2 = "x" + equipsTotalPoint; if (hasMaxMoney >= equipsTotalPoint) { this.CostNumText = " " + text2; } else { this.CostNumText = " " + TextColorMgr.GetColorByID(text2, 1000007); } this.CostIconSR = GameDataUtils.GetItemIcon(19); }
public static string GetColorByQuality(string text, int quality, float alpha) { return(TextColorMgr.GetColorByID(text, quality, alpha)); }
private string GetName(string name) { if (string.IsNullOrEmpty(name)) { return(name); } string result = string.Empty; int actorType = this.actorType; switch (actorType) { case 1: result = TextColorMgr.GetColorByID(name, 101); break; case 2: name = TextColorMgr.FilterColor(name); result = TextColorMgr.GetColorByID(name, 108); break; case 3: result = TextColorMgr.GetColorByID(name, 105); break; case 4: name = TextColorMgr.FilterColor(name); result = TextColorMgr.GetColorByID(name, 109); break; case 5: result = TextColorMgr.GetColorByID(name, 106); break; case 6: name = TextColorMgr.FilterColor(name); result = TextColorMgr.GetColorByID(name, 110); break; case 7: result = TextColorMgr.GetColorByID(name, 111); break; case 8: name = TextColorMgr.FilterColor(name); result = TextColorMgr.GetColorByID(name, 112); break; default: if (actorType != 21) { if (actorType != 31) { if (actorType != 41) { if (actorType != 61) { result = name; } else { result = TextColorMgr.GetColorByID(name, 106); } } else { result = TextColorMgr.GetColorByID(name, 106); } } else { result = TextColorMgr.GetColorByID(name, 107); } } else { result = TextColorMgr.GetColorByID(name, 103); } break; } return(result); }
public void ShowSmeltWillReturn(List <long> list_equip_uuid) { bool flag = EquipGlobal.IsContainHighLevel(list_equip_uuid); this.return_list.Clear(); for (int i = 0; i < list_equip_uuid.get_Count(); i++) { int key = BackpackManager.Instance.OnGetGoodItemId(list_equip_uuid.get_Item(i)); zZhuangBeiPeiZhiBiao zZhuangBeiPeiZhiBiao = DataReader <zZhuangBeiPeiZhiBiao> .Get(key); for (int j = 0; j < zZhuangBeiPeiZhiBiao.smeltDrop.get_Count(); j++) { zZhuangBeiPeiZhiBiao.SmeltdropPair smeltdropPair = zZhuangBeiPeiZhiBiao.smeltDrop.get_Item(j); if (this.return_list.ContainsKey(smeltdropPair.key)) { this.return_list.set_Item(smeltdropPair.key, this.return_list.get_Item(smeltdropPair.key) + (long)smeltdropPair.value); } else { this.return_list.set_Item(smeltdropPair.key, (long)smeltdropPair.value); } } } string text = string.Empty; string text2 = string.Empty; using (Dictionary <int, long> .Enumerator enumerator = this.return_list.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <int, long> current = enumerator.get_Current(); int num = this.GetMaxFund() - GuildManager.Instance.GetEquipSmeltDayFund(); string text3; if (current.get_Key() == MoneyType.GetItemId(6)) { if (GuildManager.Instance.GetEquipSmeltDayFund() >= this.GetMaxFund()) { text2 = TextColorMgr.GetColorByID("本日军团资金贡献已达最大值\n", 1000007); continue; } if ((long)num < current.get_Value()) { string itemName = GameDataUtils.GetItemName(current.get_Key(), true, 0L); text3 = text; text = string.Concat(new object[] { text3, itemName, "x", num, "\n" }); continue; } } string itemName2 = GameDataUtils.GetItemName(current.get_Key(), true, 0L); text3 = text; text = string.Concat(new object[] { text3, itemName2, "x", current.get_Value(), "\n" }); } } text += text2; string text4 = string.Empty; if (flag) { text4 = "熔炼后将会获得{0}检测到您选中了高级装备\n是否进行熔炼?"; } else { text4 = "熔炼后将会获得{0}是否进行熔炼?"; } text4 = string.Format(text4, text); DialogBoxUIViewModel.Instance.ShowAsOKCancel("熔炼预览", text4, null, delegate { Dictionary <int, List <long> > dictionary = new Dictionary <int, List <long> >(); for (int k = 0; k < list_equip_uuid.get_Count(); k++) { int key2 = BackpackManager.Instance.OnGetGoodItemId(list_equip_uuid.get_Item(k)); zZhuangBeiPeiZhiBiao zZhuangBeiPeiZhiBiao2 = DataReader <zZhuangBeiPeiZhiBiao> .Get(key2); if (dictionary.ContainsKey(zZhuangBeiPeiZhiBiao2.position)) { List <long> list = dictionary.get_Item(zZhuangBeiPeiZhiBiao2.position); list.Add(list_equip_uuid.get_Item(k)); } else { List <long> list2 = new List <long>(); list2.Add(list_equip_uuid.get_Item(k)); dictionary.Add(zZhuangBeiPeiZhiBiao2.position, list2); } } List <DecomposeEquipInfo> list3 = new List <DecomposeEquipInfo>(); using (Dictionary <int, List <long> > .Enumerator enumerator2 = dictionary.GetEnumerator()) { while (enumerator2.MoveNext()) { KeyValuePair <int, List <long> > current2 = enumerator2.get_Current(); DecomposeEquipInfo decomposeEquipInfo = new DecomposeEquipInfo(); decomposeEquipInfo.position = current2.get_Key(); decomposeEquipInfo.equipIds.AddRange(current2.get_Value()); list3.Add(decomposeEquipInfo); } } GuildManager.Instance.SendSmeltEquip(list3); }, "取消", "确定", "button_orange_1", "button_yellow_1", null, true, true); }