示例#1
0
        public void SaveEncounter(int PlayerId, int EncounterType, int Id)
        {
            var EncounterArchive = new EncounterArchive()
            {
                GameId          = Id,
                EncounterType   = EncounterType,
                StartDate       = DateTime.Now,
                PlayerId        = PlayerId,
                EncounterStatus = 2
            };

            IoC.Castle.Resolve <IGameRepository>().Insert(EncounterArchive);
        }
示例#2
0
        public GGWE(GameManager rom, string json)
        {
            InitializeComponent();
            EncounterArchive obj = EncounterArchive.ReadJson(json);

            if (obj?.EncounterTables?[0]?.GroundTable == null)
            {
                WinFormsUtil.Error("Bad json data provided.", $"Unable to parse to {nameof(EncounterArchive)} data.");
                Close();
            }

            ROM = rom;

            var spec    = rom.GetStrings(TextName.SpeciesNames);
            var species = (string[])spec.Clone();

            species[0]            = "";
            EncounterList.species = species;
            var locs = rom.GetStrings(TextName.metlist_000000);

            EL_Ground.Initialize();
            EL_Water.Initialize();
            EL_Old.Initialize();
            EL_Good.Initialize();
            EL_Super.Initialize();
            EL_Sky.Initialize();

            TC_Tables.Controls.Remove(Tab_Old);
            TC_Tables.Controls.Remove(Tab_Good);
            TC_Tables.Controls.Remove(Tab_Super);
            EL_Old.OverworldSpawn = EL_Good.OverworldSpawn = EL_Super.OverworldSpawn = false;
            L_Rank.Visible        = NUD_RankMin.Visible = NUD_RankMax.Visible = false;

            PG_Species.SelectedObject = EditUtil.Settings.Species;

            Tables = obj;
            LoadFile(locs);

            EL_Ground.ShowForm        = false;
            EL_Water.ShowForm         = false;
            EL_Old.ShowForm           = false;
            EL_Good.ShowForm          = false;
            EL_Super.ShowForm         = false;
            EL_Sky.ShowForm           = false;
            CB_Location.SelectedIndex = 0;
        }
示例#3
0
文件: GGWE.cs 项目: PP-theSLAYER/pkNX
        public GGWE(GameManager rom, string json)
        {
            InitializeComponent();
            EncounterArchive obj = EncounterArchive.ReadJson(json);

            ROM = rom;

            var spec    = rom.GetStrings(TextName.SpeciesNames);
            var species = (string[])spec.Clone();

            species[0]            = "";
            EncounterList.species = species;
            var locs = rom.GetStrings(TextName.metlist_000000);

            EL_Ground.Initialize();
            EL_Water.Initialize();
            EL_Old.Initialize();
            EL_Good.Initialize();
            EL_Super.Initialize();
            EL_Sky.Initialize();

            TC_Tables.Controls.Remove(Tab_Old);
            TC_Tables.Controls.Remove(Tab_Good);
            TC_Tables.Controls.Remove(Tab_Super);
            EL_Old.OverworldSpawn = EL_Good.OverworldSpawn = EL_Super.OverworldSpawn = false;
            L_Rank.Visible        = NUD_RankMin.Visible = NUD_RankMax.Visible = false;

            PG_Species.SelectedObject = EditUtil.Settings.Species;

            Tables = obj;
            LoadFile(locs);

            EL_Ground.ShowForm        = false;
            EL_Water.ShowForm         = false;
            EL_Old.ShowForm           = false;
            EL_Good.ShowForm          = false;
            EL_Super.ShowForm         = false;
            EL_Sky.ShowForm           = false;
            CB_Location.SelectedIndex = 0;
        }
示例#4
0
文件: GGWE.cs 项目: littlefoxy99/pkNX
        private static IEnumerable <string> GetEncounterTableSummary(GameManager rom, EncounterArchive table)
        {
            var locationNames = rom.GetStrings(TextName.metlist_000000);
            var specs         = rom.GetStrings(TextName.SpeciesNames);

            var locs      = table.EncounterTables.Select(z => z.ZoneID);
            var names     = GetNames(locs, locationNames);
            var dupeNamed = GetScreenedNames(names).ToArray();

            return(EncounterTableUtil.GetLines(table, dupeNamed, specs));
        }