Beispiel #1
0
 public MapClient(MapConnection connection)
 {
     _connection = connection;
     _connection.PacketReceived += OnPacketReceived;
     _connection.Connected      += OnConnected;
     _connection.Disconnected   += OnDisconnected;
 }
Beispiel #2
0
        public GameClient(GameConnection connection, MapConnection mapConnection)
        {
            _mapClient = new MapClient(mapConnection);
            _mapClient.ConnectionOpened += MapClient_ConnectionOpened;
            _mapClient.ConnectionClosed += MapClient_ConnectionClosed;
            _mapClient.ConnectionFailed += MapClient_ConnectionFailed;
            _mapClient.MapLoaded += MapClient_MapLoaded;

            _connection = connection;
            _connection.PacketReceived += OnPacketReceived;
            _connection.Connected += OnConnectionOpened;
            _connection.Disconnected += OnConnectionClosed;

            Rand = new Random();
            I18n = new Language();
            Team = new List<Pokemon>();
            CurrentPCBox = new List<Pokemon>();
            Items = new List<InventoryItem>();
            Channels = new List<ChatChannel>();
            Conversations = new List<string>();
            Players = new Dictionary<string, PlayerInfos>();
            PCGreatestUid = -1;
            IsPrivateMessageOn = true;
        }