bool IsPropertyAllowed(GearSetProperty p)
        {
            if (PropertiesToIgnore.Contains(p.Property))
            {
                return(false);
            }
            if (p.ItemProperties[0].Type == "set")
            {
                return(false);
            }

            return(true);
        }
Ejemplo n.º 2
0
        void AddProperties(List <ItemProperty> properties)
        {
            foreach (var p in properties)
            {
                GearSetProperty gsp = Properties.Find(pr => pr.Property == p.Property);
                if (gsp == null)
                {
                    // options get ignored, as the optionals will be applied separately
                    if (p.Options != null && p.Options.Count > 0 && !p.HideOptions)
                    {
                        continue;
                    }
                    // we never want to show minimum level or handedness
                    if (p.Property == "Minimum Level" || p.Property == "Handedness")
                    {
                        continue;
                    }

                    gsp = new GearSetProperty {
                        Property = p.Property
                    };
                    if (gsp.Property == "Damage Reduction")
                    {
                        gsp.IsGroup = true;
                    }
                    else if (gsp.Property == "Augment Slot")
                    {
                        gsp.IsGroup = true;
                    }
                    else if (p.Type == "set")
                    {
                        gsp.IsGroup = true;
                    }
                    Properties.Add(gsp);
                }

                gsp.AddItemProperty(p);
            }
        }
 void AddPropertyToList(GearSetProperty p, Color c, ListView lv)
 {
     lv.Items.Add(new CompareListItem {
         Text = p.Property + (p.TotalValue != 0 ? " " + p.TotalValue : ""), Prop = p, BackgroundColor = c
     });
 }