public bool Load(fmDataTable table)
        {
            Dictionary <int, fmDataDropValue> dic = table.Find <fmDataDropValue>(eFmDataType.DropValue);

            if (null == dic)
            {
                return(false);
            }

            if (false == LoadDropValueInDTomb(dic))
            {
                return(false);
            }

            if (false == LoadDropValueInWorld(dic))
            {
                return(false);
            }

            if (false == LoadPartsList())
            {
                return(false);
            }

            return(true);
        }
        private bool LoadInDun(fmDataTable table)
        {
            Dictionary <int, fmDataInDun> dicInDun = table.Find <fmDataInDun>(eFmDataType.InDun);

            if (null == dicInDun)
            {
                return(false);
            }

            m_gochaInDun.Clear();
            foreach (var node in dicInDun)
            {
                fmGochaInDunMonster gm = new fmGochaInDunMonster(m_random);
                gm.Add(node.Value);

                int indunCode = node.Value.m_nInDunCode;

                if (false == m_gochaInDun.ContainsKey(indunCode))
                {
                    m_gochaInDun.Add(indunCode, new Dictionary <int, fmGochaInDunMonster>());
                }

                m_gochaInDun[indunCode].Add(node.Value.m_nPlace, gm);
            }

            return(true);
        }
示例#3
0
        private bool LoadData(fmDataTable table)
        {
            Dictionary <int, fmDataItem> dic = table.Find <fmDataItem>(eFmDataType.Item);

            if (null == dic)
            {
                return(false);
            }

            m_dataItems = dic;
            if (null == m_dataItems)
            {
                return(false);
            }

            if (false == LoadDataDrop(dic))
            {
                return(false);
            }
            if (false == LoadDataAncient(dic))
            {
                return(false);
            }
            if (false == LoadDataMythic(dic))
            {
                return(false);
            }

            return(true);
        }
        private bool LoadMonster(fmDataTable table)
        {
            m_dicMonster = table.Find <fmDataMonster>(eFmDataType.Monster);
            if (null == m_dicMonster)
            {
                return(false);
            }

            return(true);
        }
        public static bool Load(fmDataTable table)
        {
            Dictionary <int, fmDataMission> dic = table.Find <fmDataMission>(eFmDataType.Mission);

            if (null == dic)
            {
                return(false);
            }

            m_dicMission = dic;
            return(true);
        }
示例#6
0
        public static bool Load(fmDataTable table)
        {
            Dictionary <int, fmDataShop> dic = table.Find <fmDataShop>(eFmDataType.Shop);

            if (null == dic)
            {
                return(false);
            }

            m_shop = dic;

            return(true);
        }
示例#7
0
        public bool Load(fmDataTable table)
        {
            Dictionary <int, fmDataPvpDummy> dic = table.Find <fmDataPvpDummy>(eFmDataType.PvpDummy);

            if (null == dic)
            {
                return(false);
            }

            m_dummys = dic;

            return(true);
        }
        public bool Load(fmDataTable table)
        {
            Dictionary <int, fmDataOption> dic = table.Find <fmDataOption>(eFmDataType.Option);

            if (null == dic)
            {
                return(false);
            }

            //m_optList.Add(eParts.Weapon, new List<eOption>());
            //m_optList.Add(eParts.Necklace, new List<eOption>());
            //m_optList.Add(eParts.Ring, new List<eOption>());
            //m_optList.Add(eParts.Belt, new List<eOption>());
            //m_optList.Add(eParts.Gloves, new List<eOption>());
            //m_optList.Add(eParts.Pants, new List<eOption>());
            //m_optList.Add(eParts.Armor, new List<eOption>());
            //m_optList.Add(eParts.Head, new List<eOption>());
            //m_optList.Add(eParts.Jewel, new List<eOption>());

            foreach (var node in dic)
            {
                int       lv       = node.Value.m_nAppearLv;
                eOption   opt      = node.Value.m_eOption;
                eOptGrade optGrade = (eOptGrade)((int)opt >> 8);

                foreach (var beyond in node.Value.m_nArrBeyond)
                {
                    if ((eBeyond)beyond == eBeyond.Mythic)
                    {
                        int cnt = node.Value.m_nArrParts.Length;
                        for (int i = 0; i < cnt; ++i)
                        {
                            eParts parts = (eParts)node.Value.m_nArrParts[i];

                            if (false == m_optList.ContainsKey(parts))
                            {
                                m_optList.Add(parts, new List <eOption>());
                            }

                            m_optList[parts].Add(opt);
                        }
                    }
                }
            }

            return(true);
        }
        public bool Load(fmDataTable table)
        {
            Dictionary <int, fmDataExplore> dic = table.Find <fmDataExplore>(eFmDataType.Explore);

            if (null == dic)
            {
                return(false);
            }

            foreach (var node in dic)
            {
                m_dic.Add(node.Value.m_nLinkCode, node.Value);
            }

            //m_dic = dic;

            return(true);
        }
        private bool LoadTomb(fmDataTable table)
        {
            Dictionary <int, fmDataDragonTomb> dicTomb = table.Find <fmDataDragonTomb>(eFmDataType.DTomb);

            if (null == dicTomb)
            {
                return(false);
            }

            m_gochaTomb.Clear();
            foreach (var node in dicTomb)
            {
                fmGochaTombMonster gm = new fmGochaTombMonster(m_random);
                gm.Add(node.Value);
                m_gochaTomb.Add(node.Value.m_eLevel, gm);
            }

            return(true);
        }
        private bool LoadExplore(fmDataTable table)
        {
            Dictionary <int, fmDataExplore> dic = table.Find <fmDataExplore>(eFmDataType.Explore);

            if (null == dic)
            {
                return(false);
            }

            m_gochaExplore.Clear();
            foreach (var node in dic)
            {
                fmGochaExploreMonster gm = new fmGochaExploreMonster(m_random);
                gm.Add(node.Value);
                m_gochaExplore.Add(node.Value.m_nLinkCode, gm);
            }

            return(true);
        }
示例#12
0
        public bool Load(fmDataTable table)
        {
            Dictionary <int, fmDataInDun> dic = table.Find <fmDataInDun>(eFmDataType.InDun);

            if (null == dic)
            {
                return(false);
            }

            foreach (var node in dic)
            {
                if (false == m_dic.ContainsKey(node.Value.m_nInDunCode))
                {
                    m_dic.Add(node.Value.m_nInDunCode, new Dictionary <int, fmDataInDun>());
                }

                m_dic[node.Value.m_nInDunCode].Add(node.Value.m_nPlace, node.Value);
            }

            return(true);
        }
        private bool LoadMaze(fmDataTable table)
        {
            Dictionary <int, fmData> dicMaze = table.Find(eFmDataType.Maze);

            if (null == dicMaze)
            {
                return(false);
            }

            MaxMazeFloor = dicMaze.Count;

            m_gochaMaze.Clear();
            foreach (var node in dicMaze)
            {
                fmGochaMazeMonster gm = new fmGochaMazeMonster(m_random);
                gm.Add(node.Value as fmDataMaze);
                m_gochaMaze.Add(node.Value.Code, gm);
            }

            return(true);
        }
示例#14
0
        public bool Load(fmDataTable table)
        {
            Dictionary <int, fmDataOption> dic = table.Find <fmDataOption>(eFmDataType.Option);

            if (null == dic)
            {
                return(false);
            }

            m_optList.Add(eGrade.Normal, new Dictionary <int, Dictionary <eParts, List <eOption> > >());
            m_optList.Add(eGrade.Legend, new Dictionary <int, Dictionary <eParts, List <eOption> > >());
            m_optList.Add(eGrade.Set, new Dictionary <int, Dictionary <eParts, List <eOption> > >());

            foreach (var node in dic)
            {
                int lv = node.Value.m_nAppearLv;
                if (false == m_nLvRange.Contains(lv))
                {
                    m_nLvRange.Add(lv);
                }

                foreach (var item in m_optList)
                {
                    if (false == item.Value.ContainsKey(lv))
                    {
                        item.Value.Add(lv, new Dictionary <eParts, List <eOption> >());
                        item.Value[lv].Add(eParts.Weapon, new List <eOption>());
                        item.Value[lv].Add(eParts.Necklace, new List <eOption>());
                        item.Value[lv].Add(eParts.Ring, new List <eOption>());
                        item.Value[lv].Add(eParts.Belt, new List <eOption>());
                        item.Value[lv].Add(eParts.Gloves, new List <eOption>());
                        item.Value[lv].Add(eParts.Pants, new List <eOption>());
                        item.Value[lv].Add(eParts.Armor, new List <eOption>());
                        item.Value[lv].Add(eParts.Head, new List <eOption>());
                        item.Value[lv].Add(eParts.Jewel, new List <eOption>());
                    }
                }
            }

            foreach (var node in dic)
            {
                int       lv       = node.Value.m_nAppearLv;
                eOption   opt      = node.Value.m_eOption;
                eOptGrade optGrade = (eOptGrade)((int)opt >> 8);

                foreach (var beyond in node.Value.m_nArrBeyond)
                {
                    if ((eBeyond)beyond == eBeyond.None)
                    {
                        int cnt = node.Value.m_nArrParts.Length;
                        for (int i = 0; i < cnt; ++i)
                        {
                            eParts parts = (eParts)node.Value.m_nArrParts[i];

                            if (optGrade < eOptGrade.Legend)
                            {
                                foreach (var list in m_optList[eGrade.Normal])
                                {
                                    if (lv <= list.Key)
                                    {
                                        list.Value[parts].Add(opt);
                                    }
                                }
                            }
                            else if (eOptGrade.Legend == optGrade)
                            {
                                foreach (var list in m_optList[eGrade.Legend])
                                {
                                    if (lv <= list.Key)
                                    {
                                        list.Value[parts].Add(opt);
                                    }
                                }
                            }
                            else if (eOptGrade.Set == optGrade)
                            {
                                foreach (var list in m_optList[eGrade.Set])
                                {
                                    if (lv <= list.Key)
                                    {
                                        list.Value[parts].Add(opt);
                                    }
                                }
                            }
                        }
                    }
                }
            }

            m_nLvRange = m_nLvRange.OrderBy(x => x).ToList();

            return(true);
        }
示例#15
0
 public static T Find <T>(int code) where T : fmData
 {
     return(m_tableFmData.Find <T>(code));
 }