예제 #1
0
        public Api_req_Quest(Api_TurnOperator tInstance)
        {
            IEnumerable <XElement> enumerable = Utils.Xml_Result(Mst_quest.tableName, Mst_quest.tableName, "Id");

            foreach (XElement item2 in enumerable)
            {
                Mst_quest instance = null;
                Model_Base.SetMaster(out instance, item2);
                mst_quest.Add(instance.Id, instance);
            }
            IEnumerable <XElement> enumerable2 = Utils.Xml_Result("mst_questcount_reset", "mst_questcount_reset", string.Empty);

            mst_quest_reset = new Dictionary <int, List <int> >
            {
                {
                    1,
                    new List <int>()
                },
                {
                    2,
                    new List <int>()
                },
                {
                    3,
                    new List <int>()
                },
                {
                    4,
                    new List <int>()
                }
            };
            foreach (XElement item3 in enumerable2)
            {
                int num = int.Parse(item3.Element("Type").Value);
                if (num != 0)
                {
                    int item = int.Parse(item3.Element("Id").Value);
                    mst_quest_reset[num].Add(item);
                }
            }
        }
        public Api_req_Quest(Api_TurnOperator tInstance)
        {
            IEnumerable <XElement> enumerable = Utils.Xml_Result(Mst_quest.tableName, Mst_quest.tableName, "Id");

            using (IEnumerator <XElement> enumerator = enumerable.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    XElement  current   = enumerator.get_Current();
                    Mst_quest mst_quest = null;
                    Model_Base.SetMaster <Mst_quest>(out mst_quest, current);
                    this.mst_quest.Add(mst_quest.Id, mst_quest);
                }
            }
            IEnumerable <XElement>        enumerable2 = Utils.Xml_Result("mst_questcount_reset", "mst_questcount_reset", string.Empty);
            Dictionary <int, List <int> > dictionary  = new Dictionary <int, List <int> >();

            dictionary.Add(1, new List <int>());
            dictionary.Add(2, new List <int>());
            dictionary.Add(3, new List <int>());
            dictionary.Add(4, new List <int>());
            this.mst_quest_reset = dictionary;
            using (IEnumerator <XElement> enumerator2 = enumerable2.GetEnumerator())
            {
                while (enumerator2.MoveNext())
                {
                    XElement current2 = enumerator2.get_Current();
                    int      num      = int.Parse(current2.Element("Type").get_Value());
                    if (num != 0)
                    {
                        int num2 = int.Parse(current2.Element("Id").get_Value());
                        this.mst_quest_reset.get_Item(num).Add(num2);
                    }
                }
            }
        }