コード例 #1
0
        /// <summary>
        /// 初始化英雄信息配置
        /// </summary>
        /// <param name="strDefaultViewConfigPath"></param>
        private void InitAboutDetailedPropertyInfo(string strDefaultViewConfigPath)
        {
            string strDetailedPropertyInfoPath = strDefaultViewConfigPath + MobaSchemesConfig.DETAILED_PROPERTY_INFO;

            ScpReader DetailedPropertyInfoReader = new ScpReader(strDetailedPropertyInfoPath, true, 2);

            DetailedPropertyInfoTable = new Hashtable();
            int PropertyID = 0;

            for (int i = 0; i < DetailedPropertyInfoReader.GetRecordCount(); i++)
            {
                MobaDetatiledPropertyInfo PropertyInfo = new MobaDetatiledPropertyInfo();
                PropertyID = DetailedPropertyInfoReader.GetInt(i, (int)EMobaDetailedPropertyInfo.EMDPIR_PropertyID, -1);
                if (PropertyID == -1)
                {
                    continue;
                }
                PropertyInfo.PropertyName = DetailedPropertyInfoReader.GetString(i, (int)EMobaDetailedPropertyInfo.EMDPIR_PropertyName, "");
                PropertyInfo.PropertyDes  = DetailedPropertyInfoReader.GetString(i, (int)EMobaDetailedPropertyInfo.EMDPIR_PropertyDes, "");

                UBB.toHtml(ref PropertyInfo.PropertyDes);

                DetailedPropertyInfoTable.Add(PropertyID, PropertyInfo);
            }
        }
コード例 #2
0
 /// <summary>
 /// 根据属性ID获取对应的属性描述
 /// </summary>
 /// <param name="_propertyID"></param>
 /// <returns></returns>
 public string GetDetailedPropertyDes(int _propertyID)
 {
     if (DetailedPropertyInfoTable.ContainsKey(_propertyID))
     {
         MobaDetatiledPropertyInfo property = DetailedPropertyInfoTable[_propertyID] as MobaDetatiledPropertyInfo;
         return(property.PropertyDes);
     }
     return("");
 }