Beispiel #1
0
 public Player AddPlayer(IPEndPoint client, PacketModel packet, string udp)
 {
     if (Config.udpVersion != udp)
     {
         return((Player)null);
     }
     try
     {
         Player player = this._players[packet._slot];
         if (!player.CompareIP(client))
         {
             player._client         = client;
             player._date           = packet._receiveDate;
             player._playerIdByUser = packet._accountId;
             return(player);
         }
     }
     catch (Exception ex)
     {
         Logger.warning(ex.ToString(), false);
     }
     return((Player)null);
 }
Beispiel #2
0
 public Player AddPlayer(IPEndPoint client, PacketModel packet, string udp)
 {
     if (Config.udpVersion != udp)
     {
         return(null);
     }
     try
     {
         Player pl = _players[packet._slot];
         if (!pl.CompareIP(client))
         {
             pl._client         = client;
             pl._date           = packet._receiveDate;
             pl._playerIdByUser = packet._accountId;
             return(pl);
         }
     }
     catch (Exception ex)
     {
         SaveLog.fatal(ex.ToString());
         Printf.b_danger("[Room.AddPlayer] Erro fatal!");
     }
     return(null);
 }