Ejemplo n.º 1
0
 public static int GetSuggestedRegion(this MysteryGiftRestriction value)
 {
     for (int i = (int)Region3DSIndex.Japan; i <= (int)Region3DSIndex.Taiwan; i++)
     {
         if (value.HasFlagFast((MysteryGiftRestriction)((int)MysteryGiftRestriction.RegionBase << i)))
         {
             return(i);
         }
     }
     return(-1);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Checks the flags to pick out a language that can receive the gift.
 /// </summary>
 /// <param name="value">Flag value</param>
 /// <returns>Language ID; -1 if none</returns>
 public static int GetSuggestedLanguage(this MysteryGiftRestriction value)
 {
     for (int i = (int)LanguageID.Japanese; i <= (int)LanguageID.Korean; i++)
     {
         if (value.HasFlagFast((MysteryGiftRestriction)(1 << i)))
         {
             return(i);
         }
     }
     return(-1);
 }