public NetworkClient(PBEClient client, PBEBattlePacket bp, byte battleId, string name) : base(name) { var b = PBEBattle.CreateRemoteBattle(bp); Battle = b; if (battleId != byte.MaxValue) { Trainer = b.Trainers[battleId]; } BattleView = new BattleView(this); client.Battle = b; _client = client; client.Disconnected += OnDisconnected; client.Error += OnError; client.PacketReceived += OnPacketReceived; ShowAllPokemon(); Send(new PBEResponsePacket()); }