private void RefreshSymbolTransformForm() { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(s_symbolTransformPath); CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (((form != null) && (this.m_curTransformSymbol != null)) && (masterRoleInfo != null)) { GameObject gameObject = form.transform.Find("Panel_SymbolTranform/Panel_Content").gameObject; gameObject.transform.Find("iconImage").GetComponent <Image>().SetSprite(string.Format("{0}{1}", CUIUtility.s_Sprite_Dynamic_Icon_Dir, this.m_curTransformSymbol.dwIcon), form, true, false, false); gameObject.transform.Find("nameText").GetComponent <Text>().text = StringHelper.UTF8BytesToString(ref this.m_curTransformSymbol.szName); Text component = gameObject.transform.Find("countText").GetComponent <Text>(); component.text = string.Empty; int useableStackCount = 0; CUseableContainer useableContainer = masterRoleInfo.GetUseableContainer(enCONTAINER_TYPE.ITEM); if (useableContainer != null) { useableStackCount = useableContainer.GetUseableStackCount(COM_ITEM_TYPE.COM_OBJTYPE_ITEMSYMBOL, this.m_curTransformSymbol.dwID); CTextManager instance = Singleton <CTextManager> .GetInstance(); component.text = (useableStackCount <= 0) ? instance.GetText("Symbol_Not_Own") : string.Format(instance.GetText("Symbol_Own_Cnt"), useableStackCount); } CSymbolSystem.RefreshSymbolPropContent(gameObject.transform.Find("symbolPropPanel").gameObject, this.m_curTransformSymbol.dwID); gameObject.transform.Find("makeCoinText").GetComponent <Text>().text = this.m_curTransformSymbol.dwMakeCoin.ToString(); gameObject.transform.Find("breakCoinText").GetComponent <Text>().text = this.m_curTransformSymbol.dwBreakCoin.ToString(); GameObject obj4 = gameObject.transform.Find("btnBreak").gameObject; obj4.GetComponent <Button>().interactable = useableStackCount > 0; obj4.GetComponent <CUIEventScript>().enabled = useableStackCount > 0; } }
public static string GetHeroJobStr(RES_HERO_JOB jobType) { string str = string.Empty; CTextManager instance = Singleton <CTextManager> .GetInstance(); switch (jobType) { case RES_HERO_JOB.RES_HEROJOB_TANK: return(instance.GetText("Hero_Job_Tank")); case RES_HERO_JOB.RES_HEROJOB_SOLDIER: return(instance.GetText("Hero_Job_Soldier")); case RES_HERO_JOB.RES_HEROJOB_ASSASSIN: return(instance.GetText("Hero_Job_Assassin")); case RES_HERO_JOB.RES_HEROJOB_MASTER: return(instance.GetText("Hero_Job_Master")); case RES_HERO_JOB.RES_HEROJOB_ARCHER: return(instance.GetText("Hero_Job_Archer")); case RES_HERO_JOB.RES_HEROJOB_AID: return(instance.GetText("Hero_Job_Aid")); } return(str); }
public static string GetHeroJobStr(RES_HERO_JOB jobType) { string result = string.Empty; CTextManager instance = Singleton <CTextManager> .GetInstance(); switch (jobType) { case 1: result = instance.GetText("Hero_Job_Tank"); break; case 2: result = instance.GetText("Hero_Job_Soldier"); break; case 3: result = instance.GetText("Hero_Job_Assassin"); break; case 4: result = instance.GetText("Hero_Job_Master"); break; case 5: result = instance.GetText("Hero_Job_Archer"); break; case 6: result = instance.GetText("Hero_Job_Aid"); break; } return(result); }
public static string GetJobFeature(uint heroId) { string text = string.Empty; ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(heroId); CTextManager instance = Singleton <CTextManager> .GetInstance(); if (dataByKey != null) { string text2 = string.Empty; for (int i = 0; i < dataByKey.JobFeature.Length; i++) { text2 = CHeroInfo.GetFeatureStr(dataByKey.JobFeature[i]); if (!string.IsNullOrEmpty(text2)) { if (!string.IsNullOrEmpty(text)) { text = string.Format("{0}/{1}", text, text2); } else { text = text2; } } } } return(text); }
public static string GetFeatureStr(RES_HERO_JOB_FEATURE featureType) { string str = string.Empty; CTextManager instance = Singleton <CTextManager> .GetInstance(); switch (featureType) { case RES_HERO_JOB_FEATURE.RES_JOB_FEATURE_DASH: return(instance.GetText("Hero_Job_Feature_Dash")); case RES_HERO_JOB_FEATURE.RES_JOB_FEATURE_CONTROL: return(instance.GetText("Hero_Job_Feature_Control")); case RES_HERO_JOB_FEATURE.RES_JOB_FEATURE_ACTIVE: return(instance.GetText("Hero_Job_Feature_Active")); case RES_HERO_JOB_FEATURE.RES_JOB_FEATURE_SLAVE: return(instance.GetText("Hero_Job_Feature_Slave")); case RES_HERO_JOB_FEATURE.RES_JOB_FEATURE_RECOVER: return(instance.GetText("Hero_Job_Feature_Recover")); case RES_HERO_JOB_FEATURE.RES_JOB_FEATURE_HPSTEAL: return(instance.GetText("Hero_Job_Feature_HpSteal")); case RES_HERO_JOB_FEATURE.RES_JOB_FEATURE_POKE: return(instance.GetText("Hero_Job_Feature_Poke")); case RES_HERO_JOB_FEATURE.RES_JOB_FEATURE_BUFF: return(instance.GetText("Hero_Job_Feature_Buff")); } return(str); }
public static string GetJobFeature(uint heroId) { string str = string.Empty; ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(heroId); CTextManager instance = Singleton <CTextManager> .GetInstance(); if (dataByKey != null) { string featureStr = string.Empty; for (int i = 0; i < dataByKey.JobFeature.Length; i++) { featureStr = GetFeatureStr((RES_HERO_JOB_FEATURE)dataByKey.JobFeature[i]); if (!string.IsNullOrEmpty(featureStr)) { if (!string.IsNullOrEmpty(str)) { str = string.Format("{0}/{1}", str, featureStr); } else { str = featureStr; } } } } return(str); }
public static string GetEffectDesc(SkillEffectType skillEffectType) { CTextManager instance = Singleton <CTextManager> .instance; string text = "{0}{1}"; object obj = "Skill_Common_Effect_Type_"; uint num = (uint)skillEffectType; return(instance.GetText(string.Format(text, obj, num.ToString()))); }
public static string GetEffectDesc(SkillEffectType skillEffectType) { CTextManager arg_1D_0 = Singleton <CTextManager> .get_instance(); string arg_18_0 = "{0}{1}"; object arg_18_1 = "Skill_Common_Effect_Type_"; uint num = skillEffectType; return(arg_1D_0.GetText(string.Format(arg_18_0, arg_18_1, num.ToString()))); }
public static void RefreshDianQuanPayButton(bool notifyFromSvr = false) { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(FORM_PATH); if (form != null) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); GameObject gameObject = form.transform.Find("DiamondPayBtn").gameObject; CUIEventScript component = gameObject.GetComponent <CUIEventScript>(); CTextManager instance = Singleton <CTextManager> .GetInstance(); if (!masterRoleInfo.IsGuidedStateSet(0x16)) { CUICommonSystem.SetButtonName(gameObject, instance.GetText("Pay_Btn_FirstPay")); component.SetUIEvent(enUIEventType.Click, enUIEventID.Pay_OpenFirstPayPanel); CUICommonSystem.DelRedDot(gameObject); } else if (!masterRoleInfo.IsGuidedStateSet(0x17)) { CUICommonSystem.SetButtonName(gameObject, instance.GetText("Pay_Btn_FirstPay")); component.SetUIEvent(enUIEventType.Click, enUIEventID.Pay_OpenFirstPayPanel); CUICommonSystem.AddRedDot(gameObject, enRedDotPos.enTopRight, 0); } else if (!masterRoleInfo.IsGuidedStateSet(0x18)) { CUICommonSystem.SetButtonName(gameObject, instance.GetText("Pay_Btn_Renewal")); component.SetUIEvent(enUIEventType.Click, enUIEventID.Pay_OpenRenewalPanel); CUICommonSystem.DelRedDot(gameObject); } else if (!masterRoleInfo.IsGuidedStateSet(0x19)) { CUICommonSystem.SetButtonName(gameObject, instance.GetText("Pay_Btn_Renewal")); component.SetUIEvent(enUIEventType.Click, enUIEventID.Pay_OpenRenewalPanel); CUICommonSystem.AddRedDot(gameObject, enRedDotPos.enTopRight, 0); } else if (masterRoleInfo.IsClientBitsSet(0)) { CUICommonSystem.SetButtonName(gameObject, instance.GetText("GotoTehuiShopName")); component.SetUIEvent(enUIEventType.Click, enUIEventID.Pay_TehuiShop); } else if (notifyFromSvr) { masterRoleInfo.SetClientBits(0, true, false); RefreshDianQuanPayButton(false); } else { gameObject.CustomSetActive(false); } } }
public static string GetJobFeature(uint heroId) { string str = string.Empty; ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(heroId); CTextManager instance = Singleton <CTextManager> .GetInstance(); if (dataByKey != null) { switch (dataByKey.bJob) { case 1: str = str + instance.GetText("Hero_Job_Tank"); break; case 2: str = str + instance.GetText("Hero_Job_Soldier"); break; case 3: str = str + instance.GetText("Hero_Job_Assassin"); break; case 4: str = str + instance.GetText("Hero_Job_Master"); break; case 5: str = str + instance.GetText("Hero_Job_Archer"); break; case 6: str = str + instance.GetText("Hero_Job_Aid"); break; } string featureStr = string.Empty; for (int i = 0; i < dataByKey.JobFeature.Length; i++) { featureStr = GetFeatureStr((RES_HERO_JOB_FEATURE)dataByKey.JobFeature[i]); if (!string.IsNullOrEmpty(featureStr)) { str = string.Format("{0}/{1}", str, featureStr); } } } return(str); }
public void RefreshSymbolMakeForm() { CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CSymbolSystem.s_symbolFormPath); if (form != null) { CTextManager instance = Singleton <CTextManager> .GetInstance(); string[] titleList = new string[] { instance.GetText("Symbol_Prop_Tab_All"), instance.GetText("Symbol_Prop_Tab_Atk"), instance.GetText("Symbol_Prop_Tab_Hp"), instance.GetText("Symbol_Prop_Tab_Defense"), instance.GetText("Symbol_Prop_Tab_Function"), instance.GetText("Symbol_Prop_Tab_HpSteal"), instance.GetText("Symbol_Prop_Tab_AtkSpeed"), instance.GetText("Symbol_Prop_Tab_Crit"), instance.GetText("Symbol_Prop_Tab_Penetrate") }; CUICommonSystem.InitMenuPanel(form.GetWidget(4), titleList, (int)this.m_symbolFilterType); string[] strArray2 = new string[] { "1", "2", "3", "4", "5" }; CUICommonSystem.InitMenuPanel(form.GetWidget(5), strArray2, this.m_symbolFilterLevel - 1); this.m_symbolSys.SetSymbolData(); this.SetSymbolMakeListData(); this.RefreshSymbolMakeList(form); form.GetWidget(7).GetComponent <Text>().text = this.GetBreakExcessSymbolCoinCnt(0xffff).ToString(); } }
public static string GetHeroJob(uint heroId) { string str = string.Empty; ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(heroId); CTextManager instance = Singleton <CTextManager> .GetInstance(); if (dataByKey != null) { if (dataByKey.bMainJob > 0) { str = str + GetHeroJobStr((RES_HERO_JOB)dataByKey.bMainJob); } if (dataByKey.bMinorJob > 0) { str = string.Format("{0}/{1}", str, GetHeroJobStr((RES_HERO_JOB)dataByKey.bMinorJob)); } } return(str); }
public static string GetHeroJob(uint heroId) { string text = string.Empty; ResHeroCfgInfo dataByKey = GameDataMgr.heroDatabin.GetDataByKey(heroId); CTextManager instance = Singleton <CTextManager> .GetInstance(); if (dataByKey != null) { if (dataByKey.bMainJob > 0) { text += CHeroInfo.GetHeroJobStr(dataByKey.bMainJob); } if (dataByKey.bMinorJob > 0) { text = string.Format("{0}/{1}", text, CHeroInfo.GetHeroJobStr(dataByKey.bMinorJob)); } } return(text); }
private void SetHonorName(Transform labelTransform, COMDT_HONORINFO honorInfo) { if (labelTransform != null) { CTextManager instance = Singleton <CTextManager> .GetInstance(); Text component = labelTransform.GetComponent <Text>(); if (component != null) { switch (honorInfo.iHonorID) { case 1: component.set_text(instance.GetText("Player_Info_Honor_Name_MVP")); break; case 2: component.set_text(instance.GetText("Player_Info_Honor_Name_MAXDAMAGETOHERO")); break; case 3: component.set_text(instance.GetText("Player_Info_Honor_Name_MAXKILL")); break; case 4: component.set_text(instance.GetText("Player_Info_Honor_Name_MAXMONEY")); break; case 5: component.set_text(instance.GetText("Player_Info_Honor_Name_MAXASSIS")); break; case 6: component.set_text(instance.GetText("Player_Info_Honor_Name_MAXRECVDAMAGE")); break; default: component.set_text(string.Empty); break; } } } }
public static string GetFeatureStr(RES_HERO_JOB_FEATURE featureType) { string result = string.Empty; CTextManager instance = Singleton <CTextManager> .GetInstance(); switch (featureType) { case 1: result = instance.GetText("Hero_Job_Feature_Dash"); break; case 2: result = instance.GetText("Hero_Job_Feature_Control"); break; case 3: result = instance.GetText("Hero_Job_Feature_Active"); break; case 4: result = instance.GetText("Hero_Job_Feature_Slave"); break; case 5: result = instance.GetText("Hero_Job_Feature_Recover"); break; case 6: result = instance.GetText("Hero_Job_Feature_HpSteal"); break; case 7: result = instance.GetText("Hero_Job_Feature_Poke"); break; case 8: result = instance.GetText("Hero_Job_Feature_Buff"); break; } return(result); }
public bool TagInfo(ref string iconPath, ref string text, bool owned = false) { CTextManager instance = Singleton <CTextManager> .GetInstance(); if (owned) { iconPath = "UGUI/Sprite/Common/Product_New.prefab"; text = instance.GetText("Mall_Hero_State_Own"); return(true); } if (this.Owned(false)) { iconPath = null; text = null; return(false); } ResHeroPromotion resHeroPromotion = null; ResSkinPromotion resSkinPromotion = null; RES_LUCKYDRAW_ITEMTAG rES_LUCKYDRAW_ITEMTAG = this.TagType(ref resHeroPromotion, ref resSkinPromotion); string text2 = null; if (this.m_type == CMallItem.ItemType.Hero) { ResHeroShop heroShop = null; GameDataMgr.heroShopInfoDict.TryGetValue(this.m_heroData.heroCfgInfo.dwCfgID, ref heroShop); text2 = CMallSystem.GetRegisterSalesHeroDay(ref resHeroPromotion, heroShop); } else if (this.m_type == CMallItem.ItemType.Skin) { ResHeroSkinShop heroShop2 = null; GameDataMgr.skinShopInfoDict.TryGetValue(this.m_skinData.dwID, ref heroShop2); text2 = CMallSystem.GetRegisterSalesSkinDay(ref resSkinPromotion, heroShop2); } if (text2 != null) { iconPath = "UGUI/Sprite/Common/Product_Unusual.prefab"; text = text2; return(true); } switch (rES_LUCKYDRAW_ITEMTAG) { case 0: if (this.m_type == CMallItem.ItemType.Hero && this.m_heroData.heroCfgInfo.bTag == 1) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo == null) { iconPath = null; text = null; return(false); } if (GameDataMgr.svr2CltCfgDict.ContainsKey(24u)) { ResGlobalInfo resGlobalInfo = new ResGlobalInfo(); if (GameDataMgr.svr2CltCfgDict.TryGetValue(24u, ref resGlobalInfo)) { uint dwConfValue = resGlobalInfo.dwConfValue; if (masterRoleInfo.PvpLevel < dwConfValue) { iconPath = "UGUI/Sprite/Common/Hero_Newbie.prefab"; text = Singleton <CTextManager> .GetInstance().GetText("Hero_Tag_Newbie"); return(true); } } } } iconPath = null; text = null; return(false); case 1: { int num = 0; uint currentUTCTime = (uint)CRoleInfo.GetCurrentUTCTime(); CMallItem.ItemType type = this.m_type; if (type != CMallItem.ItemType.Hero) { if (type == CMallItem.ItemType.Skin) { if (resSkinPromotion == null) { iconPath = null; text = null; return(false); } if (resSkinPromotion.dwOnTimeGen > currentUTCTime) { num = (int)(resSkinPromotion.dwOffTimeGen - resSkinPromotion.dwOnTimeGen); } else { num = (int)(resSkinPromotion.dwOffTimeGen - currentUTCTime); } } } else { if (resHeroPromotion == null) { iconPath = null; text = null; return(false); } if (resHeroPromotion.dwOnTimeGen > currentUTCTime) { num = (int)(resHeroPromotion.dwOffTimeGen - resHeroPromotion.dwOnTimeGen); } else { num = (int)(resHeroPromotion.dwOffTimeGen - currentUTCTime); } } if (num <= 0) { iconPath = null; text = null; return(false); } int num2 = (int)Math.Ceiling((double)num / 86400.0); if (num2 > 0) { iconPath = "UGUI/Sprite/Common/Product_Unusual.prefab"; text = Singleton <CTextManager> .GetInstance().GetText("Mall_Promotion_Tag_1", new string[] { num2.ToString() }); return(true); } iconPath = null; text = null; return(false); } case 2: iconPath = "UGUI/Sprite/Common/Product_New.prefab"; text = Singleton <CTextManager> .GetInstance().GetText("Common_Tag_New"); return(true); case 3: iconPath = "UGUI/Sprite/Common/Product_Hot.prefab"; text = Singleton <CTextManager> .GetInstance().GetText("Common_Tag_Hot"); return(true); case 4: { float num3 = 100f; switch (this.m_type) { case CMallItem.ItemType.Hero: if (resHeroPromotion == null) { iconPath = null; text = null; return(false); } num3 = resHeroPromotion.dwDiscount / 10f; break; case CMallItem.ItemType.Skin: if (resSkinPromotion == null) { iconPath = null; text = null; return(false); } num3 = resSkinPromotion.dwDiscount / 10f; break; } iconPath = "UGUI/Sprite/Common/Product_Discount.prefab"; if (Math.Abs(num3 % 1f) < 1.401298E-45f) { text = string.Format("{0}折", ((int)num3).ToString("D")); } else { text = string.Format("{0}折", num3.ToString("0.0")); } return(true); } default: iconPath = null; text = null; return(false); } }
public void UpdateSelectedHonor(CUIFormScript form, COMDT_HONORINFO honorInfo) { CTextManager instance = Singleton <CTextManager> .GetInstance(); string text = instance.GetText("Player_Info_Honor_Btn_Using"); string text2 = instance.GetText("Player_Info_Honor_Btn_Use"); string text3 = instance.GetText("Player_Info_Honor_Btn_Browse"); GameObject widget = form.GetWidget(9); if (widget == null) { return; } Transform transform = form.transform.Find("pnlBg/pnlBody/pnlHonorInfo/pnlContainer/SelectedHonor/Button"); Button button = (transform == null) ? null : transform.GetComponent <Button>(); GameObject gameObject = Utility.FindChild(widget, "pnlHonorInfo/pnlContainer/SelectedHonor/CurrentHonor/normal"); GameObject gameObject2 = Utility.FindChild(widget, "pnlHonorInfo/pnlContainer/SelectedHonor/CurrentHonor/label"); GameObject gameObject3 = Utility.FindChild(widget, "pnlHonorInfo/pnlContainer/SelectedHonor/CurrentHonor/cnt"); GameObject gameObject4 = Utility.FindChild(widget, "pnlHonorInfo/pnlContainer/SelectedHonor/Text"); CPlayerProfile profile = Singleton <CPlayerInfoSystem> .GetInstance().GetProfile(); int selectedHonorId = profile.GetSelectedHonorId(); CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); bool flag = true; if (masterRoleInfo != null && masterRoleInfo.playerUllUID != profile.m_uuid) { flag = false; } if (honorInfo == null) { honorInfo = new COMDT_HONORINFO(); if (button != null) { CUICommonSystem.SetButtonEnableWithShader(button, false, true); CUICommonSystem.SetButtonName(transform.gameObject, text2); } if (gameObject != null) { this.SetHonorImage(gameObject.transform, honorInfo); } if (gameObject2 != null) { this.SetHonorName(gameObject2.transform, honorInfo); } if (gameObject3 != null) { this.SetHonorPoint(gameObject3.transform, honorInfo); } if (gameObject4 != null) { this.SetHonorDesc(gameObject4.transform, honorInfo); } if (!flag && button != null) { CUICommonSystem.SetButtonEnableWithShader(button, false, true); CUICommonSystem.SetButtonName(transform.gameObject, text3); return; } return; } else { if (gameObject != null) { this.SetHonorImage(gameObject.transform, honorInfo); } if (gameObject2 != null) { this.SetHonorName(gameObject2.transform, honorInfo); } if (gameObject3 != null) { this.SetHonorPoint(gameObject3.transform, honorInfo); } if (gameObject4 != null) { this.SetHonorDesc(gameObject4.transform, honorInfo); } if (!flag && button != null) { CUICommonSystem.SetButtonEnableWithShader(button, false, true); CUICommonSystem.SetButtonName(transform.gameObject, text3); return; } if (honorInfo.iHonorID == selectedHonorId && honorInfo.iHonorID != 0) { if (button != null) { CUICommonSystem.SetButtonEnableWithShader(button, false, true); CUICommonSystem.SetButtonName(transform.gameObject, text); } } else if (honorInfo.iHonorLevel <= 0) { if (button != null) { CUICommonSystem.SetButtonEnableWithShader(button, false, true); CUICommonSystem.SetButtonName(transform.gameObject, text2); } } else if (button != null) { CUICommonSystem.SetButtonEnableWithShader(button, true, true); CUICommonSystem.SetButtonName(transform.gameObject, text2); } return; } }
private string GetEquipPropertyValueDesc(ResEquipInBattle resEquipInBattle) { if (resEquipInBattle == null) { return(string.Empty); } CTextManager instance = Singleton <CTextManager> .GetInstance(); string str = string.Empty; if (resEquipInBattle.dwPhyAttack > 0) { str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwPhyAttack, instance.GetText("Hero_Prop_PhyAtkPt")); } if (resEquipInBattle.dwAttackSpeed > 0) { str = string.Format("{0}+{1}% {2}\n", str, resEquipInBattle.dwAttackSpeed / 100, instance.GetText("Hero_Prop_AtkSpd")); } if (resEquipInBattle.dwCriticalHit > 0) { str = string.Format("{0}+{1}% {2}\n", str, resEquipInBattle.dwCriticalHit / 100, instance.GetText("Hero_Prop_CritRate")); } if (resEquipInBattle.dwHealthSteal > 0) { str = string.Format("{0}+{1}% {2}\n", str, resEquipInBattle.dwHealthSteal / 100, instance.GetText("Hero_Prop_PhyVamp")); } if (resEquipInBattle.dwMagicAttack > 0) { str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwMagicAttack, instance.GetText("Hero_Prop_MgcAtkPt")); } if (resEquipInBattle.dwCDReduce > 0) { str = string.Format("{0}+{1}% {2}\n", str, resEquipInBattle.dwCDReduce / 100, instance.GetText("Hero_Prop_CdReduce")); } if (resEquipInBattle.dwMagicPoint > 0) { str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwMagicPoint, instance.GetText("Hero_Prop_MaxEp")); } if (resEquipInBattle.dwMagicRecover > 0) { str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwMagicRecover, instance.GetText("Hero_Prop_EpRecover")); } if (resEquipInBattle.dwPhyDefence > 0) { str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwPhyDefence, instance.GetText("Hero_Prop_PhyDefPt")); } if (resEquipInBattle.dwMagicDefence > 0) { str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwMagicDefence, instance.GetText("Hero_Prop_MgcDefPt")); } if (resEquipInBattle.dwHealthPoint > 0) { str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwHealthPoint, instance.GetText("Hero_Prop_MaxHp")); } if (resEquipInBattle.dwHealthRecover > 0) { str = string.Format("{0}+{1} {2}\n", str, resEquipInBattle.dwHealthRecover, instance.GetText("Hero_Prop_HpRecover")); } if (resEquipInBattle.dwMoveSpeed > 0) { str = string.Format("{0}+{1}% {2}\n", str, resEquipInBattle.dwMoveSpeed / 100, instance.GetText("Hero_Prop_MoveSpd")); } return(str); }
private void InitRelationCfg() { CTextManager instance = Singleton <CTextManager> .instance; RelationConfig relationConfig = new RelationConfig(); relationConfig.state = COM_INTIMACY_STATE.COM_INTIMACY_STATE_GAY; relationConfig.IntimRela_Tips_AlreadyHas = instance.GetText("IntimRela_Tips_AlreadyHasGay"); relationConfig.IntimRela_Type = instance.GetText("IntimRela_Type_Gay"); relationConfig.IntimRela_Tips_SendRequestSuccess = instance.GetText("IntimRela_Tips_SendRequestGaySuccess"); relationConfig.IntimRela_Tips_SendDelSuccess = instance.GetText("IntimRela_Tips_SendDelGaySuccess"); relationConfig.IntimRela_Tips_DenyYourRequest = instance.GetText("IntimRela_Tips_DenyYourRequestGay"); relationConfig.IntimRela_Tips_DenyYourDel = instance.GetText("IntimRela_Tips_DenyYourDelGay"); relationConfig.IntimRela_TypeColor = instance.GetText("IntimRela_TypeColor_Gay"); relationConfig.IntimRela_TypeColor_Prefix_Normal = instance.GetText("IntimRela_TypeColor_Gay_Prefix_Normal"); relationConfig.IntimRela_TypeColor_Prefix_Max = instance.GetText("IntimRela_TypeColor_Gay_Prefix_Max"); relationConfig.IntimacyShowLoad = instance.GetText("IntimacyShowLoadGay"); relationConfig.iconLevel_1 = "UGUI/Sprite/Dynamic/Friend/FriendNormal"; relationConfig.iconLevel_2 = "UGUI/Sprite/Dynamic/Friend/FriendHigh"; relationConfig.iconLevel_3 = "UGUI/Sprite/Dynamic/Friend/FriendMax"; this.m_RelationConfig.Add(relationConfig); relationConfig = new RelationConfig(); relationConfig.state = COM_INTIMACY_STATE.COM_INTIMACY_STATE_LOVER; relationConfig.IntimRela_Tips_AlreadyHas = instance.GetText("IntimRela_Tips_AlreadyHasLover"); relationConfig.IntimRela_Type = instance.GetText("IntimRela_Type_Lover"); relationConfig.IntimRela_Tips_SendRequestSuccess = instance.GetText("IntimRela_Tips_SendRequestLoverSuccess"); relationConfig.IntimRela_Tips_SendDelSuccess = instance.GetText("IntimRela_Tips_SendDelLoverSuccess"); relationConfig.IntimRela_Tips_DenyYourRequest = instance.GetText("IntimRela_Tips_DenyYourRequestLover"); relationConfig.IntimRela_Tips_DenyYourDel = instance.GetText("IntimRela_Tips_DenyYourDelLover"); relationConfig.IntimRela_TypeColor = instance.GetText("IntimRela_TypeColor_Lover"); relationConfig.IntimRela_TypeColor_Prefix_Normal = instance.GetText("IntimRela_TypeColor_Lover_Prefix_Normal"); relationConfig.IntimRela_TypeColor_Prefix_Max = instance.GetText("IntimRela_TypeColor_Lover_Prefix_Max"); relationConfig.IntimacyShowLoad = instance.GetText("IntimacyShowLoadLover"); relationConfig.iconLevel_1 = "UGUI/Sprite/Dynamic/Friend/LoverNormal"; relationConfig.iconLevel_2 = "UGUI/Sprite/Dynamic/Friend/LoverHigh"; relationConfig.iconLevel_3 = "UGUI/Sprite/Dynamic/Friend/LoverMax"; this.m_RelationConfig.Add(relationConfig); relationConfig = new RelationConfig(); relationConfig.state = COM_INTIMACY_STATE.COM_INTIMACY_STATE_SIDEKICK; relationConfig.IntimRela_Tips_AlreadyHas = instance.GetText("IntimRela_Tips_AlreadyHasSidekick"); relationConfig.IntimRela_Type = instance.GetText("IntimRela_Type_Sidekick"); relationConfig.IntimRela_Tips_SendRequestSuccess = instance.GetText("IntimRela_Tips_SendRequestSidekickSuccess"); relationConfig.IntimRela_Tips_SendDelSuccess = instance.GetText("IntimRela_Tips_SendDelSidekickSuccess"); relationConfig.IntimRela_Tips_DenyYourRequest = instance.GetText("IntimRela_Tips_DenyYourRequestSidekick"); relationConfig.IntimRela_Tips_DenyYourDel = instance.GetText("IntimRela_Tips_DenyYourDelSidekick"); relationConfig.IntimRela_TypeColor = instance.GetText("IntimRela_TypeColor_Sidekick"); relationConfig.IntimRela_TypeColor_Prefix_Normal = instance.GetText("IntimRela_TypeColor_Sidekick_Prefix_Normal"); relationConfig.IntimRela_TypeColor_Prefix_Max = instance.GetText("IntimRela_TypeColor_Sidekick_Prefix_Max"); relationConfig.IntimacyShowLoad = instance.GetText("IntimacyShowLoadSideKick"); relationConfig.iconLevel_1 = "UGUI/Sprite/Dynamic/Friend/SidekickNormal"; relationConfig.iconLevel_2 = "UGUI/Sprite/Dynamic/Friend/SidekickHigh"; relationConfig.iconLevel_3 = "UGUI/Sprite/Dynamic/Friend/SidekickMax"; this.m_RelationConfig.Add(relationConfig); relationConfig = new RelationConfig(); relationConfig.state = COM_INTIMACY_STATE.COM_INTIMACY_STATE_BESTIE; relationConfig.IntimRela_Tips_AlreadyHas = instance.GetText("IntimRela_Tips_AlreadyHasBesite"); relationConfig.IntimRela_Type = instance.GetText("IntimRela_Type_Besite"); relationConfig.IntimRela_Tips_SendRequestSuccess = instance.GetText("IntimRela_Tips_SendRequestBesiteSuccess"); relationConfig.IntimRela_Tips_SendDelSuccess = instance.GetText("IntimRela_Tips_SendDelBesiteSuccess"); relationConfig.IntimRela_Tips_DenyYourRequest = instance.GetText("IntimRela_Tips_DenyYourRequestBesite"); relationConfig.IntimRela_Tips_DenyYourDel = instance.GetText("IntimRela_Tips_DenyYourDelBesite"); relationConfig.IntimRela_TypeColor = instance.GetText("IntimRela_TypeColor_Besite"); relationConfig.IntimRela_TypeColor_Prefix_Normal = instance.GetText("IntimRela_TypeColor_Besite_Prefix_Normal"); relationConfig.IntimRela_TypeColor_Prefix_Max = instance.GetText("IntimRela_TypeColor_Besite_Prefix_Max"); relationConfig.IntimacyShowLoad = instance.GetText("IntimacyShowLoadBesite"); relationConfig.iconLevel_1 = "UGUI/Sprite/Dynamic/Friend/BesideNormal"; relationConfig.iconLevel_2 = "UGUI/Sprite/Dynamic/Friend/BesideHigh"; relationConfig.iconLevel_3 = "UGUI/Sprite/Dynamic/Friend/BesideMax"; this.m_RelationConfig.Add(relationConfig); }
public bool TagInfo(ref string iconPath, ref string text, bool owned = false) { float num; CTextManager instance = Singleton <CTextManager> .GetInstance(); if (owned) { iconPath = "UGUI/Sprite/Common/Product_New.prefab"; text = instance.GetText("Mall_Hero_State_Own"); return(true); } CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); DebugHelper.Assert(masterRoleInfo != null, "Master RoleInfo is null"); if (masterRoleInfo == null) { return(false); } ResHeroPromotion heroPromotion = null; ResSkinPromotion skinPromotion = null; switch (this.TagType(ref heroPromotion, ref skinPromotion)) { case RES_LUCKYDRAW_ITEMTAG.RES_LUCKYDRAW_ITEMTAG_NONE: iconPath = null; text = null; return(false); case RES_LUCKYDRAW_ITEMTAG.RES_LUCKYDRAW_ITEMTAG_UNUSUAL: { int num2 = 0; uint num3 = (uint)masterRoleInfo.getCurrentTimeSinceLogin(); switch (this.m_type) { case ItemType.Hero: if (heroPromotion == null) { iconPath = null; text = null; return(false); } if (heroPromotion.dwOnTimeGen > num3) { num2 = (int)(heroPromotion.dwOffTimeGen - heroPromotion.dwOnTimeGen); } else { num2 = (int)(heroPromotion.dwOffTimeGen - num3); } break; case ItemType.Skin: if (skinPromotion == null) { iconPath = null; text = null; return(false); } if (skinPromotion.dwOnTimeGen > num3) { num2 = (int)(skinPromotion.dwOffTimeGen - skinPromotion.dwOnTimeGen); } else { num2 = (int)(skinPromotion.dwOffTimeGen - num3); } break; } if (num2 > 0) { int num4 = (int)Math.Ceiling(((double)num2) / 86400.0); if (num4 > 0) { iconPath = "UGUI/Sprite/Common/Product_Unusual.prefab"; string[] args = new string[] { num4.ToString() }; text = Singleton <CTextManager> .GetInstance().GetText("Mall_Promotion_Tag_1", args); return(true); } iconPath = null; text = null; return(false); } iconPath = null; text = null; return(false); } case RES_LUCKYDRAW_ITEMTAG.RES_LUCKYDRAW_ITEMTAG_NEW: iconPath = "UGUI/Sprite/Common/Product_New.prefab"; text = Singleton <CTextManager> .GetInstance().GetText("Common_Tag_New"); return(true); case RES_LUCKYDRAW_ITEMTAG.RES_LUCKYDRAW_ITEMTAG_HOT: iconPath = "UGUI/Sprite/Common/Product_Hot.prefab"; text = Singleton <CTextManager> .GetInstance().GetText("Common_Tag_Hot"); return(true); case RES_LUCKYDRAW_ITEMTAG.RES_LUCKYDRAW_ITEMTAG_DISCOUNT: num = 100f; switch (this.m_type) { case ItemType.Hero: if (heroPromotion == null) { iconPath = null; text = null; return(false); } num = ((float)heroPromotion.dwDiscount) / 10f; goto Label_00F4; case ItemType.Skin: if (skinPromotion == null) { iconPath = null; text = null; return(false); } num = ((float)skinPromotion.dwDiscount) / 10f; goto Label_00F4; } break; default: iconPath = null; text = null; return(false); } Label_00F4: iconPath = "UGUI/Sprite/Common/Product_Discount.prefab"; if (Math.Abs((float)(num % 1f)) < float.Epsilon) { text = string.Format("{0}折", ((int)num).ToString("D")); } else { text = string.Format("{0}折", num.ToString("0.0")); } return(true); }