Ejemplo n.º 1
0
        public Dictionary <int, List <Mst_item_shop> > GetMstCabinet()
        {
            IEnumerable <XElement> enumerable = Utils.Xml_Result(Mst_item_shop.tableName, Mst_item_shop.tableName, null);

            if (enumerable == null)
            {
                return(null);
            }
            var source = (from key in enumerable.Elements("Cabinet_no")
                          select new
            {
                no = int.Parse(key.Value)
            }).Distinct();
            Dictionary <int, List <Mst_item_shop> > dictionary = source.ToDictionary(key => key.no, val => new List <Mst_item_shop>());

            foreach (XElement item2 in enumerable)
            {
                Mst_item_shop instance = null;
                Model_Base.SetMaster(out instance, item2);
                dictionary[instance.Cabinet_no].Add(instance);
            }
            if (!Comm_UserDatas.Instance.User_ship.Values.Any((Mem_ship x) => x.Stype == 22))
            {
                Mst_item_shop item = dictionary[1].FirstOrDefault((Mst_item_shop x) => x.Item1_id == 23);
                dictionary[1].Remove(item);
            }
            return(dictionary);
        }
        public ILookup <int, Mst_mapenemylevel> GetMapenemyLevel(int maparea_id, int mapinfo_no)
        {
            string text = Utils.getTableDirMaster(Mst_mapenemylevel.tableName) + "mst_mapenemylevel/";
            string path = string.Concat(new string[]
            {
                text,
                Mst_mapenemylevel.tableName,
                "_",
                maparea_id.ToString(),
                mapinfo_no.ToString(),
                ".xml"
            });
            IEnumerable <XElement> enumerable = Utils.Xml_Result_To_Path(path, Mst_mapenemylevel.tableName, string.Empty);

            if (enumerable == null)
            {
                return(null);
            }
            List <Mst_mapenemylevel> list = new List <Mst_mapenemylevel>();

            using (IEnumerator <XElement> enumerator = enumerable.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    XElement          current           = enumerator.get_Current();
                    Mst_mapenemylevel mst_mapenemylevel = null;
                    Model_Base.SetMaster <Mst_mapenemylevel>(out mst_mapenemylevel, current);
                    list.Add(mst_mapenemylevel);
                }
            }
            return(Enumerable.ToLookup <Mst_mapenemylevel, int>(list, (Mst_mapenemylevel x) => x.Enemy_list_id));
        }
Ejemplo n.º 3
0
        public Dictionary <int, List <Mst_mapcellincentive> > GetMapCellIncentive(int mapinfoId)
        {
            Dictionary <int, List <Mst_mapcellincentive> > dictionary = new Dictionary <int, List <Mst_mapcellincentive> >();
            string tableName = Mst_mapcellincentive.tableName;
            string text      = Utils.getTableDirMaster(tableName) + tableName + "/";
            string path      = text + tableName + "_" + mapinfoId.ToString() + ".xml";
            IEnumerable <XElement> enumerable = Utils.Xml_Result_To_Path(path, tableName, "Id");

            if (enumerable == null)
            {
                return(dictionary);
            }
            List <Mst_mapcellincentive> list = new List <Mst_mapcellincentive>();

            foreach (XElement item in enumerable)
            {
                Mst_mapcellincentive instance = null;
                Model_Base.SetMaster(out instance, item);
                list.Add(instance);
            }
            ILookup <int, Mst_mapcellincentive> lookup = list.ToLookup((Mst_mapcellincentive x) => x.Mapcell_id);

            foreach (IGrouping <int, Mst_mapcellincentive> item2 in lookup)
            {
                dictionary.Add(item2.Key, (from x in item2
                                           orderby x.Incentive_no
                                           select x).ToList());
            }
            return(dictionary);
        }
        public Dictionary <int, List <Mst_item_shop> > GetMstCabinet()
        {
            IEnumerable <XElement> enumerable = Utils.Xml_Result(Mst_item_shop.tableName, Mst_item_shop.tableName, null);

            if (enumerable == null)
            {
                return(null);
            }
            var enumerable2 = Enumerable.Distinct(Enumerable.Select(Extensions.Elements <XElement>(enumerable, "Cabinet_no"), (XElement key) => new
            {
                no = int.Parse(key.get_Value())
            }));
            Dictionary <int, List <Mst_item_shop> > dictionary = Enumerable.ToDictionary(enumerable2, key => key.no, val => new List <Mst_item_shop>());

            using (IEnumerator <XElement> enumerator = enumerable.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    XElement      current       = enumerator.get_Current();
                    Mst_item_shop mst_item_shop = null;
                    Model_Base.SetMaster <Mst_item_shop>(out mst_item_shop, current);
                    dictionary.get_Item((int)mst_item_shop.Cabinet_no).Add(mst_item_shop);
                }
            }
            if (!Enumerable.Any <Mem_ship>(Comm_UserDatas.Instance.User_ship.get_Values(), (Mem_ship x) => x.Stype == 22))
            {
                Mst_item_shop mst_item_shop2 = Enumerable.FirstOrDefault <Mst_item_shop>(dictionary.get_Item(1), (Mst_item_shop x) => x.Item1_id == 23);
                dictionary.get_Item(1).Remove(mst_item_shop2);
            }
            return(dictionary);
        }
        public Dictionary <int, List <Mst_slotitem_remodel> > Get_Mst_slotitem_remodel()
        {
            IEnumerable <XElement> enumerable = Utils.Xml_Result(Mst_slotitem_remodel.tableName, Mst_slotitem_remodel.tableName, "Id");

            if (enumerable == null)
            {
                return(null);
            }
            List <Mst_slotitem_remodel> list = new List <Mst_slotitem_remodel>();

            using (IEnumerator <XElement> enumerator = enumerable.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    XElement             current = enumerator.get_Current();
                    Mst_slotitem_remodel mst_slotitem_remodel = null;
                    Model_Base.SetMaster <Mst_slotitem_remodel>(out mst_slotitem_remodel, current);
                    if (mst_slotitem_remodel.Enabled == 1)
                    {
                        list.Add(mst_slotitem_remodel);
                    }
                }
            }
            return(Enumerable.ToDictionary <IGrouping <int, Mst_slotitem_remodel>, int, List <Mst_slotitem_remodel> >(Enumerable.ToLookup <Mst_slotitem_remodel, int>(list, (Mst_slotitem_remodel x) => x.Position), (IGrouping <int, Mst_slotitem_remodel> g_id) => g_id.get_Key(), (IGrouping <int, Mst_slotitem_remodel> values) => Enumerable.ToList <Mst_slotitem_remodel>(values)));
        }
        public void Make_Mapenemy(int maparea_id, int mapinfo_no)
        {
            string text = Utils.getTableDirMaster(Mst_mapenemy2.tableName) + "mst_mapenemy/";
            string path = string.Concat(new string[]
            {
                text,
                Mst_mapenemy2.tableName,
                "_",
                maparea_id.ToString(),
                mapinfo_no.ToString(),
                ".xml"
            });
            IEnumerable <XElement> enumerable = Utils.Xml_Result_To_Path(path, Mst_mapenemy2.tableName, string.Empty);

            if (enumerable == null)
            {
                return;
            }
            this.Mst_mapenemy.Clear();
            using (IEnumerator <XElement> enumerator = enumerable.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    XElement      current      = enumerator.get_Current();
                    Mst_mapenemy2 mst_mapenemy = null;
                    Model_Base.SetMaster <Mst_mapenemy2>(out mst_mapenemy, current);
                    this.Mst_mapenemy.Add(mst_mapenemy.Id, mst_mapenemy);
                }
            }
        }
Ejemplo n.º 7
0
 protected override void setProperty(XElement element)
 {
     foreach (XElement item in element.Element("_ship").Elements())
     {
         Mem_shipBase mem_shipBase = new Mem_shipBase();
         mem_shipBase.setProperty(item);
         Ship.Add(mem_shipBase);
     }
     foreach (XElement item2 in element.Element("_slotitem").Elements())
     {
         Slotitem.Add(Model_Base.SetUserData <Mem_slotitem>(item2));
     }
     foreach (XElement item3 in element.Element("_furniture").Elements())
     {
         Furniture.Add(Model_Base.SetUserData <Mem_furniture>(item3));
     }
     foreach (XElement item4 in element.Element("_ship_book").Elements())
     {
         Ship_book.Add(Model_Base.SetUserData <Mem_book>(item4));
     }
     foreach (XElement item5 in element.Element("_slot_book").Elements())
     {
         Slot_book.Add(Model_Base.SetUserData <Mem_book>(item5));
     }
     foreach (var item6 in element.Element("_clear").Elements().Select((XElement obj, int idx) => new
     {
         obj,
         idx
     }))
     {
         _clear[item6.idx] = int.Parse(item6.obj.Value);
     }
     FleetLevel = int.Parse(element.Element("_fleetLevel").Value);
     FleetExp   = uint.Parse(element.Element("_fleetExp").Value);
 }
 protected override void setProperty(XElement element)
 {
     using (IEnumerator<XElement> enumerator = element.Element("_ship").Elements().GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             XElement current = enumerator.get_Current();
             Mem_shipBase mem_shipBase = new Mem_shipBase();
             mem_shipBase.setProperty(current);
             this.Ship.Add(mem_shipBase);
         }
     }
     using (IEnumerator<XElement> enumerator2 = element.Element("_slotitem").Elements().GetEnumerator())
     {
         while (enumerator2.MoveNext())
         {
             XElement current2 = enumerator2.get_Current();
             this.Slotitem.Add(Model_Base.SetUserData<Mem_slotitem>(current2));
         }
     }
     using (IEnumerator<XElement> enumerator3 = element.Element("_furniture").Elements().GetEnumerator())
     {
         while (enumerator3.MoveNext())
         {
             XElement current3 = enumerator3.get_Current();
             this.Furniture.Add(Model_Base.SetUserData<Mem_furniture>(current3));
         }
     }
     using (IEnumerator<XElement> enumerator4 = element.Element("_ship_book").Elements().GetEnumerator())
     {
         while (enumerator4.MoveNext())
         {
             XElement current4 = enumerator4.get_Current();
             this.Ship_book.Add(Model_Base.SetUserData<Mem_book>(current4));
         }
     }
     using (IEnumerator<XElement> enumerator5 = element.Element("_slot_book").Elements().GetEnumerator())
     {
         while (enumerator5.MoveNext())
         {
             XElement current5 = enumerator5.get_Current();
             this.Slot_book.Add(Model_Base.SetUserData<Mem_book>(current5));
         }
     }
     using (var enumerator6 = Enumerable.Select(element.Element("_clear").Elements(), (XElement obj, int idx) => new
     {
         obj,
         idx
     }).GetEnumerator())
     {
         while (enumerator6.MoveNext())
         {
             var current6 = enumerator6.get_Current();
             this._clear.set_Item(current6.idx, int.Parse(current6.obj.get_Value()));
         }
     }
     this.FleetLevel = int.Parse(element.Element("_fleetLevel").get_Value());
     this.FleetExp = uint.Parse(element.Element("_fleetExp").get_Value());
 }
        public void SetStartMasterData()
        {
            if (this.startMasterElement == null)
            {
                return;
            }
            Dictionary <string, Action <Model_Base, XElement> > masterSetter = this.getMasterSetter();

            using (Dictionary <string, IEnumerable <XElement> > .Enumerator enumerator = this.startMasterElement.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    KeyValuePair <string, IEnumerable <XElement> > current = enumerator.get_Current();
                    string key2 = current.get_Key();
                    if (masterSetter.ContainsKey(key2))
                    {
                        using (IEnumerator <XElement> enumerator2 = current.get_Value().GetEnumerator())
                        {
                            while (enumerator2.MoveNext())
                            {
                                XElement   current2   = enumerator2.get_Current();
                                Model_Base model_Base = null;
                                masterSetter.get_Item(key2).Invoke(model_Base, current2);
                            }
                        }
                        Extensions.Remove <XElement>(current.get_Value());
                    }
                }
            }
            Dictionary <int, string> dictionary = Enumerable.ToDictionary <XElement, int, string>(this.startMasterElement.get_Item("mst_equip"), (XElement x) => int.Parse(x.Element("Ship_type").get_Value()), (XElement y) => y.Element("Equip_type").get_Value());

            using (Dictionary <int, Mst_stype> .ValueCollection.Enumerator enumerator3 = this.Mst_stype.get_Values().GetEnumerator())
            {
                while (enumerator3.MoveNext())
                {
                    Mst_stype current3 = enumerator3.get_Current();
                    string    text     = null;
                    if (dictionary.TryGetValue(current3.Id, ref text))
                    {
                        List <int> equip = Enumerable.ToList <int>(Array.ConvertAll <string, int>(text.Split(new char[]
                        {
                            ','
                        }), (string eqp_val) => int.Parse(eqp_val)));
                        current3.SetEquip(equip);
                    }
                    else
                    {
                        current3.SetEquip(new List <int>());
                    }
                }
            }
            Extensions.Remove <XElement>(this.startMasterElement.get_Item("mst_equip"));
            dictionary.Clear();
            this.Mst_bgm_season = Enumerable.ToDictionary <XElement, int, int>(this.startMasterElement.get_Item("mst_bgm_season"), (XElement key) => int.Parse(key.Element("Id").get_Value()), (XElement val) => int.Parse(val.Element("Bgm_id").get_Value()));
            Extensions.Remove <XElement>(this.startMasterElement.get_Item("mst_bgm_season"));
            this.startMasterElement.Clear();
            this.startMasterElement = null;
        }
Ejemplo n.º 10
0
        public List <Mst_mission2> GetSupportResistedData(int maparea_id)
        {
            List <Mst_mission2> list     = new List <Mst_mission2>();
            XElement            element  = new XElement(new XElement("mst_mission2", new XElement("Id", "100000"), new XElement("Maparea_id", maparea_id.ToString()), new XElement("Name", "前線反抗支援"), new XElement("Details", "前線反抗支援"), new XElement("Mission_type", "2"), new XElement("Time", "2"), new XElement("Rp_sub", "0"), new XElement("Difficulty", "1"), new XElement("Use_mat", "0.5,0.8"), new XElement("Required_ids", string.Empty), new XElement("Win_exp", "0,0"), new XElement("Win_mat", "0,0,0,0"), new XElement("Win_item1", "0,0"), new XElement("Win_item2", "0,0"), new XElement("Win_spoint", "0,0"), new XElement("Level", "0"), new XElement("Flagship_level_check_type", "1"), new XElement("Flagship_level", "0"), new XElement("Stype_num", "0,0,0,0,0,0,0,0,0"), new XElement("Deck_num", "0"), new XElement("Drum_num", "0,0,0"), new XElement("Flagship_stype", "0,0"), new XElement("Tanker_num", "0,0")));
            Mst_mission2        instance = null;

            Model_Base.SetMaster(out instance, element);
            list.Add(instance);
            element = new XElement(new XElement("mst_mission2", new XElement("Id", "100001"), new XElement("Maparea_id", maparea_id.ToString()), new XElement("Name", "決戦反抗支援"), new XElement("Details", "決戦反抗支援"), new XElement("Mission_type", "3"), new XElement("Time", "2"), new XElement("Rp_sub", "0"), new XElement("Difficulty", "1"), new XElement("Use_mat", "0.5,0.8"), new XElement("Required_ids", string.Empty), new XElement("Win_exp", "0,0"), new XElement("Win_mat", "0,0,0,0"), new XElement("Win_item1", "0,0"), new XElement("Win_item2", "0,0"), new XElement("Win_spoint", "0,0"), new XElement("Level", "0"), new XElement("Flagship_level_check_type", "1"), new XElement("Flagship_level", "0"), new XElement("Stype_num", "0,0,0,0,0,0,0,0,0"), new XElement("Deck_num", "0"), new XElement("Drum_num", "0,0,0"), new XElement("Flagship_stype", "0,0"), new XElement("Tanker_num", "0,0")));
            Mst_mission2 instance2 = null;

            Model_Base.SetMaster(out instance2, element);
            list.Add(instance2);
            return(list);
        }
Ejemplo n.º 11
0
        public Dictionary <int, Mst_payitem> GetPayitem()
        {
            IEnumerable <XElement>        enumerable  = Utils.Xml_Result(Mst_payitem.tableName, Mst_payitem.tableName, null);
            IEnumerable <XElement>        source      = Utils.Xml_Result("mst_payitemtext", "mst_payitemtext", null);
            Dictionary <int, string>      dictionary  = source.ToDictionary((XElement key) => int.Parse(key.Element("Id").Value), (XElement value) => value.Element("Description").Value);
            Dictionary <int, Mst_payitem> dictionary2 = new Dictionary <int, Mst_payitem>(enumerable.Count());

            foreach (XElement item in enumerable)
            {
                Mst_payitem instance = null;
                Model_Base.SetMaster(out instance, item);
                instance.setText(dictionary[instance.Id]);
                dictionary2.Add(instance.Id, instance);
            }
            return(dictionary2);
        }
Ejemplo n.º 12
0
        public void Make_Mapenemy(int maparea_id, int mapinfo_no)
        {
            string text = Utils.getTableDirMaster(Mst_mapenemy2.tableName) + "mst_mapenemy/";
            string path = text + Mst_mapenemy2.tableName + "_" + maparea_id.ToString() + mapinfo_no.ToString() + ".xml";
            IEnumerable <XElement> enumerable = Utils.Xml_Result_To_Path(path, Mst_mapenemy2.tableName, string.Empty);

            if (enumerable != null)
            {
                Mst_mapenemy.Clear();
                foreach (XElement item in enumerable)
                {
                    Mst_mapenemy2 instance = null;
                    Model_Base.SetMaster(out instance, item);
                    Mst_mapenemy.Add(instance.Id, instance);
                }
            }
        }
Ejemplo n.º 13
0
        public Dictionary <int, List <Mst_slotitem_remodel_detail> > Get_Mst_slotitem_remodel_detail()
        {
            IEnumerable <XElement> enumerable = Utils.Xml_Result(Mst_slotitem_remodel_detail.tableName, Mst_slotitem_remodel_detail.tableName, string.Empty);

            if (enumerable == null)
            {
                return(null);
            }
            List <Mst_slotitem_remodel_detail> list = new List <Mst_slotitem_remodel_detail>();

            foreach (XElement item in enumerable)
            {
                Mst_slotitem_remodel_detail instance = null;
                Model_Base.SetMaster(out instance, item);
                list.Add(instance);
            }
            return(list.ToLookup((Mst_slotitem_remodel_detail x) => x.Id).ToDictionary((IGrouping <int, Mst_slotitem_remodel_detail> g_id) => g_id.Key, (IGrouping <int, Mst_slotitem_remodel_detail> values) => values.ToList()));
        }
        public Dictionary <int, List <Mst_mapcellincentive> > GetMapCellIncentive(int mapinfoId)
        {
            Dictionary <int, List <Mst_mapcellincentive> > dictionary = new Dictionary <int, List <Mst_mapcellincentive> >();
            string tableName = Mst_mapcellincentive.tableName;
            string text      = Utils.getTableDirMaster(tableName) + tableName + "/";
            string path      = string.Concat(new string[]
            {
                text,
                tableName,
                "_",
                mapinfoId.ToString(),
                ".xml"
            });
            IEnumerable <XElement> enumerable = Utils.Xml_Result_To_Path(path, tableName, "Id");

            if (enumerable == null)
            {
                return(dictionary);
            }
            List <Mst_mapcellincentive> list = new List <Mst_mapcellincentive>();

            using (IEnumerator <XElement> enumerator = enumerable.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    XElement             current = enumerator.get_Current();
                    Mst_mapcellincentive mst_mapcellincentive = null;
                    Model_Base.SetMaster <Mst_mapcellincentive>(out mst_mapcellincentive, current);
                    list.Add(mst_mapcellincentive);
                }
            }
            ILookup <int, Mst_mapcellincentive> lookup = Enumerable.ToLookup <Mst_mapcellincentive, int>(list, (Mst_mapcellincentive x) => x.Mapcell_id);

            using (IEnumerator <IGrouping <int, Mst_mapcellincentive> > enumerator2 = lookup.GetEnumerator())
            {
                while (enumerator2.MoveNext())
                {
                    IGrouping <int, Mst_mapcellincentive> current2 = enumerator2.get_Current();
                    dictionary.Add(current2.get_Key(), Enumerable.ToList <Mst_mapcellincentive>(Enumerable.OrderBy <Mst_mapcellincentive, int>(current2, (Mst_mapcellincentive x) => x.Incentive_no)));
                }
            }
            return(dictionary);
        }
Ejemplo n.º 15
0
        public ILookup <int, Mst_mapenemylevel> GetMapenemyLevel(int maparea_id, int mapinfo_no)
        {
            string text = Utils.getTableDirMaster(Mst_mapenemylevel.tableName) + "mst_mapenemylevel/";
            string path = text + Mst_mapenemylevel.tableName + "_" + maparea_id.ToString() + mapinfo_no.ToString() + ".xml";
            IEnumerable <XElement> enumerable = Utils.Xml_Result_To_Path(path, Mst_mapenemylevel.tableName, string.Empty);

            if (enumerable == null)
            {
                return(null);
            }
            List <Mst_mapenemylevel> list = new List <Mst_mapenemylevel>();

            foreach (XElement item in enumerable)
            {
                Mst_mapenemylevel instance = null;
                Model_Base.SetMaster(out instance, item);
                list.Add(instance);
            }
            return(list.ToLookup((Mst_mapenemylevel x) => x.Enemy_list_id));
        }
        public Dictionary <int, Mst_payitem> GetPayitem()
        {
            IEnumerable <XElement>        enumerable  = Utils.Xml_Result(Mst_payitem.tableName, Mst_payitem.tableName, null);
            IEnumerable <XElement>        enumerable2 = Utils.Xml_Result("mst_payitemtext", "mst_payitemtext", null);
            Dictionary <int, string>      dictionary  = Enumerable.ToDictionary <XElement, int, string>(enumerable2, (XElement key) => int.Parse(key.Element("Id").get_Value()), (XElement value) => value.Element("Description").get_Value());
            Dictionary <int, Mst_payitem> dictionary2 = new Dictionary <int, Mst_payitem>(Enumerable.Count <XElement>(enumerable));

            using (IEnumerator <XElement> enumerator = enumerable.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    XElement    current     = enumerator.get_Current();
                    Mst_payitem mst_payitem = null;
                    Model_Base.SetMaster <Mst_payitem>(out mst_payitem, current);
                    mst_payitem.setText(dictionary.get_Item(mst_payitem.Id));
                    dictionary2.Add(mst_payitem.Id, mst_payitem);
                }
            }
            return(dictionary2);
        }
Ejemplo n.º 17
0
 public void SetStartMasterData()
 {
     if (startMasterElement != null)
     {
         Dictionary <string, Action <Model_Base, XElement> > masterSetter = getMasterSetter();
         foreach (KeyValuePair <string, IEnumerable <XElement> > item in startMasterElement)
         {
             string key2 = item.Key;
             if (masterSetter.ContainsKey(key2))
             {
                 foreach (XElement item2 in item.Value)
                 {
                     Model_Base arg = null;
                     masterSetter[key2](arg, item2);
                 }
                 item.Value.Remove();
             }
         }
         Dictionary <int, string> dictionary = startMasterElement["mst_equip"].ToDictionary((XElement x) => int.Parse(x.Element("Ship_type").Value), (XElement y) => y.Element("Equip_type").Value);
         foreach (Mst_stype value2 in Mst_stype.Values)
         {
             string value = null;
             if (dictionary.TryGetValue(value2.Id, out value))
             {
                 List <int> equip = Array.ConvertAll(value.Split(','), (string eqp_val) => int.Parse(eqp_val)).ToList();
                 value2.SetEquip(equip);
             }
             else
             {
                 value2.SetEquip(new List <int>());
             }
         }
         startMasterElement["mst_equip"].Remove();
         dictionary.Clear();
         Mst_bgm_season = startMasterElement["mst_bgm_season"].ToDictionary((XElement key) => int.Parse(key.Element("Id").Value), (XElement val) => int.Parse(val.Element("Bgm_id").Value));
         startMasterElement["mst_bgm_season"].Remove();
         startMasterElement.Clear();
         startMasterElement = null;
     }
 }
        private Dictionary <string, Action <Model_Base, XElement> > getMasterSetter()
        {
            Dictionary <string, Action <Model_Base, XElement> > dictionary = new Dictionary <string, Action <Model_Base, XElement> >();

            dictionary.Add("mst_ship", delegate(Model_Base x, XElement y)
            {
                Mst_ship mst_ship = (Mst_ship)x;
                Model_Base.SetMaster <Mst_ship>(out mst_ship, y);
                this.Mst_ship.Add(mst_ship.Id, mst_ship);
            });
            dictionary.Add("mst_ship_resources", delegate(Model_Base x, XElement y)
            {
                Mst_ship_resources mst_ship_resources = (Mst_ship_resources)x;
                Model_Base.SetMaster <Mst_ship_resources>(out mst_ship_resources, y);
                this.Mst_ship_resources.Add(mst_ship_resources.Id, mst_ship_resources);
            });
            dictionary.Add("mst_slotitem", delegate(Model_Base x, XElement y)
            {
                Mst_slotitem mst_slotitem = (Mst_slotitem)x;
                Model_Base.SetMaster <Mst_slotitem>(out mst_slotitem, y);
                this.Mst_Slotitem.Add(mst_slotitem.Id, mst_slotitem);
            });
            dictionary.Add("mst_maparea", delegate(Model_Base x, XElement y)
            {
                Mst_maparea mst_maparea = (Mst_maparea)x;
                Model_Base.SetMaster <Mst_maparea>(out mst_maparea, y);
                this.Mst_maparea.Add(mst_maparea.Id, mst_maparea);
            });
            dictionary.Add("mst_mapinfo", delegate(Model_Base x, XElement y)
            {
                Mst_mapinfo mst_mapinfo = (Mst_mapinfo)x;
                Model_Base.SetMaster <Mst_mapinfo>(out mst_mapinfo, y);
                this.Mst_mapinfo.Add(mst_mapinfo.Id, mst_mapinfo);
            });
            dictionary.Add("mst_useitem", delegate(Model_Base x, XElement y)
            {
                Mst_useitem mst_useitem = (Mst_useitem)x;
                Model_Base.SetMaster <Mst_useitem>(out mst_useitem, y);
                this.Mst_useitem.Add(mst_useitem.Id, mst_useitem);
            });
            dictionary.Add("mst_stype", delegate(Model_Base x, XElement y)
            {
                Mst_stype mst_stype = (Mst_stype)x;
                Model_Base.SetMaster <Mst_stype>(out mst_stype, y);
                this.Mst_stype.Add(mst_stype.Id, mst_stype);
            });
            dictionary.Add("mst_mission2", delegate(Model_Base x, XElement y)
            {
                Mst_mission2 mst_mission = (Mst_mission2)x;
                Model_Base.SetMaster <Mst_mission2>(out mst_mission, y);
                this.Mst_mission.Add(mst_mission.Id, mst_mission);
            });
            dictionary.Add("mst_shipupgrade", delegate(Model_Base x, XElement y)
            {
                Mst_shipupgrade mst_shipupgrade = (Mst_shipupgrade)x;
                Model_Base.SetMaster <Mst_shipupgrade>(out mst_shipupgrade, y);
                this.Mst_upgrade.Add(mst_shipupgrade.Id, mst_shipupgrade);
            });
            dictionary.Add("mst_furniture", delegate(Model_Base x, XElement y)
            {
                Mst_furniture mst_furniture = (Mst_furniture)x;
                Model_Base.SetMaster <Mst_furniture>(out mst_furniture, y);
                this.Mst_furniture.Add(mst_furniture.Id, mst_furniture);
            });
            dictionary.Add("mst_shipgraph", delegate(Model_Base x, XElement y)
            {
                Mst_shipgraph mst_shipgraph = (Mst_shipgraph)x;
                Model_Base.SetMaster <Mst_shipgraph>(out mst_shipgraph, y);
                this.Mst_shipgraph.Add(mst_shipgraph.Id, mst_shipgraph);
            });
            dictionary.Add("mst_item_limit", delegate(Model_Base x, XElement y)
            {
                Mst_item_limit mst_item_limit = (Mst_item_limit)x;
                Model_Base.SetMaster <Mst_item_limit>(out mst_item_limit, y);
                this.Mst_item_limit.Add(mst_item_limit.Id, mst_item_limit);
            });
            dictionary.Add("mst_equip_category", delegate(Model_Base x, XElement y)
            {
                Mst_equip_category mst_equip_category = (Mst_equip_category)x;
                Model_Base.SetMaster <Mst_equip_category>(out mst_equip_category, y);
                this.Mst_equip_category.Add(mst_equip_category.Id, mst_equip_category);
            });
            dictionary.Add("mst_equip_ship", delegate(Model_Base x, XElement y)
            {
                Mst_equip_ship mst_equip_ship = (Mst_equip_ship)x;
                Model_Base.SetMaster <Mst_equip_ship>(out mst_equip_ship, y);
                this.Mst_equip_ship.Add(mst_equip_ship.Id, mst_equip_ship);
            });
            dictionary.Add("mst_shipgraphbattle", delegate(Model_Base x, XElement y)
            {
                Mst_shipgraphbattle mst_shipgraphbattle = (Mst_shipgraphbattle)x;
                Model_Base.SetMaster <Mst_shipgraphbattle>(out mst_shipgraphbattle, y);
                this.Mst_shipgraphbattle.Add(mst_shipgraphbattle.Id, mst_shipgraphbattle);
            });
            dictionary.Add("mst_const", delegate(Model_Base x, XElement y)
            {
                Mst_const mst_const = (Mst_const)x;
                Model_Base.SetMaster <Mst_const>(out mst_const, y);
                this.Mst_const.Add(mst_const.Id, mst_const);
            });
            dictionary.Add("mst_questcount", delegate(Model_Base x, XElement y)
            {
                Mst_questcount mst_questcount = (Mst_questcount)x;
                Model_Base.SetMaster <Mst_questcount>(out mst_questcount, y);
                this.Mst_questcount.Add(mst_questcount.Id, mst_questcount);
            });
            dictionary.Add("mst_rebellionpoint", delegate(Model_Base x, XElement y)
            {
                Mst_rebellionpoint mst_rebellionpoint = (Mst_rebellionpoint)x;
                Model_Base.SetMaster <Mst_rebellionpoint>(out mst_rebellionpoint, y);
                this.Mst_RebellionPoint.Add(mst_rebellionpoint.Id, mst_rebellionpoint);
            });
            dictionary.Add(Mst_bgm_jukebox.tableName, delegate(Model_Base x, XElement y)
            {
                Mst_bgm_jukebox mst_bgm_jukebox = (Mst_bgm_jukebox)x;
                Model_Base.SetMaster <Mst_bgm_jukebox>(out mst_bgm_jukebox, y);
                this._mst_jukebox.Add(mst_bgm_jukebox.Bgm_id, mst_bgm_jukebox);
            });
            dictionary.Add(Mst_radingtype.tableName, delegate(Model_Base x, XElement y)
            {
                Mst_radingtype mst_radingtype = (Mst_radingtype)x;
                Model_Base.SetMaster <Mst_radingtype>(out mst_radingtype, y);
                List <Mst_radingtype> list = null;
                if (!this.Mst_RadingType.TryGetValue(mst_radingtype.Difficult, ref list))
                {
                    list = new List <Mst_radingtype>();
                    this.Mst_RadingType.Add(mst_radingtype.Difficult, list);
                }
                list.Add(mst_radingtype);
            });
            dictionary.Add(Mst_radingrate.tableName, delegate(Model_Base x, XElement y)
            {
                Mst_radingrate mst_radingrate = (Mst_radingrate)x;
                Model_Base.SetMaster <Mst_radingrate>(out mst_radingrate, y);
                if (!this.Mst_RadingRate.ContainsKey(mst_radingrate.Maparea_id))
                {
                    Dictionary <int, Mst_radingrate> dictionary2 = new Dictionary <int, Mst_radingrate>();
                    dictionary2.Add(mst_radingrate.Rading_type, mst_radingrate);
                    this.Mst_RadingRate.Add(mst_radingrate.Maparea_id, dictionary2);
                }
                else
                {
                    this.Mst_RadingRate.get_Item(mst_radingrate.Maparea_id).Add(mst_radingrate.Rading_type, mst_radingrate);
                }
            });
            return(dictionary);
        }
Ejemplo n.º 19
0
        private Dictionary <string, Action <Model_Base, XElement> > getMasterSetter()
        {
            Dictionary <string, Action <Model_Base, XElement> > dictionary = new Dictionary <string, Action <Model_Base, XElement> >();

            dictionary.Add("mst_ship", delegate(Model_Base x, XElement y)
            {
                Mst_ship instance21 = (Mst_ship)x;
                Model_Base.SetMaster(out instance21, y);
                Mst_ship.Add(instance21.Id, instance21);
            });
            dictionary.Add("mst_ship_resources", delegate(Model_Base x, XElement y)
            {
                Mst_ship_resources instance20 = (Mst_ship_resources)x;
                Model_Base.SetMaster(out instance20, y);
                Mst_ship_resources.Add(instance20.Id, instance20);
            });
            dictionary.Add("mst_slotitem", delegate(Model_Base x, XElement y)
            {
                Mst_slotitem instance19 = (Mst_slotitem)x;
                Model_Base.SetMaster(out instance19, y);
                Mst_Slotitem.Add(instance19.Id, instance19);
            });
            dictionary.Add("mst_maparea", delegate(Model_Base x, XElement y)
            {
                Mst_maparea instance18 = (Mst_maparea)x;
                Model_Base.SetMaster(out instance18, y);
                Mst_maparea.Add(instance18.Id, instance18);
            });
            dictionary.Add("mst_mapinfo", delegate(Model_Base x, XElement y)
            {
                Mst_mapinfo instance17 = (Mst_mapinfo)x;
                Model_Base.SetMaster(out instance17, y);
                Mst_mapinfo.Add(instance17.Id, instance17);
            });
            dictionary.Add("mst_useitem", delegate(Model_Base x, XElement y)
            {
                Mst_useitem instance16 = (Mst_useitem)x;
                Model_Base.SetMaster(out instance16, y);
                Mst_useitem.Add(instance16.Id, instance16);
            });
            dictionary.Add("mst_stype", delegate(Model_Base x, XElement y)
            {
                Mst_stype instance15 = (Mst_stype)x;
                Model_Base.SetMaster(out instance15, y);
                Mst_stype.Add(instance15.Id, instance15);
            });
            dictionary.Add("mst_mission2", delegate(Model_Base x, XElement y)
            {
                Mst_mission2 instance14 = (Mst_mission2)x;
                Model_Base.SetMaster(out instance14, y);
                Mst_mission.Add(instance14.Id, instance14);
            });
            dictionary.Add("mst_shipupgrade", delegate(Model_Base x, XElement y)
            {
                Mst_shipupgrade instance13 = (Mst_shipupgrade)x;
                Model_Base.SetMaster(out instance13, y);
                Mst_upgrade.Add(instance13.Id, instance13);
            });
            dictionary.Add("mst_furniture", delegate(Model_Base x, XElement y)
            {
                Mst_furniture instance12 = (Mst_furniture)x;
                Model_Base.SetMaster(out instance12, y);
                Mst_furniture.Add(instance12.Id, instance12);
            });
            dictionary.Add("mst_shipgraph", delegate(Model_Base x, XElement y)
            {
                Mst_shipgraph instance11 = (Mst_shipgraph)x;
                Model_Base.SetMaster(out instance11, y);
                Mst_shipgraph.Add(instance11.Id, instance11);
            });
            dictionary.Add("mst_item_limit", delegate(Model_Base x, XElement y)
            {
                Mst_item_limit instance10 = (Mst_item_limit)x;
                Model_Base.SetMaster(out instance10, y);
                Mst_item_limit.Add(instance10.Id, instance10);
            });
            dictionary.Add("mst_equip_category", delegate(Model_Base x, XElement y)
            {
                Mst_equip_category instance9 = (Mst_equip_category)x;
                Model_Base.SetMaster(out instance9, y);
                Mst_equip_category.Add(instance9.Id, instance9);
            });
            dictionary.Add("mst_equip_ship", delegate(Model_Base x, XElement y)
            {
                Mst_equip_ship instance8 = (Mst_equip_ship)x;
                Model_Base.SetMaster(out instance8, y);
                Mst_equip_ship.Add(instance8.Id, instance8);
            });
            dictionary.Add("mst_shipgraphbattle", delegate(Model_Base x, XElement y)
            {
                Mst_shipgraphbattle instance7 = (Mst_shipgraphbattle)x;
                Model_Base.SetMaster(out instance7, y);
                Mst_shipgraphbattle.Add(instance7.Id, instance7);
            });
            dictionary.Add("mst_const", delegate(Model_Base x, XElement y)
            {
                Mst_const instance6 = (Mst_const)x;
                Model_Base.SetMaster(out instance6, y);
                Mst_const.Add(instance6.Id, instance6);
            });
            dictionary.Add("mst_questcount", delegate(Model_Base x, XElement y)
            {
                Mst_questcount instance5 = (Mst_questcount)x;
                Model_Base.SetMaster(out instance5, y);
                Mst_questcount.Add(instance5.Id, instance5);
            });
            dictionary.Add("mst_rebellionpoint", delegate(Model_Base x, XElement y)
            {
                Mst_rebellionpoint instance4 = (Mst_rebellionpoint)x;
                Model_Base.SetMaster(out instance4, y);
                Mst_RebellionPoint.Add(instance4.Id, instance4);
            });
            dictionary.Add(Mst_bgm_jukebox.tableName, delegate(Model_Base x, XElement y)
            {
                Mst_bgm_jukebox instance3 = (Mst_bgm_jukebox)x;
                Model_Base.SetMaster(out instance3, y);
                _mst_jukebox.Add(instance3.Bgm_id, instance3);
            });
            dictionary.Add(Mst_radingtype.tableName, delegate(Model_Base x, XElement y)
            {
                Mst_radingtype instance2 = (Mst_radingtype)x;
                Model_Base.SetMaster(out instance2, y);
                List <Mst_radingtype> value2 = null;
                if (!Mst_RadingType.TryGetValue(instance2.Difficult, out value2))
                {
                    value2 = new List <Mst_radingtype>();
                    Mst_RadingType.Add(instance2.Difficult, value2);
                }
                value2.Add(instance2);
            });
            dictionary.Add(Mst_radingrate.tableName, delegate(Model_Base x, XElement y)
            {
                Mst_radingrate instance = (Mst_radingrate)x;
                Model_Base.SetMaster(out instance, y);
                if (!Mst_RadingRate.ContainsKey(instance.Maparea_id))
                {
                    Dictionary <int, Mst_radingrate> value = new Dictionary <int, Mst_radingrate>
                    {
                        {
                            instance.Rading_type,
                            instance
                        }
                    };
                    Mst_RadingRate.Add(instance.Maparea_id, value);
                }
                else
                {
                    Mst_RadingRate[instance.Maparea_id].Add(instance.Rading_type, instance);
                }
            });
            return(dictionary);
        }