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); } }