private void ValidateList(Mobile m) { if (ToCombine == null) { return; } var copy = new List <RefinementComponent>(ToCombine); foreach (var comp in copy) { if (comp == null || comp.Deleted || !comp.IsChildOf(m.Backpack)) { ToCombine.Remove(comp); } } ColUtility.Free(copy); }
private void ValidateList(Mobile m) { if (ToCombine == null) { return; } List <RefinementComponent> copy = new List <RefinementComponent>(ToCombine); for (var index = 0; index < copy.Count; index++) { RefinementComponent comp = copy[index]; if (comp == null || comp.Deleted || !comp.IsChildOf(m.Backpack)) { ToCombine.Remove(comp); } } ColUtility.Free(copy); }