internal Pokemon(string[] data) { Uid = Convert.ToInt32(data[0]); Id = Convert.ToInt32(data[1]); DatabaseId = Convert.ToInt32(data[2]); MaxHealth = Convert.ToInt32(data[5]); CurrentHealth = Convert.ToInt32(data[6]); Moves = new PokemonMove[4]; Moves[0] = new PokemonMove(1, Convert.ToInt32(data[7]), Convert.ToInt32(data[11]), Convert.ToInt32(data[15])); Moves[1] = new PokemonMove(2, Convert.ToInt32(data[8]), Convert.ToInt32(data[12]), Convert.ToInt32(data[16])); Moves[2] = new PokemonMove(3, Convert.ToInt32(data[9]), Convert.ToInt32(data[13]), Convert.ToInt32(data[17])); Moves[3] = new PokemonMove(4, Convert.ToInt32(data[10]), Convert.ToInt32(data[14]), Convert.ToInt32(data[18])); Experience = new PokemonExperience(Convert.ToInt32(data[3]), Convert.ToInt32(data[28]), Convert.ToInt32(data[19])); IsShiny = (data[20] == "1"); Status = data[21]; Gender = data[22]; OriginalTrainer = data[29]; Region = (Region)Convert.ToInt32(data[47]); Form = Convert.ToInt32(data[48]); Nature = new PokemonNature(Convert.ToInt32(data[36])); Ability = new PokemonAbility(Convert.ToInt32(data[38])); Happiness = Convert.ToInt32(data[37]); ItemHeld = data[40]; Stats = new PokemonStats(data, 23, MaxHealth); IV = new PokemonStats(data, 30); EV = new PokemonStats(data, 41); }
internal TradePokemon(string[] data) { Id = Convert.ToInt32(data[0]); Uid = -1; DatabaseId = Convert.ToInt32(data[34]); CurrentHealth = Convert.ToInt32(data[14]); Happiness = 75; Experience = new PokemonExperience(Convert.ToInt32(data[1]), Convert.ToInt32(data[19]), Convert.ToInt32(data[18])); Moves = new PokemonMove[4]; //TODO: identify maxPoints int maxPP = 0; Moves[0] = new PokemonMove(1, Convert.ToInt32(data[21]), maxPP, maxPP); Moves[1] = new PokemonMove(2, Convert.ToInt32(data[22]), maxPP, maxPP); Moves[2] = new PokemonMove(3, Convert.ToInt32(data[23]), maxPP, maxPP); Moves[3] = new PokemonMove(4, Convert.ToInt32(data[24]), maxPP, maxPP); Nature = new PokemonNature(Convert.ToInt32(data[17])); Ability = new PokemonAbility(Convert.ToInt32(data[16])); IsShiny = (data[2] == "1"); ItemHeld = data[26]; OriginalTrainer = data[20]; Gender = data[15]; Form = Convert.ToInt32(data[33]); Stats = new PokemonStats(data, 9); IV = new PokemonStats(data, 4); EV = new PokemonStats(data, 27); }