コード例 #1
0
 /// <summary>
 /// 获取鼓舞数据
 /// </summary>
 /// <param name="type"></param>
 /// <param name="count">第几次</param>
 /// <param name="db"></param>
 /// <returns></returns>
 public bool TryGetInspireDB(InspireType type, int count, out table.InspireDataBase db)
 {
     db = GameTableManager.Instance.GetTableItem <table.InspireDataBase>((uint)type, count);
     if (null == db)
     {
         return(false);
     }
     return(true);
 }
コード例 #2
0
 /// <summary>
 /// 计算鼓舞buff叠加值
 /// </summary>
 public void CaculateInspirePileValue()
 {
     curInspirePileValue = 0;
     if (null != curInspireData)
     {
         Dictionary <InspireType, LocalInspireData> .Enumerator enu = curInspireData.GetEnumerator();
         int count = 0;
         table.InspireDataBase db = null;
         while (enu.MoveNext())
         {
             count = (int)enu.Current.Value.MaxTimes - (int)enu.Current.Value.LeftTimes;
             if (!TryGetInspireDB(enu.Current.Key, count, out db))
             {
                 continue;
             }
             curInspirePileValue += db.addBufferValue;
         }
     }
 }
コード例 #3
0
 /// <summary>
 /// 获取最大鼓舞次数
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public int GetInspireMax(InspireType type)
 {
     table.InspireDataBase inspireDB = null;
     if (type == InspireType.InspireType_Coin)
     {
         if (goldInspireMax == -1)
         {
             inspireDB = GameTableManager.Instance.GetTableItem <table.InspireDataBase>((uint)type, 1);
             if (null != inspireDB)
             {
                 goldInspireMax = (int)inspireDB.maxInspireTimes;
             }
             else
             {
                 goldInspireMax = 0;
             }
         }
         return(goldInspireMax);
     }
     else if (type == InspireType.InspireType_Money)
     {
         if (bYuanInspiremax == -1)
         {
             inspireDB = GameTableManager.Instance.GetTableItem <table.InspireDataBase>((uint)type, 1);
             if (null != inspireDB)
             {
                 bYuanInspiremax = (int)inspireDB.maxInspireTimes;
             }
             else
             {
                 bYuanInspiremax = 0;
             }
         }
         return(bYuanInspiremax);
     }
     return(0);
 }