public List <CombatItem> GetBuffs(int srcInstid, long skillId, long start, long end) { if (BoonData.TryGetValue(skillId, out List <CombatItem> data)) { return(data.Where(x => x.SrcInstid == srcInstid && x.Time >= start && x.Time <= end && x.IsBuffRemove == ParseEnum.BuffRemove.None).ToList()); } return(new List <CombatItem>()); }
// getters public List <CombatItem> GetBoonData(long key) { if (BoonData.TryGetValue(key, out List <CombatItem> res)) { return(res); } return(new List <CombatItem>());; }
public int GetBuffCount(int srcInstid, long skillId, long start, long end) { if (BoonData.TryGetValue(skillId, out List <CombatItem> data)) { return(data.Count(x => x.SrcInstid == srcInstid && x.Time >= start && x.Time <= end && x.IsBuffRemove == ParseEnum.BuffRemove.None)); } return(0); }