public override string HandoutReward(EventRanking eventRanking, int position, bool isTesting) { base.HandoutReward(eventRanking, position, isTesting); if (!Data.Scores.TryGetValue(eventRanking.Client.Player.CharID, out var userScore)) { return(""); } var availableSpecies = userScore.FoundSpecies.ToList(); var selectedIndex = Server.Math.Rand(0, availableSpecies.Count); var selectedSpecies = Pokedex.GetPokemon(availableSpecies[selectedIndex]); if (!isTesting) { var recruit = new Recruit(eventRanking.Client); //recruit.SpriteOverride = -1; recruit.Level = 1; recruit.Species = selectedSpecies.ID; recruit.Sex = Pokedex.GetPokemonForm(selectedSpecies.ID).GenerateLegalSex(); recruit.Name = Pokedex.GetPokemon(selectedSpecies.ID).Name; recruit.Shiny = Enums.Coloration.Shiny; recruit.NpcBase = 0; recruit.GenerateMoveset(); using (var dbConnection = new DatabaseConnection(DatabaseID.Players)) { eventRanking.Client.Player.AddToRecruitmentBank(dbConnection, recruit); } } return($"a shiny {selectedSpecies.Name}"); }
public override string HandoutReward(EventRanking eventRanking, int position, bool isTesting) { base.HandoutReward(eventRanking, position, isTesting); switch (position) { case 1: { if (!isTesting) { eventRanking.Client.Player.GiveItem(133, 10); } return("10 Arcade Tokens"); } case 2: { if (!isTesting) { eventRanking.Client.Player.GiveItem(133, 5); } return("5 Arcade Tokens"); } case 3: { if (!isTesting) { eventRanking.Client.Player.GiveItem(133, 3); } return("3 Arcade Tokens"); } } return(""); }