Exemplo n.º 1
0
 /// <summary>
 /// search for a known Cosmetics.UserFacingFlags, if found draw the uff icon
 /// Cosmetics.UserFacingFlags icons are basically the style icon or the animated/reactive/traversal icon
 /// </summary>
 /// <param name="theItem"></param>
 /// <param name="myGraphic"></param>
 private static void DrawCosmeticUffFromArray(JToken theItem, Graphics myGraphic)
 {
     if (CosmeticUff != null)
     {
         int xCoord = 6;
         for (int x = 0; x < tertiaryCategoriesArray.Count; x++)
         {
             JToken categoryName = tertiaryCategoriesArray[x]["CategoryName"];
             if (categoryName != null)
             {
                 JToken text = categoryName["source_string"];
                 if (text != null)
                 {
                     if (CosmeticUff.Any(target => target.Contains("Animated")) && string.Equals(text.Value <string>(), "Animated"))
                     {
                         Image imageLogo = getUffFromBrush(x);
                         drawImageLogo(myGraphic, imageLogo, xCoord);
                         xCoord += 28;
                     }
                     else if (CosmeticUff.Any(target => target.Contains("HasVariants")) && string.Equals(text.Value <string>(), "Unlockable Styles"))
                     {
                         Image imageLogo = getUffFromBrush(x);
                         drawImageLogo(myGraphic, imageLogo, xCoord);
                         xCoord += 28;
                     }
                     else if (CosmeticUff.Any(target => target.Contains("Reactive")) && string.Equals(text.Value <string>(), "Reactive"))
                     {
                         Image imageLogo = getUffFromBrush(x);
                         drawImageLogo(myGraphic, imageLogo, xCoord);
                         xCoord += 28;
                     }
                     else if (CosmeticUff.Any(target => target.Contains("Traversal")) && string.Equals(text.Value <string>(), "Traversal"))
                     {
                         Image imageLogo = getUffFromBrush(x);
                         drawImageLogo(myGraphic, imageLogo, xCoord);
                         xCoord += 28;
                     }
                     else if (CosmeticUff.Any(target => target.Contains("BuiltInEmote")) && string.Equals(text.Value <string>(), "Built-in"))
                     {
                         Image imageLogo = getUffFromBrush(x);
                         drawImageLogo(myGraphic, imageLogo, xCoord);
                         xCoord += 28;
                     }
                     else if (CosmeticUff.Any(target => target.Contains("HasUpgradeQuests")) && string.Equals(text.Value <string>(), "Unlockable Styles") && !theItem["export_type"].Value <string>().Equals("AthenaPetCarrierItemDefinition"))
                     {
                         Image imageLogo = Resources.Quests64;
                         drawImageLogo(myGraphic, imageLogo, xCoord);
                         xCoord += 28;
                     }
                     else if (CosmeticUff.Any(target => target.Contains("HasUpgradeQuests")) && string.Equals(text.Value <string>(), "Unlockable Styles") && theItem["export_type"].Value <string>().Equals("AthenaPetCarrierItemDefinition"))
                     {
                         Image imageLogo = Resources.Pets64;
                         drawImageLogo(myGraphic, imageLogo, xCoord);
                         xCoord += 28;
                     }
                 }
             }
         }
     }
 }