Пример #1
0
        private void LoadDefs()
        {
            Defs.LoadDefs();
            var currentArea = string.Empty;

            foreach (var area in Defs.Areas)
            {
                cboxAreaTeleport.Items.Add(area.Name);
            }

            foreach (var boss in Defs.Bosses)
            {
                var area = boss.Areaname.Area();
                var idol = boss.IdolName.Idol();
                if (area == null && idol == null)
                {
                    continue;
                }
                if (currentArea != boss.Areaname)
                {
                    currentArea = boss.Areaname;
                    cboxBossTeleport.Items.Add("-" + boss.Areaname);
                }

                boss.Idol = idol;
                boss.Area = area;

                cboxBossTeleport.Items.Add(boss.Name);
            }

            currentArea = string.Empty;
            foreach (var idol in Defs.Idols)
            {
                var area = idol.Areaname.Area();
                if (area == null)
                {
                    continue;
                }
                if (currentArea != idol.Areaname)
                {
                    currentArea = idol.Areaname;
                    cboxIdolTeleport.Items.Add("-" + idol.Areaname);
                }
                idol.Area = area;

                cboxIdolTeleport.Items.Add(idol.Name);
            }
        }