@@ -81,7 +81,7 @@ public interface IServerQuery
8181
8282 public class ServerQuery : IServerQuery , IDisposable
8383 {
84- private const int RESPONSE_HEADER_COUNT = 6 ;
84+ private const int RESPONSE_HEADER_COUNT = 5 ;
8585 private const int RESPONSE_CODE_INDEX = 5 ;
8686
8787 private readonly UdpClient _client = new UdpClient ( new IPEndPoint ( IPAddress . Any , 0 ) ) ;
@@ -211,7 +211,6 @@ public async Task<List<Rule>> GetRulesAsync()
211211 byte [ ] response = await SendRequestAsync ( RequestHeaders . A2S_RULES , BitConverter . GetBytes ( _currentChallenge ) ) ;
212212 if ( response . Length > 0 )
213213 {
214- var rls = ExtractListData < Rule > ( response ) ;
215214 return ExtractListData < Rule > ( response ) ;
216215 }
217216 else
@@ -330,7 +329,7 @@ private IEnumerable<byte> ExtractData<TObject>(TObject objectRef, byte[] dataSou
330329
331330 // We can be a good guy and ask for any extra jobs :)
332331 IEnumerable < byte > enumerableSource = stripHeaders
333- ? dataSource . Skip ( RESPONSE_HEADER_COUNT )
332+ ? dataSource . Skip ( RESPONSE_HEADER_COUNT )
334333 : dataSource ;
335334
336335 // We get every property that does not contain ParseCustom and NotParsable attributes on them to iterate through all and parse/assign their values.
@@ -390,7 +389,7 @@ private IEnumerable<byte> ExtractData<TObject>(TObject objectRef, byte[] dataSou
390389
391390 /* If the property is an enum we should parse it first then assign its value,
392391 * if not we can just give it to SetValue since it was converted by ExtractMarshalType already.*/
393- property . SetValue ( objectRef , property . PropertyType . IsEnum
392+ property . SetValue ( objectRef , property . PropertyType . IsEnum
394393 ? Enum . Parse ( property . PropertyType , result . ToString ( ) )
395394 : result ) ;
396395
0 commit comments