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;
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 2
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 DrawCosmeticUff(ItemsIdParser theItem, Graphics myGraphic)
 {
     if (CosmeticUff != null)
     {
         if (CosmeticUff.Contains("Animated"))
         {
             Image animatedLogo = Resources.T_Icon_Animated_64;
             myGraphic.DrawImage(ImageUtilities.ResizeImage(animatedLogo, 32, 32), new Point(6, -2));
         }
         else if (CosmeticUff.Contains("HasUpgradeQuests") && theItem.ExportType != "AthenaPetCarrierItemDefinition")
         {
             Image questLogo = Resources.T_Icon_Quests_64;
             myGraphic.DrawImage(ImageUtilities.ResizeImage(questLogo, 32, 32), new Point(6, 6));
         }
         else if (CosmeticUff.Contains("HasUpgradeQuests") && theItem.ExportType == "AthenaPetCarrierItemDefinition")
         {
             Image petLogo = Resources.T_Icon_Pets_64;
             myGraphic.DrawImage(ImageUtilities.ResizeImage(petLogo, 32, 32), new Point(6, 6));
         }
         else if (CosmeticUff.Contains("HasVariants"))
         {
             Image variantsLogo = Resources.T_Icon_Variant_64;
             myGraphic.DrawImage(ImageUtilities.ResizeImage(variantsLogo, 32, 32), new Point(6, 6));
         }
         else if (CosmeticUff.Contains("Reactive"))
         {
             Image reactiveLogo = Resources.T_Icon_Adaptive_64;
             myGraphic.DrawImage(ImageUtilities.ResizeImage(reactiveLogo, 32, 32), new Point(7, 7));
         }
         else if (CosmeticUff.Contains("Traversal"))
         {
             Image traversalLogo = Resources.T_Icon_Traversal_64;
             myGraphic.DrawImage(ImageUtilities.ResizeImage(traversalLogo, 32, 32), new Point(6, 3));
         }
     }
 }