/// <summary> /// 获取游戏倍率 /// </summary> /// <param name="eType">倍率类型</param> /// <returns></returns> public static float GetRate(eRateType eType) { float rate = 1; m_lock.AcquireReaderLock(Timeout.Infinite); try { RateInfo _RateInfo = GetRateInfoWithType((int)eType); if (_RateInfo == null) { return rate; } if (_RateInfo.Rate == 0) { return 1; } if (IsValid(_RateInfo)) { rate = _RateInfo.Rate; } } catch { } finally { m_lock.ReleaseReaderLock(); } return rate; }
public static float GetRate(eRateType eType) { float rate = 1f; RateMgr.m_lock.AcquireReaderLock(-1); float result; try { RateInfo _RateInfo = RateMgr.GetRateInfoWithType((int)eType); if (_RateInfo == null) { result = rate; return(result); } if (_RateInfo.Rate == 0f) { result = 1f; return(result); } if (RateMgr.IsValid(_RateInfo)) { rate = _RateInfo.Rate; } } catch { } finally { RateMgr.m_lock.ReleaseReaderLock(); } result = rate; return(result); }
public static float GetRate(eRateType eType) { float num = 1f; RateMgr.m_lock.AcquireReaderLock(15000); try { RateInfo rateInfoWithType = RateMgr.GetRateInfoWithType((int)eType); if (rateInfoWithType == null) { float result = num; return(result); } if (rateInfoWithType.Rate == 0f) { float result = 1f; return(result); } if (RateMgr.IsValid(rateInfoWithType)) { num = rateInfoWithType.Rate; } } catch { } finally { RateMgr.m_lock.ReleaseReaderLock(); } return(num); }
/// <summary> /// 获取游戏倍率 /// </summary> /// <param name="eType">倍率类型</param> /// <returns></returns> public static float GetRate(eRateType eType) { float rate = 1; m_lock.AcquireReaderLock(Timeout.Infinite); try { RateInfo _RateInfo = GetRateInfoWithType((int)eType); if (_RateInfo == null) { return(rate); } if (_RateInfo.Rate == 0) { return(1); } if (IsValid(_RateInfo)) { rate = _RateInfo.Rate; } } catch { } finally { m_lock.ReleaseReaderLock(); } return(rate); }
public RateType(string s) { try { _ratetype = (eRateType)Enum.Parse(typeof(eRateType), s, true); } catch { _ratetype = eRateType.None; } }
public static float GetRate(GamePlayer player, eRateType eType) { float result; if (eType == eRateType.Auncher_Experience_Rate || eType == eRateType.Auncher_Offer_Rate || eType == eRateType.Auncher_Riches_Rate) { if (player.ClientType != eClientType.Auncher) { result = 1f; return(result); } } result = RateMgr.GetRate(eType); return(result); }
public RateType(eRateType r) { _ratetype = r; }
public RateType() { _ratetype = eRateType.None; }