示例#1
0
        public IEnumerator InitTable()
        {
            if (Tab_Adventure.LoadTable(m_Adventure, m_AdventureStructure, false))

            {
                Log.Message(string.Format("Load Table:{0} OK! Record({1})", Tab_Adventure.GetInstanceFile(), m_Adventure.Count));
            }
            yield return(null);

            if (Tab_Event.LoadTable(m_Event, m_EventStructure, false))

            {
                Log.Message(string.Format("Load Table:{0} OK! Record({1})", Tab_Event.GetInstanceFile(), m_Event.Count));
            }
            yield return(null);

            if (Tab_GoodData.LoadTable(m_GoodData, m_GoodDataStructure, false))

            {
                Log.Message(string.Format("Load Table:{0} OK! Record({1})", Tab_GoodData.GetInstanceFile(), m_GoodData.Count));
            }
            yield return(null);

            if (Tab_Hospial.LoadTable(m_Hospial, m_HospialStructure, false))

            {
                Log.Message(string.Format("Load Table:{0} OK! Record({1})", Tab_Hospial.GetInstanceFile(), m_Hospial.Count));
            }
            yield return(null);

            if (Tab_Location.LoadTable(m_Location, m_LocationStructure, false))

            {
                Log.Message(string.Format("Load Table:{0} OK! Record({1})", Tab_Location.GetInstanceFile(), m_Location.Count));
            }
            yield return(null);

            if (Tab_PlayerData.LoadTable(m_PlayerData, m_PlayerDataStructure, false))

            {
                Log.Message(string.Format("Load Table:{0} OK! Record({1})", Tab_PlayerData.GetInstanceFile(), m_PlayerData.Count));
            }
            yield return(null);

            if (Tab_Postoffice.LoadTable(m_Postoffice, m_PostofficeStructure, false))

            {
                Log.Message(string.Format("Load Table:{0} OK! Record({1})", Tab_Postoffice.GetInstanceFile(), m_Postoffice.Count));
            }
            yield return(null);

            if (Tab_Rental.LoadTable(m_Rental, m_RentalStructure, false))

            {
                Log.Message(string.Format("Load Table:{0} OK! Record({1})", Tab_Rental.GetInstanceFile(), m_Rental.Count));
            }
            yield return(null);

            yield return(null);
        }
示例#2
0
        public static void SerializableTable(string[] values, int nKey, Hashtable _hash)
        {
            if (values == null)
            {
                throw TableException.ErrorReader("values is null. Table: {0}  Key:{1}.", GetInstanceFile(), nKey);
            }
            if (values.Length != VALUE_NUM_PER_ROW)
            {
                throw TableException.ErrorReader("Load {0}  error as CodeSize:{1} not Equal DataSize:{2}", GetInstanceFile(), VALUE_NUM_PER_ROW, values.Length);
            }
            Tab_GoodData tabData = new Tab_GoodData();

            tabData.m_EventDropId[0] = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[7]));

            tabData.m_EventDropId[1] = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[9]));

            tabData.m_EventDropId[2] = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[11]));

            tabData.m_EventRatioDrop = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[5]));
            tabData.m_EventRatioRise = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[6]));
            tabData.m_EventRiseId[0] = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[8]));

            tabData.m_EventRiseId[1] = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[10]));

            tabData.m_EventRiseId[2] = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[12]));

            tabData.m_Icon     = values[1];
            tabData.m_ID       = nKey;
            tabData.m_Name     = values[0];
            tabData.m_PriceMax = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[4]));
            tabData.m_PriceMin = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[3]));
            tabData.m_Repute   = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[2]));

            _hash.Add(nKey, tabData);
        }
示例#3
0
 public Hashtable GetGoodData()
 {
     if (!Tab_GoodData.IsTableLoaded)
     {
         Tab_GoodData.LoadTable(m_GoodData, m_GoodDataStructure, false);
     }
     return(m_GoodData);
 }
示例#4
0
 public Tab_GoodData GetGoodDataById(int nIdex)
 {
     if (GetGoodData().ContainsKey(nIdex))
     {
         return(m_GoodData[nIdex] as Tab_GoodData);
     }
     else
     {
         return(Tab_GoodData.LoadTableItem(nIdex, m_GoodData, m_GoodDataStructure));
     }
 }