public static bool IsSkinExChangeCoupons(uint itemID) { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(0x87); DebugHelper.Assert(dataByKey != null, "global cfg databin err: skin exchange coupons id doesnt exist"); return(itemID == dataByKey.dwConfValue); }
public static bool NeedShowWhenLogin() { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo(); if (masterRoleInfo != null) { string key = string.Format("{0}_{1}", "TODAY_LOGIN_SHOW_ACTIVITY_CNT", masterRoleInfo.playerUllUID); if (masterRoleInfo.bFirstLoginToday) { PlayerPrefs.SetInt(key, 0); } uint @int = (uint)PlayerPrefs.GetInt(key, 0); if ((GameDataMgr.svr2CltCfgDict != null) && GameDataMgr.svr2CltCfgDict.ContainsKey(0)) { uint dwConfValue = 0; ResGlobalInfo info2 = new ResGlobalInfo(); if (GameDataMgr.svr2CltCfgDict.TryGetValue(0, out info2)) { dwConfValue = info2.dwConfValue; } if (@int >= dwConfValue) { return(false); } } } return(true); }
private void SetReplayKitGlobalCfg() { if (GameDataMgr.svr2CltCfgDict != null) { if (GameDataMgr.svr2CltCfgDict.ContainsKey(6u)) { ResGlobalInfo resGlobalInfo = new ResGlobalInfo(); if (GameDataMgr.svr2CltCfgDict.TryGetValue(6u, ref resGlobalInfo)) { this.m_enable = (resGlobalInfo.dwConfValue > 0u); } } if (GameDataMgr.svr2CltCfgDict.ContainsKey(7u)) { ResGlobalInfo resGlobalInfo2 = new ResGlobalInfo(); if (GameDataMgr.svr2CltCfgDict.TryGetValue(7u, ref resGlobalInfo2)) { this.MIN_SPACE_LIMIT = resGlobalInfo2.dwConfValue; } } if (GameDataMgr.svr2CltCfgDict.ContainsKey(8u)) { ResGlobalInfo resGlobalInfo3 = new ResGlobalInfo(); if (GameDataMgr.svr2CltCfgDict.TryGetValue(8u, ref resGlobalInfo3)) { this.WARNING_SPACE_LIMIT = resGlobalInfo3.dwConfValue; } } } }
public void ExecPauseCommand(byte pauseCommand, byte pauseByCamp, byte[] campPauseTimes) { bool flag = pauseCommand == 1; if (Singleton <WatchController> .GetInstance().IsWatching) { Singleton <WatchController> .GetInstance().IsRunning = !flag; } else { Singleton <FrameSynchr> .GetInstance().SetSynchrRunning(!flag); Singleton <FrameSynchr> .GetInstance().ResetStartTime(); } if (this._root) { this._root.CustomSetActive(flag); if (flag) { Singleton <CBattleSystem> .GetInstance().ClosePopupForms(); this._pauseNode.CustomSetActive(true); this._resumeNode.CustomSetActive(false); COM_PLAYERCAMP cOM_PLAYERCAMP = Singleton <WatchController> .GetInstance().IsWatching ? COM_PLAYERCAMP.COM_PLAYERCAMP_MID : Singleton <GamePlayerCenter> .GetInstance().hostPlayerCamp; this._pauseCampTxt.set_text(Singleton <CTextManager> .GetInstance().GetText(string.Format("PauseTips_{0}Look{1}", (int)cOM_PLAYERCAMP, (int)pauseByCamp))); this._passedSecond = 0; if ((COM_PLAYERCAMP)pauseByCamp == cOM_PLAYERCAMP) { this._waitResumeSecond = 0; } else { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(242u); this._waitResumeSecond = (int)((dataByKey != null) ? dataByKey.dwConfValue : 60u); } this.ValidateTimerState(); if (cOM_PLAYERCAMP != COM_PLAYERCAMP.COM_PLAYERCAMP_MID) { this._remainNode.CustomSetActive(true); SLevelContext curLvelContext = Singleton <BattleLogic> .GetInstance().GetCurLvelContext(); int num = curLvelContext.m_pvpPlayerNum / 2 * (int)this.MaxAllowTimes; this._remainTimesTxt.set_text((num - (int)campPauseTimes[(int)cOM_PLAYERCAMP]).ToString()); } else { this._remainNode.CustomSetActive(false); } if (this._pauseTimer == 0) { this._pauseTimer = Singleton <CTimerManager> .GetInstance().AddTimer(1000, -1, new CTimer.OnTimeUpHandler(this.OnPauseTimer), false); } } else { Singleton <CTimerManager> .GetInstance().RemoveTimerSafely(ref this._pauseTimer); } } }
public bool IsUseBpMode(byte RankShowGrade) { byte bLogicGrade = CLadderSystem.GetGradeDataByShowGrade((int)RankShowGrade).bLogicGrade; ResGlobalInfo resGlobalInfo = null; return(GameDataMgr.svr2CltCfgDict != null && GameDataMgr.svr2CltCfgDict.TryGetValue(14u, out resGlobalInfo) && resGlobalInfo != null && bLogicGrade >= CLadderSystem.GetGradeDataByShowGrade((int)resGlobalInfo.dwConfValue).bLogicGrade); }
public bool IsShowButtonIn5() { bool result = false; ResGlobalInfo resGlobalInfo = new ResGlobalInfo(); if (GameDataMgr.svr2CltCfgDict.TryGetValue(21u, out resGlobalInfo)) { result = (resGlobalInfo.dwConfValue > 0u); } return(result); }
public static int QuerySoldierSightRadius() { if (Horizon.soldierSightRadius == 0 && GameDataMgr.globalInfoDatabin != null) { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(257u); if (dataByKey != null) { Horizon.soldierSightRadius = (int)dataByKey.dwConfValue; } } return Horizon.soldierSightRadius; }
public static int QueryAttackShowMarkDuration() { if (Horizon.showmarkDurationHero == 0 && GameDataMgr.globalInfoDatabin != null) { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(267u); if (dataByKey != null) { Horizon.showmarkDurationHero = (int)dataByKey.dwConfValue; } } return Horizon.showmarkDurationHero; }
private void InitHeroPanel() { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(7u); this.CreateHeroPreview(dataByKey.dwConfValue, 0); ResGlobalInfo dataByKey2 = GameDataMgr.globalInfoDatabin.GetDataByKey(8u); this.CreateHeroPreview(dataByKey2.dwConfValue, 1); ResGlobalInfo dataByKey3 = GameDataMgr.globalInfoDatabin.GetDataByKey(9u); this.CreateHeroPreview(dataByKey3.dwConfValue, 2); }
public static int QueryMainActorFakeSightRadius() { if (Horizon.fakeSightRadius == 0 && GameDataMgr.globalInfoDatabin != null) { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(246u); if (dataByKey != null) { Horizon.fakeSightRadius = (int)dataByKey.dwConfValue; } } return(Horizon.fakeSightRadius); }
public static int QueryExposeDurationNormal() { if (Horizon.exposeDurationNormal == 0 && GameDataMgr.globalInfoDatabin != null) { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(223u); if (dataByKey != null) { Horizon.exposeDurationNormal = (int)dataByKey.dwConfValue; } } return Horizon.exposeDurationNormal; }
private void InitHeroPanel() { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey((uint)7); this.CreateHeroPreview(dataByKey.dwConfValue, 0); ResGlobalInfo info2 = GameDataMgr.globalInfoDatabin.GetDataByKey((uint)8); this.CreateHeroPreview(info2.dwConfValue, 1); ResGlobalInfo info3 = GameDataMgr.globalInfoDatabin.GetDataByKey((uint)9); this.CreateHeroPreview(info3.dwConfValue, 2); }
public static int QueryExposeRadius() { if (Horizon.exposeRadius == 0 && GameDataMgr.globalInfoDatabin != null) { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(222u); if (dataByKey != null) { Horizon.exposeRadius = (int)dataByKey.dwConfValue; } } return Horizon.exposeRadius; }
public static bool EnableHeroVictoryTips() { bool flag = false; ResGlobalInfo info = null; GameDataMgr.svr2CltCfgDict.TryGetValue(9, out info); if (info != null) { flag = Convert.ToBoolean(info.dwConfValue); } return(flag); }
public static int QueryGlobalSight() { if (Horizon._globalSight == 0 && GameDataMgr.globalInfoDatabin != null) { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(56u); if (dataByKey != null) { Horizon._globalSight = (int)dataByKey.dwConfValue; Horizon.GlobalSightSqr_ = Horizon._globalSight * Horizon._globalSight; } } return Horizon._globalSight; }
public bool GetRecorderGlobalCfgEnableFlag() { bool result = false; if (GameDataMgr.svr2CltCfgDict != null && GameDataMgr.svr2CltCfgDict.ContainsKey(12u)) { ResGlobalInfo resGlobalInfo = new ResGlobalInfo(); if (GameDataMgr.svr2CltCfgDict.TryGetValue(12u, ref resGlobalInfo)) { result = (resGlobalInfo.dwConfValue > 0u); } } return(result); }
public void InitReport() { this.ClearReport(); if (this.sendReportTimer != -1) { Singleton <CTimerManager> .instance.RemoveTimer(this.sendReportTimer); } this.sendReportTimer = -1; ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(136u); DebugHelper.Assert(dataByKey != null, "--- 分享统计上报时间间隔 找不到对应的配置项, 请检查..."); this.sendReportTimer = Singleton <CTimerManager> .instance.AddTimer((int)(dataByKey.dwConfValue * 1000u), 0, new CTimer.OnTimeUpHandler(this.OnReportTimerEnd)); Singleton <CTimerManager> .instance.ResumeTimer(this.sendReportTimer); }
public int Get_ResetNum(BurnExpeditionModel.EDifficultyType type) { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(43u); if (dataByKey == null) { return(0); } int dwConfValue = (int)dataByKey.dwConfValue; if (this._getLevelDetail(type) == null) { return(0); } return(dwConfValue - (int)this._getLevelDetail(type).bResetNum); }
public int Get_ResetNum(EDifficultyType type) { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey((uint)0x2b); if (dataByKey == null) { return(0); } int dwConfValue = (int)dataByKey.dwConfValue; if (this._getLevelDetail(type) == null) { return(0); } return(dwConfValue - this._getLevelDetail(type).bResetNum); }
private void ShowMonthWeekCardExpireTips(CTask task, bool isMonthCard) { uint num = (!isMonthCard) ? Singleton <CTaskSys> .get_instance().weekCardExpireTime : Singleton <CTaskSys> .get_instance().monthCardExpireTime; uint currentUTCTime = (uint)CRoleInfo.GetCurrentUTCTime(); int num2 = Mathf.CeilToInt(((num <= currentUTCTime) ? 0f : (num - currentUTCTime)) / 86400f); if (task.m_taskState == 3 && num2 > 0) { num2--; } if (isMonthCard) { ResGlobalInfo resGlobalInfo = null; if (GameDataMgr.svr2CltCfgDict.TryGetValue(22u, ref resGlobalInfo)) { stUIEventParams param = default(stUIEventParams); param.tag2 = (int)GameDataMgr.globalInfoDatabin.GetDataByKey(292u).dwConfValue; if (num2 == 0) { Singleton <CUIManager> .GetInstance().OpenMessageBoxWithCancel(Singleton <CTextManager> .GetInstance().GetText("MonthCardExpireTips2"), enUIEventID.Mall_Open_Factory_Shop_Tab, enUIEventID.None, param, "立即续费", "暂不续费", false); } else if ((long)num2 <= (long)((ulong)resGlobalInfo.dwConfValue)) { Singleton <CUIManager> .GetInstance().OpenMessageBoxWithCancel(Singleton <CTextManager> .GetInstance().GetText("MonthCardExpireTips1"), enUIEventID.Mall_Open_Factory_Shop_Tab, enUIEventID.None, param, "立即续费", "暂不续费", false); } } } else { ResGlobalInfo resGlobalInfo2 = null; if (GameDataMgr.svr2CltCfgDict.TryGetValue(23u, ref resGlobalInfo2)) { stUIEventParams param2 = default(stUIEventParams); param2.tag2 = (int)GameDataMgr.globalInfoDatabin.GetDataByKey(293u).dwConfValue; if (num2 == 0) { Singleton <CUIManager> .GetInstance().OpenMessageBoxWithCancel(Singleton <CTextManager> .GetInstance().GetText("WeekCardExpireTips2"), enUIEventID.Mall_Open_Factory_Shop_Tab, enUIEventID.None, param2, "立即续费", "暂不续费", false); } else if ((long)num2 <= (long)((ulong)resGlobalInfo2.dwConfValue)) { Singleton <CUIManager> .GetInstance().OpenMessageBoxWithCancel(Singleton <CTextManager> .GetInstance().GetText("WeekCardExpireTips1"), enUIEventID.Mall_Open_Factory_Shop_Tab, enUIEventID.None, param2, "立即续费", "暂不续费", false); } } } }
public static int QueryExposeDurationNormal() { if (exposeDurationNormal == 0) { if (GameDataMgr.globalInfoDatabin != null) { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey((uint)0xdf); if (dataByKey != null) { exposeDurationNormal = (int)dataByKey.dwConfValue; } } if (exposeDurationNormal == 0) { exposeDurationNormal = 0x1388; } } return(exposeDurationNormal); }
public static uint QueryGlobalSight() { if (_globalSight == 0) { if (GameDataMgr.globalInfoDatabin != null) { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey((uint)0x38); if (dataByKey != null) { _globalSight = dataByKey.dwConfValue; } } if (_globalSight == 0) { _globalSight = 0x2710; } } return(_globalSight); }
public static int QueryExposeRadius() { if (exposeRadius == 0) { if (GameDataMgr.globalInfoDatabin != null) { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey((uint)0xde); if (dataByKey != null) { exposeRadius = (int)dataByKey.dwConfValue; } } if (exposeRadius == 0) { exposeRadius = 0x1388; } } return(exposeRadius); }
private void InitBaseValue() { if (this.m_initedBaseValue) { return; } ResGlobalInfo resGlobalInfo = null; GameDataMgr.svr2CltCfgDict.TryGetValue(16u, out resGlobalInfo); if (resGlobalInfo == null) { return; } this.m_baseValueKDA = resGlobalInfo.dwConfValue; GameDataMgr.svr2CltCfgDict.TryGetValue(17u, out resGlobalInfo); if (resGlobalInfo == null) { return; } this.m_baseValueGold = resGlobalInfo.dwConfValue; GameDataMgr.svr2CltCfgDict.TryGetValue(18u, out resGlobalInfo); if (resGlobalInfo == null) { return; } this.m_baseValueBattle = resGlobalInfo.dwConfValue; GameDataMgr.svr2CltCfgDict.TryGetValue(19u, out resGlobalInfo); if (resGlobalInfo == null) { return; } this.m_baseValueAlive = resGlobalInfo.dwConfValue; GameDataMgr.svr2CltCfgDict.TryGetValue(20u, out resGlobalInfo); if (resGlobalInfo == null) { return; } this.m_baseValueHurtHero = resGlobalInfo.dwConfValue; this.m_initedBaseValue = true; }
public bool StartObserve(COMDT_TGWINFO inTGW) { if (this.IsWatching || Singleton <BattleLogic> .instance.isRuning) { return(false); } this._workMode = WatchController.WorkMode.Observe; this._overTime = 0f; this.FightOverJust = false; this.IsRunning = true; this.SpeedRate = 1; this._recvBuff = new byte[409600]; this._buffRecvSize = 0u; this._totalRecvSize = 0u; this._pkgQueue = new Queue <object>(1000); this._maxFrameNo = 0u; this._isStreamEnd = false; this._thisTick = 0u; this._lastRequestTick = 0u; ResGlobalInfo resGlobalInfo = new ResGlobalInfo(); if (GameDataMgr.svr2CltCfgDict.TryGetValue(215u, out resGlobalInfo)) { this._observeDelayFrames = (uint)Mathf.Clamp((int)(resGlobalInfo.dwConfValue * 1000u / Singleton <FrameSynchr> .GetInstance().SvrFrameDelta), 0, 4500); } else { this._observeDelayFrames = 900u; } this._tgw = inTGW; if (this._tgw != null) { NetworkModule.InitRelayConnnecting(this._tgw); } this.RequestVideoPiece(true); return(true); }
public int GetBeiZhaoMuZhe_RewardExp() { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(306u); return((int)((dataByKey != null) ? (dataByKey.dwConfValue / 100u) : 4294967295u)); }
public int GetBeiZhaoMuZhe_RewardGold() { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(307u); return((int)((dataByKey == null) ? 4294967295u : (dataByKey.dwConfValue / 100u))); }
private void OpenApplyClosePwdForm(CUIEvent uiEvent) { if (this.EnableStatus == PwdStatus.Disable) { return; } CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CSecurePwdSystem.sApplyClosePwdFormPath, false, true); if (cUIFormScript == null) { DebugHelper.Assert(false, "Apply Close Pwd Form Is Null"); return; } Transform transform = cUIFormScript.transform.Find("pnlBg/Panel_Main/LeftTime"); Transform transform2 = cUIFormScript.transform.Find("pnlBg/Panel_Main/Button"); Transform transform3 = cUIFormScript.transform.Find("pnlBg/Panel_Main/Desc"); if (transform == null) { DebugHelper.Assert(false, "SecurePwdSys left time trans is null"); return; } if (transform2 == null) { DebugHelper.Assert(false, "SecurePwdSys op btn trans is null"); return; } if (transform3 == null) { DebugHelper.Assert(false, "SecurePwdSys desc trans is null"); return; } Text component = transform3.GetComponent <Text>(); if (component != null && GameDataMgr.svr2CltCfgDict.ContainsKey(13u)) { ResGlobalInfo resGlobalInfo = new ResGlobalInfo(); if (GameDataMgr.svr2CltCfgDict.TryGetValue(13u, ref resGlobalInfo)) { float num = resGlobalInfo.dwConfValue; float num2 = num / 86000f; component.text = string.Format(Singleton <CTextManager> .GetInstance().GetText("SecurePwd_Force_Close_Desc"), num2.ToString("F0")); } } PwdCloseStatus closeStatus = this.CloseStatus; if (closeStatus != PwdCloseStatus.Open) { if (closeStatus == PwdCloseStatus.Close) { transform.gameObject.CustomSetActive(false); CUIEventScript component2 = transform2.GetComponent <CUIEventScript>(); if (component2 != null) { component2.SetUIEvent(enUIEventType.Up, enUIEventID.SecurePwd_OnApplyClose); } Text componetInChild = Utility.GetComponetInChild <Text>(transform2.gameObject, "Text"); if (componetInChild != null) { componetInChild.text = Singleton <CTextManager> .GetInstance().GetText("SecurePwd_Force_Close_Btn"); } } } else { transform.gameObject.CustomSetActive(true); CUITimerScript component3 = transform.Find("Timer").GetComponent <CUITimerScript>(); if (component3 == null) { DebugHelper.Assert(false, "SecurePwdSys left timer is null"); return; } DateTime dateTime = Utility.ToUtcTime2Local((long)CRoleInfo.GetCurrentUTCTime()); TimeSpan timeSpan = Utility.ToUtcTime2Local((long)((ulong)this.m_CloseTime)) - dateTime; if (timeSpan.get_TotalSeconds() > 0.0) { component3.SetTotalTime((float)timeSpan.get_TotalSeconds()); component3.ReStartTimer(); CUIEventScript component4 = transform2.GetComponent <CUIEventScript>(); if (component4 != null) { component4.SetUIEvent(enUIEventType.Up, enUIEventID.SecurePwd_OnCancelApplyClose); } Text componetInChild2 = Utility.GetComponetInChild <Text>(transform2.gameObject, "Text"); if (componetInChild2 != null) { componetInChild2.text = Singleton <CTextManager> .GetInstance().GetText("SecurePwd_Cancel_Force_Close_Btn"); } } else { this.EnableStatus = PwdStatus.Disable; this.CloseStatus = PwdCloseStatus.Close; this.CloseTime = 0u; Singleton <CUIManager> .GetInstance().CloseForm(CSecurePwdSystem.sApplyClosePwdFormPath); Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.SECURE_PWD_STATUS_CHANGE); } } }
public static bool IsSuperKing(byte rankGrade, uint rankClass) { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey(205u); return(dataByKey != null && (int)CLadderSystem.GetGradeDataByShowGrade((int)rankGrade).bLogicGrade == CLadderSystem.MAX_RANK_LEVEL && 0u < rankClass && rankClass <= dataByKey.dwConfValue); }
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); } }