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);
        }
        public static bool Load(fmDataTable table)
        {
            Dictionary <int, fmDataExplore> dic = theFmDataFinder.Find <fmDataExplore>(eFmDataType.Explore);

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

            m_maps.Clear();

            foreach (var node in dic)
            {
                m_maps.Add(new rdMap {
                    Code = node.Value.m_nLinkCode, Open = node.Value.m_nLinkCode == 101 ? true : false
                });
            }

            m_inDuns.Clear();
            foreach (var node in dic)
            {
                if (1 == node.Value.m_nInDun)
                {
                    m_inDuns.Add(new rdInDun {
                        Code = node.Value.m_nLinkCode, Shortcut = 0, CurPlace = 0, Forge = 0
                    });
                }
            }

            return(true);
        }
        //fmGochaGoblin m_mazeGoblin = null;

        public bool Load(fmDataTable table)
        {
            if (false == LoadGochaMeet())
            {
                return(false);
            }
            if (false == LoadExplore(table))
            {
                return(false);
            }
            if (false == LoadTomb(table))
            {
                return(false);
            }
            if (false == LoadMaze(table))
            {
                return(false);
            }
            if (false == LoadInDun(table))
            {
                return(false);
            }
            if (false == LoadMonster(table))
            {
                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);
        }
Beispiel #5
0
        public static bool Load(fmDataTable table, AttacherConfig chatConfig)
        {
            if (null == chatConfig)
            {
                return(false);
            }

            if (true == string.IsNullOrEmpty(chatConfig.m_strIP))
            {
                return(false);
            }

            if (0 == chatConfig.m_nPort)
            {
                return(false);
            }

            ChatSvrIp   = chatConfig.m_strIP;
            ChatSvrPort = chatConfig.m_nPort;

            //Dictionary<int, fmData> dics = table.Find(eFmDataType.GameConst);
            //if (null == dics)
            //    return false;

            //foreach (var node in dics)
            //{
            //    fmDataGameConst data = node.Value as fmDataGameConst;
            //    if (false == Add(data))
            //        return false;
            //}

            return(true);
        }
Beispiel #6
0
        public bool Load(fmDataTable table)
        {
            if (false == LoadData(table))
            {
                return(false);
            }
            if (false == m_option.Load())
            {
                return(false);
            }

            if (false == m_enchAnciOptList.Load(table))
            {
                return(false);
            }
            if (false == m_dropOptList.Load(table))
            {
                return(false);
            }
            if (false == m_createMythicOptList.Load(table))
            {
                return(false);
            }

            return(true);
        }
Beispiel #7
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);
        }
Beispiel #8
0
 public TempleteCreater(RichTextBox _textbox, ProgressBar PartPB, ProgressBar totalPB)
 {
     m_tableFmData = new fmDataTable();
     m_textbox     = _textbox;
     m_pbPart      = PartPB;
     m_pbTotal     = totalPB;
     TextBoxClear();
 }
        private bool LoadMonster(fmDataTable table)
        {
            m_dicMonster = table.Find <fmDataMonster>(eFmDataType.Monster);
            if (null == m_dicMonster)
            {
                return(false);
            }

            return(true);
        }
Beispiel #10
0
        public static bool Load(fmDataTable table)
        {
            m_matchGoblin.Clear();
            m_matchGoblin.Add(20001, eReward.Gold);
            m_matchGoblin.Add(20002, eReward.Item);
            m_matchGoblin.Add(20003, eReward.Stone);
            m_matchGoblin.Add(20004, eReward.Ruby);

            return(true);
        }
Beispiel #11
0
        public static bool Load(fmDataTable table)
        {
            if (null == table)
            {
                return(false);
            }

            m_tableFmData = table;

            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);
        }
Beispiel #13
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);
        }
        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 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);
        }
        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 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);
        }
Beispiel #20
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);
        }
        public override bool LoadData()
        {
            Logger.Info("LoadData -> Start");

            string      name  = "fmData.fm";
            string      path  = string.Format(@"{0}\{1}", System.IO.Directory.GetCurrentDirectory(), name);
            fmDataTable table = m_fmDataTableLoader.Load(path);

            if (null == table)
            {
                return(false);
            }
            if (false == theFmDataFinder.Load(table))
            {
                return(false);
            }
            if (false == theGameConst.Load(table, m_config.m_publicChat))
            {
                return(false);
            }
            if (false == theLordCreater.Load(table))
            {
                return(false);
            }
            if (false == theDiscoverer.Load(table))
            {
                return(false);
            }
            if (false == theOptionPicker.Instance.Load(table))
            {
                return(false);
            }
            if (false == theMissionPicker.Load(table))
            {
                return(false);
            }
            if (false == theShop.Load(table))
            {
                return(false);
            }

            if (false == theMapChecker.Instance.Load(table))
            {
                return(false);
            }
            if (false == theInDunChecker.Instance.Load(table))
            {
                return(false);
            }
            if (false == theMonsterPicker.Instance.Load(table))
            {
                return(false);
            }
            if (false == theItemPicker.Instance.Load(table))
            {
                return(false);
            }
            if (false == LordManager.Instance.Load(table))
            {
                return(false);
            }
            //if (false == MazeManager.Instance.Load(table)) return false;


            Logger.Info("LoadData -> End");

            return(true);
        }
        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);
        }