예제 #1
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);
        }
예제 #2
0
        public static Tab_Adventure SerializableTableItem(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_Adventure tabData = new Tab_Adventure();

            tabData.m_Cash      = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[1]));
            tabData.m_Condition = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[6]));
            tabData.m_Content   = values[0];
            tabData.m_Debt      = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[3]));
            tabData.m_Deposit   = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[2]));
            tabData.m_GoodId    = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[7]));
            tabData.m_GoodNum   = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[8]));
            tabData.m_Health    = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[4]));
            tabData.m_ID        = nKey;
            tabData.m_Ratio     = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[9]));
            tabData.m_Repute    = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[5]));

            _hash.Add(nKey, tabData);
            return(tabData);
        }
예제 #3
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_Event tabData = new Tab_Event();

            tabData.m_Content     = values[0];
            tabData.m_EventEffect = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[1]));
            tabData.m_ID          = nKey;

            _hash.Add(nKey, tabData);
        }
예제 #4
0
        public static Tab_Rental SerializableTableItem(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_Rental tabData = new Tab_Rental();

            tabData.m_ID        = nKey;
            tabData.m_Introduce = values[0];
            tabData.m_PriceMin  = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[2]));
            tabData.m_Size      = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[1]));

            _hash.Add(nKey, tabData);
            return(tabData);
        }
예제 #5
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_PlayerData tabData = new Tab_PlayerData();

            tabData.m_Cash    = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[2]));
            tabData.m_Debt    = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[4]));
            tabData.m_Deposit = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[3]));
            tabData.m_Health  = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[5]));
            tabData.m_Icon    = values[1];
            tabData.m_ID      = nKey;
            tabData.m_Name    = values[0];
            tabData.m_Repute  = BasicUtil.EncryptInt32Value(Convert.ToInt32(values[6]));

            _hash.Add(nKey, tabData);
        }