示例#1
0
        public override void CheckMechanic(ParsedLog log, Dictionary <Mechanic, List <MechanicEvent> > mechanicLogs, Dictionary <ushort, DummyActor> regroupedMobs)
        {
            CombatData combatData = log.CombatData;

            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);
                }
                mechanicLogs[this].Add(new MechanicEvent(log.FightData.ToFightSpace(a.FirstAwareLogTime), this, amp));
            }
        }
示例#2
0
        public override void CheckMechanic(ParsedLog log, Dictionary <Mechanic, List <MechanicEvent> > mechanicLogs, Dictionary <ushort, DummyActor> regroupedMobs)
        {
            CombatData          combatData   = log.CombatData;
            HashSet <AgentItem> playerAgents = log.PlayerAgents;

            foreach (AbstractBuffEvent c in log.CombatData.GetBoonData(SkillId))
            {
                DummyActor amp = null;
                if (c is BuffApplyEvent ba && Keep(ba, log))
                {
                    Target target = log.FightData.Logic.Targets.Find(x => x.AgentItem == ba.To);
                    if (target != null)
                    {
                        amp = target;
                    }
                    else
                    {
                        AgentItem a = ba.To;
                        if (playerAgents.Contains(a))
                        {
                            continue;
                        }
                        else if (a.MasterAgent != null)
                        {
                            AgentItem m = a.MasterAgent;
                            if (playerAgents.Contains(m))
                            {
                                continue;
                            }
                        }
                        if (!regroupedMobs.TryGetValue(a.ID, out amp))
                        {
                            amp = new DummyActor(a);
                            regroupedMobs.Add(a.ID, amp);
                        }
                    }
                }
                if (amp != null)
                {
                    mechanicLogs[this].Add(new MechanicEvent(c.Time, this, amp));
                }
            }
        }
示例#3
0
        public override void CheckMechanic(ParsedLog log, Dictionary <Mechanic, List <MechanicEvent> > mechanicLogs, Dictionary <ushort, DummyActor> regroupedMobs)
        {
            CombatData          combatData   = log.CombatData;
            HashSet <AgentItem> playerAgents = log.PlayerAgents;

            foreach (AbstractCastEvent c in log.CombatData.GetCastDataById(SkillId))
            {
                DummyActor amp = null;
                if (Keep(c, log))
                {
                    Target target = log.FightData.Logic.Targets.Find(x => x.AgentItem == c.Caster);
                    if (target != null)
                    {
                        amp = target;
                    }
                    else
                    {
                        AgentItem a = c.Caster;
                        if (playerAgents.Contains(a))
                        {
                            continue;
                        }
                        else if (c.MasterCaster != null)
                        {
                            if (playerAgents.Contains(c.MasterCaster))
                            {
                                continue;
                            }
                        }
                        if (!regroupedMobs.TryGetValue(a.ID, out amp))
                        {
                            amp = new DummyActor(a);
                            regroupedMobs.Add(a.ID, amp);
                        }
                    }
                }
                if (amp != null)
                {
                    mechanicLogs[this].Add(new MechanicEvent(GetTime(c), this, amp));
                }
            }
        }