public static void HandleAccountCapabilitiesMessage(Bot bot, AccountCapabilitiesMessage message) { bot.ClientInformations.Update(message); }
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(); }