protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder); Event.ConfigureForDatabase(builder); Region.ConfigureForDatabase(builder); LocationGroup.ConfigureForDatabase(builder); Location.ConfigureForDatabase(builder); BagCategory.ConfigureForDatabase(builder); Item.ConfigureForDatabase(builder); PlacedItem.ConfigureForDatabase(builder); Currency.ConfigureForDatabase(builder); CurrencyAmount.ConfigureForDatabase(builder); ElementalType.ConfigureForDatabase(builder); ElementalTypeRelation.ConfigureForDatabase(builder); Ability.ConfigureForDatabase(builder); PvpTier.ConfigureForDatabase(builder); PokemonAvailability.ConfigureForDatabase(builder); PokemonVarietyUrl.ConfigureForDatabase(builder); Entities.PokemonSpecies.ConfigureForDatabase(builder); PokemonVariety.ConfigureForDatabase(builder); PokemonForm.ConfigureForDatabase(builder); Evolution.ConfigureForDatabase(builder); MoveDamageClass.ConfigureForDatabase(builder); Move.ConfigureForDatabase(builder); MoveTutor.ConfigureForDatabase(builder); MoveTutorMove.ConfigureForDatabase(builder); MoveTutorMovePrice.ConfigureForDatabase(builder); MoveLearnMethod.ConfigureForDatabase(builder); MoveLearnMethodLocation.ConfigureForDatabase(builder); MoveLearnMethodLocationPrice.ConfigureForDatabase(builder); LearnableMove.ConfigureForDatabase(builder); LearnableMoveLearnMethod.ConfigureForDatabase(builder); TimeOfDay.ConfigureForDatabase(builder); Season.ConfigureForDatabase(builder); SeasonTimeOfDay.ConfigureForDatabase(builder); SpawnType.ConfigureForDatabase(builder); Spawn.ConfigureForDatabase(builder); SpawnOpportunity.ConfigureForDatabase(builder); Nature.ConfigureForDatabase(builder); HuntingConfiguration.ConfigureForDatabase(builder); Build.ConfigureForDatabase(builder); ItemOption.ConfigureForDatabase(builder); MoveOption.ConfigureForDatabase(builder); NatureOption.ConfigureForDatabase(builder); ItemStatBoost.ConfigureForDatabase(builder); Entities.ItemStatBoostPokemon.ConfigureForDatabase(builder); ImportSheet.ConfigureForDatabase(builder); }
/// <summary> /// Process the Legacy GameMasters /// </summary> /// <param name="legacyGameMasters"></param> public static void Initialize(GameMasterTemplate currentGameMasterTemplate, IEnumerable <GameMasterTemplate> legacyGameMasterTemplates, PokemonAvailability pokemonReleases, SpecialMoves specialMoves) { PokemonReleases = pokemonReleases; foreach (var legacyGameMasterTemplate in legacyGameMasterTemplates) { foreach (var itemTemplate in legacyGameMasterTemplate.GameMaster.item_templates) { if (IsValidItemTemplate(itemTemplate, legacyGameMasterTemplate.GameMaster.timestamp_ms)) { // Get the Legacy Moves. if (!FastMoves.ContainsKey(itemTemplate.template_id)) { FastMoves.Add(itemTemplate.template_id, new List <PokemonMove>()); } List <PokemonMove> fastMoves = FastMoves[itemTemplate.template_id]; foreach (var move in itemTemplate.pokemon_settings.quick_moves) { if (!fastMoves.Contains(move)) { fastMoves.Add(move); } } if (!ChargedMoves.ContainsKey(itemTemplate.template_id)) { ChargedMoves.Add(itemTemplate.template_id, new List <PokemonMove>()); } List <PokemonMove> chargedMoves = ChargedMoves[itemTemplate.template_id]; foreach (var move in itemTemplate.pokemon_settings.cinematic_moves) { if (!chargedMoves.Contains(move)) { chargedMoves.Add(move); } } } } } foreach (var specialMove in specialMoves.Move) { if (specialMove.IsFast) { if (!FastMoves.ContainsKey(specialMove.pokemonTemplateId)) { FastMoves.Add(specialMove.pokemonTemplateId, new List <PokemonMove>()); } List <PokemonMove> fastMoves = FastMoves[specialMove.pokemonTemplateId]; if (!fastMoves.Contains(specialMove.movementId)) { fastMoves.Add(specialMove.movementId); } } else { if (!ChargedMoves.ContainsKey(specialMove.pokemonTemplateId)) { ChargedMoves.Add(specialMove.pokemonTemplateId, new List <PokemonMove>()); } List <PokemonMove> chargedMoves = ChargedMoves[specialMove.pokemonTemplateId]; if (!chargedMoves.Contains(specialMove.movementId)) { chargedMoves.Add(specialMove.movementId); } } } }