Example #1
0
            public override bool TryGetMember(GetMemberBinder binder, out object result)
            {
                result = false;
                try
                {

                    //var p = double.PositiveInfinity;
                    var n = binder.Name;
                    var splits = n.Split('_');
                    var set = dbc.Sets[splits[0]];

                    if (!wornPieces.ContainsKey(splits[0]))
                    {
                        int count = 0;
                        foreach (var it in Me.Inventory.Equipped.Items)
                        {
                            if (it == null) continue;

                            var i = (uint) it.ItemInfo.Id;

                            if (set.Keys.Contains(i)) count++;
                        }

                        wornPieces[splits[0]] = count;
                    }

                    result = new MagicValueType(Convert.ToInt32(splits[1][0]) <= wornPieces[splits[0]]);
                }
                catch (Exception e)
                {
                    //SimcraftImpl.Write(e.ToString());
                    result = new MagicValueType(false);
                    return true;
                }
                return true;
            }
Example #2
0
 public MagicValueType(MagicValueType v)
 {
     boxee = v.boxee;
 }
Example #3
0
 public MagicValueType(MagicValueType v)
 {
     boxee = v.boxee;
 }
Example #4
0
 public bool Equals(MagicValueType other)
 {
     return boxee.Equals(other.boxee);
 }
Example #5
0
 public bool Equals(MagicValueType other)
 {
     return(boxee.Equals(other.boxee));
 }