Пример #1
0
 public static void HandleAccountCapabilitiesMessage(Bot bot, AccountCapabilitiesMessage message)
 {
     bot.ClientInformations.Update(message);
 }
Пример #2
0
 public void Update(AccountCapabilitiesMessage msg)
 {
     if (msg == null) throw new ArgumentNullException("msg");
     VisibleBreeds = Enum.GetValues(typeof(PlayableBreedEnum)).
         Cast<PlayableBreedEnum>().Where(entry => ( ( msg.breedsVisible >> (int)entry - 1 ) & 1 ) == 1).ToArray();
     AvailableBreeds = Enum.GetValues(typeof(PlayableBreedEnum)).
         Cast<PlayableBreedEnum>().Where(entry => ( ( msg.breedsAvailable >> (int)entry - 1 ) & 1 ) == 1).ToArray();
 }