Run Re-Do
This commit is contained in:
@@ -31,5 +31,16 @@ namespace ProjectM.Simulation
|
||||
if (mods[j].SourceId == sourceId) { mods.RemoveAtSwapBack(j); removed++; }
|
||||
return removed;
|
||||
}
|
||||
|
||||
/// <summary>Remove every <see cref="StatModifier"/> row whose SourceId lies in [lo, hiExclusive) — the
|
||||
/// run-scoped BOON strip (per-pick distinct ids share the band; one call clears the whole run's boons while
|
||||
/// class/meta/equip bands survive untouched). Idempotent; RemoveAtSwapBack. Returns the count removed.</summary>
|
||||
public static int RemoveBySourceIdRange(DynamicBuffer<StatModifier> mods, uint lo, uint hiExclusive)
|
||||
{
|
||||
int removed = 0;
|
||||
for (int j = mods.Length - 1; j >= 0; j--)
|
||||
if (mods[j].SourceId >= lo && mods[j].SourceId < hiExclusive) { mods.RemoveAtSwapBack(j); removed++; }
|
||||
return removed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user