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; }
public MagicValueType(MagicValueType v) { boxee = v.boxee; }
public bool Equals(MagicValueType other) { return boxee.Equals(other.boxee); }
public bool Equals(MagicValueType other) { return(boxee.Equals(other.boxee)); }