Ejemplo n.º 1
0
        // 初始化csv表
        protected void InitRunePageCsv(string stPath)
        {
            // string stSchemeAllText = File.ReadAllText(stPath);
            ScpReader reader = new ScpReader(stPath, true, 2);

            allRunePageTable = new Hashtable();
            aRuneArray       = new int[DefaultTypeCount, DefaultLevelCount, DefaultSameLevelCount]; // 目前写死
            for (int i = 0; i < reader.GetRecordCount(); i++)
            {
                SSchemeRuneConfig sConfig = new SSchemeRuneConfig();
                sConfig.nId                    = reader.GetInt(i, (int)Rune.EMT_ID, 0);
                sConfig.szRuneName             = reader.GetString(i, (int)Rune.EMT_NAME, "");
                sConfig.nRuneIconId            = reader.GetInt(i, (int)Rune.EMT_ICONID, 0);
                sConfig.nExclusiveId           = reader.GetInt(i, (int)Rune.EMT_EXCLUSIVEID, 0);
                sConfig.nRuneInlayType         = reader.GetInt(i, (int)Rune.EMT_INLAYTYPE, 0);
                sConfig.nRunePropertyType      = reader.GetInt(i, (int)Rune.EMT_PROPERTYTYPE, 0);
                sConfig.nRuneLevel             = reader.GetInt(i, (int)Rune.EMT_LEVEL, 0);
                sConfig.szRuneDESC             = reader.GetString(i, (int)Rune.EMT_DESC, "");
                sConfig.szEffectIdArray        = reader.GetString(i, (int)Rune.EMT_EFFECTIDARRAY, "");
                sConfig.szParametersValueArray = reader.GetString(i, (int)Rune.EMT_EFFECTPARAMETERS, "");
                sConfig.nPropertyNameType      = reader.GetInt(i, (int)Rune.EMT_PROPERTYNAMETYPE, 0);

                if (sConfig.nId == 0)
                {
                    continue;
                }

                allRunePageTable[sConfig.nId] = sConfig;
            }
        }
Ejemplo n.º 2
0
 // 根据id获得符文的信息
 public void GetRuneInfo(int nRuneId, ref SSchemeRuneConfig sRunePage)
 {
     if (!IsHasRuneInfo(nRuneId, ref sRunePage))
     {
         Trace.LogWarning("没有找到id为:" + nRuneId + "的符文");
         sRunePage = null;
     }
 }
Ejemplo n.º 3
0
 public int GetSingleRuneType(int nRuneId)
 {
     if (allRunePageTable.ContainsKey(nRuneId))
     {
         SSchemeRuneConfig RuneConfig = allRunePageTable[nRuneId] as SSchemeRuneConfig;
         return(RuneConfig.nRuneInlayType);
     }
     return(0);
 }
Ejemplo n.º 4
0
        // 判断是否有该id的符文信息
        private bool IsHasRuneInfo(int nRuneId, ref SSchemeRuneConfig sRunePage)
        {
            bool res = false;

            if (allRunePageTable.ContainsKey(nRuneId))
            {
                sRunePage = allRunePageTable[nRuneId] as SSchemeRuneConfig;
                res       = true;
            }
            return(res);
        }