コード例 #1
0
        public void RegisterPokemon(IPokemon pokemon)
        {
            ushort            speciesID   = pokemon.SpeciesID;
            StrategyMemoEntry unusedEntry = null;

            for (int i = 0; i < entries.Count; i++)
            {
                if (entries[i].SpeciesID == speciesID)
                {
                    return;
                }
                else if (entries[i].SpeciesID == 0 && unusedEntry == null)
                {
                    unusedEntry = entries[i];
                }
            }
            if (unusedEntry == null)
            {
                entries.Add(new StrategyMemoEntry(gameSave.GameType == GameTypes.XD));
                unusedEntry = entries[entries.Count - 1];
            }
            unusedEntry.SpeciesID        = pokemon.SpeciesID;
            unusedEntry.FirstTrainerID   = pokemon.TrainerID;
            unusedEntry.FirstSecretID    = pokemon.SecretID;
            unusedEntry.FirstPersonality = pokemon.Personality;
            if (gameSave.GameType == GameTypes.XD)
            {
                unusedEntry.Flags = 0x2;
            }
            else
            {
                unusedEntry.Flags = 0x0;
            }
        }
コード例 #2
0
        public uint GetPokedexPokemonPersonality(ushort dexID)
        {
            StrategyMemoEntry entry = MostRecentSave.StrategyMemoData[dexID];

            if (entry != null)
            {
                return(entry.FirstPersonality);
            }
            return(0);
        }
コード例 #3
0
        public bool IsPokedexPokemonShiny(ushort dexID)
        {
            StrategyMemoEntry entry = MostRecentSave.StrategyMemoData[dexID];

            if (entry != null)
            {
                return(entry.IsShiny);
            }
            return(false);
        }