public override void CheckMechanic(ParsedLog log, Dictionary <ushort, DummyActor> regroupedMobs) { MechanicData mechData = log.MechanicData; CombatData combatData = log.CombatData; HashSet <ushort> playersIds = log.PlayerIDs; IEnumerable <AgentItem> agents = log.AgentData.GetAgentsByID((ushort)SkillId); foreach (AgentItem a in agents) { List <CombatItem> combatitems = combatData.GetDamageTakenData(a.InstID, a.FirstAware, a.LastAware); foreach (CombatItem c in combatitems) { if (c.IsBuff > 0 || !c.ResultEnum.IsHit() || !Keep(c, log)) { continue; } foreach (Player p in log.PlayerList) { if (c.SrcInstid == p.InstID || c.SrcMasterInstid == p.InstID) { mechData[this].Add(new MechanicLog(log.FightData.ToFightSpace(c.Time), this, p)); } } } } }
public override void CheckMechanic(ParsedLog log, Dictionary <ushort, DummyActor> regroupedMobs) { MechanicData mechData = log.MechanicData; CombatData combatData = log.CombatData; HashSet <ushort> playersIds = log.PlayerIDs; foreach (Player p in log.PlayerList) { List <CombatItem> cList = new List <CombatItem>(); switch (SkillId) { case SkillItem.DeathId: cList = combatData.GetStatesData(p.InstID, ParseEnum.StateChange.ChangeDead, log.FightData.FightStart, log.FightData.FightEnd); break; case SkillItem.DownId: cList = combatData.GetStatesData(p.InstID, ParseEnum.StateChange.ChangeDown, log.FightData.FightStart, log.FightData.FightEnd); List <CombatItem> downByVaporForm = combatData.GetBoonData(5620).Where(x => x.SrcInstid == p.InstID && x.IsBuffRemove == ParseEnum.BuffRemove.All).ToList(); foreach (CombatItem c in downByVaporForm) { cList.RemoveAll(x => Math.Abs(x.Time - c.Time) < 20); } break; case SkillItem.ResurrectId: cList = log.CombatData.GetCastData(p.InstID, log.FightData.FightStart, log.FightData.FightEnd).Where(x => x.SkillID == SkillItem.ResurrectId && x.IsActivation.StartCasting()).ToList(); break; } foreach (CombatItem mechItem in cList) { mechData[this].Add(new MechanicLog(log.FightData.ToFightSpace(mechItem.Time), this, p)); } } }
public override void CheckMechanic(ParsedLog log, Dictionary <ushort, DummyActor> regroupedMobs) { MechanicData mechData = log.MechanicData; CombatData combatData = log.CombatData; HashSet <ushort> playersIds = log.PlayerIDs; foreach (AgentItem a in log.AgentData.GetAgentByType(AgentItem.AgentType.NPC).Where(x => x.ID == SkillId)) { if (!regroupedMobs.TryGetValue(a.ID, out DummyActor amp)) { amp = new DummyActor(a); regroupedMobs.Add(a.ID, amp); } mechData[this].Add(new MechanicLog(log.FightData.ToFightSpace(a.FirstAware), this, amp)); } }
public override void CheckMechanic(ParsedLog log, Dictionary <ushort, DummyActor> regroupedMobs) { MechanicData mechData = log.MechanicData; CombatData combatData = log.CombatData; HashSet <ushort> playersIds = log.PlayerIDs; foreach (Player p in log.PlayerList) { foreach (CombatItem c in log.CombatData.GetCastDataById(SkillId)) { if (c.IsActivation.StartCasting() && c.SrcInstid == p.InstID && Keep(c, log)) { mechData[this].Add(new MechanicLog(log.FightData.ToFightSpace(c.Time), this, p)); } } } }
public override void CheckMechanic(ParsedLog log, Dictionary <ushort, DummyActor> regroupedMobs) { MechanicData mechData = log.MechanicData; CombatData combatData = log.CombatData; HashSet <ushort> playersIds = log.PlayerIDs; foreach (Player p in log.PlayerList) { foreach (CombatItem c in log.CombatData.GetBoonData(SkillId)) { if (c.IsBuffRemove == ParseEnum.BuffRemove.None && p.InstID == c.DstInstid && Keep(c, log)) { mechData[this].Add(new MechanicLog(log.FightData.ToFightSpace(c.Time), this, p)); } } } }
public override void CheckMechanic(ParsedLog log, Dictionary <ushort, DummyActor> regroupedMobs) { MechanicData mechData = log.MechanicData; CombatData combatData = log.CombatData; HashSet <ushort> playersIds = log.PlayerIDs; foreach (CombatItem c in log.CombatData.GetCastDataById(SkillId)) { DummyActor amp = null; if (c.IsActivation.StartCasting() && Keep(c, log)) { Target target = log.FightData.Logic.Targets.Find(x => x.InstID == c.SrcInstid && x.FirstAware <= c.Time && x.LastAware >= c.Time); if (target != null) { amp = target; } else { AgentItem a = log.AgentData.GetAgent(c.SrcAgent, c.Time); if (playersIds.Contains(a.InstID)) { continue; } else if (a.MasterAgent != 0) { AgentItem m = log.AgentData.GetAgent(a.MasterAgent, c.Time); if (playersIds.Contains(m.InstID)) { continue; } } if (!regroupedMobs.TryGetValue(a.ID, out amp)) { amp = new DummyActor(a); regroupedMobs.Add(a.ID, amp); } } } if (amp != null) { mechData[this].Add(new MechanicLog(log.FightData.ToFightSpace(c.Time), this, amp)); } } }
public override void CheckMechanic(ParsedLog log, Dictionary <ushort, DummyActor> regroupedMobs) { MechanicData mechData = log.MechanicData; CombatData combatData = log.CombatData; HashSet <ushort> playersIds = log.PlayerIDs; foreach (Player p in log.PlayerList) { List <CombatItem> combatitems = combatData.GetDamageTakenData(p.InstID, p.FirstAware, p.LastAware); foreach (CombatItem c in combatitems) { if (!(c.SkillID == SkillId) || (c.IsBuff == 0 && !c.ResultEnum.IsHit()) || (c.IsBuff > 0 && c.Result > 0) || !Keep(c, log)) { continue; } mechData[this].Add(new MechanicLog(log.FightData.ToFightSpace(c.Time), this, p)); } } }
public void setDamagetaken(BossData bossData, List <CombatItem> combatList, AgentData agentData, MechanicData m_data) { int time_start = bossData.getFirstAware(); foreach (CombatItem c in combatList) { if (instid == c.getDstInstid()) //selecting player as target { LuckParser.Models.ParseEnums.StateChange state = c.isStateChange(); int time = c.getTime() - time_start; foreach (AgentItem item in agentData.getNPCAgentList()) {//selecting all if (item.getInstid() == c.getSrcInstid() && c.getIFF().getEnum() == "FOE") { if (state.getID() == 0) { if (c.isBuff() == 1 && c.getBuffDmg() != 0) { //inco,ing condi dmg not working or just not present? // damagetaken.Add(c.getBuffDmg()); } else if (c.isBuff() == 0 && c.getValue() != 0) { damagetaken.Add(c.getValue()); damageTaken_logs.Add(new DamageLog(time, c.getValue(), c.getSkillID(), c.isBuff(), c.getResult(), c.isNinety(), c.isMoving(), c.isFlanking(), c.isActivation(), c.isShields())); } else if (c.isBuff() == 0 && c.getValue() == 0) { damageTaken_logs.Add(new DamageLog(time, c.getBuffDmg(), c.getSkillID(), c.isBuff(), c.getResult(), c.isNinety(), c.isMoving(), c.isFlanking(), c.isActivation(), c.isShields())); } } } } } } }
public List <DamageLog> getDamageTakenLogs(BossData bossData, List <CombatItem> combatList, AgentData agentData, MechanicData m_data) { if (damagetaken.Count == 0) { setDamagetaken(bossData, combatList, agentData, m_data); } return(damageTaken_logs); }
public List <int> getDamagetaken(BossData bossData, List <CombatItem> combatList, AgentData agentData, MechanicData m_data) { if (damagetaken.Count == 0) { setDamagetaken(bossData, combatList, agentData, m_data); } return(damagetaken); }