Esempio n. 1
0
    // 先從資料表讀進來
    void LoadFromFile()
    {
        // 清掉設定檔
        m_dictConfigMap.Clear();
        string      strTableName = "config";
        StaticTable Table        = StaticTableMgr.ReadTable(strTableName);
        // 一個一個值讀進來
        List <string> listKey = Table.GetKeys();

        foreach (var Key in listKey)
        {
            string strKey   = Table.Get(Key, "ID");
            string strValue = Table.Get(Key, "Value");
            m_dictConfigMap[strKey] = strValue;
        }
        // 把 Cache 給清掉
        StaticTableMgr.ClearCache(strTableName);
    }
Esempio n. 2
0
    // 先從資料表讀進來
    void LoadFromFile()
    {
        StaticTable   Table    = StaticTableMgr.ReadTable("levelexp");
        List <string> listKeys = Table.GetKeys();

        foreach (string strKey in listKeys)
        {
            m_dictLevelExp[strKey] = System.Convert.ToInt32(Table.Get(strKey, "Exp"));
        }
        // 把 Cache 給清掉
        StaticTableMgr.ClearCache("levelexp");
    }