protected virtual HashSet <long> GetIDs(ParsedEvtcLog log, long buffID, long extension) { if (DurationToIDs.TryGetValue(extension, out HashSet <long> idsToCheck)) { return(idsToCheck); } return(new HashSet <long>()); }
// Main method public AgentItem TryFindSrc(AgentItem dst, long time, long extension, ParsedEvtcLog log, long buffID) { if (!_boonIds.Contains(buffID)) { return(dst); } int essenceOfSpeedCheck = CouldBeEssenceOfSpeed(dst, extension, log); // can only be the soulbeast if (essenceOfSpeedCheck == 1) { return(dst); } if (DurationToIDs.TryGetValue(extension, out HashSet <long> idsToCheck)) { List <AbstractCastEvent> cls = GetExtensionSkills(log, time, idsToCheck); // If only one cast item if (cls.Count == 1) { AbstractCastEvent item = cls.First(); // If uncertainty due to essence of speed or imbued melodies, return unknown if (essenceOfSpeedCheck == 0 || CouldBeImbuedMelodies(item.Caster, time, extension, log)) { return(ParserHelper._unknownAgent); } // otherwise the src is the caster return(item.Caster); } // If no cast item and uncertainty due to essence of speed else if (!cls.Any() && essenceOfSpeedCheck == 0) { // If uncertainty due to imbued melodies, return unknown if (CouldBeImbuedMelodies(dst, time, extension, log)) { return(ParserHelper._unknownAgent); } // otherwise return the soulbeast return(dst); } } return(ParserHelper._unknownAgent); }