public int Compare(BoonSimulator.BoonStackItem x, BoonSimulator.BoonStackItem y) { List <Player> players = _log.PlayerList; Player a = players.Find(p => p.InstID == x.Src); Player b = players.Find(p => p.InstID == y.Src); if (a == null || b == null) { return(0); } return(a.Healing < b.Healing ? 1 : -1); }
public override bool StackEffect(ParsedLog log, BoonSimulator.BoonStackItem stackItem, List <BoonSimulator.BoonStackItem> stacks, List <BoonSimulationOverstackItem> overstacks) { for (int i = 0; i < stacks.Count; i++) { if (stacks[i].BoonDuration < stackItem.BoonDuration) { BoonStackItem stack = stacks[i]; overstacks.Add(new BoonSimulationOverstackItem(stack.Src, stack.BoonDuration, stack.Start)); stacks[i] = stackItem; Sort(log, stacks); return(true); } } return(false); }