Esempio n. 1
0
        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));
            }
        }
Esempio n. 2
0
        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.GetBoonData(SkillId))
            {
                DummyActor amp = null;
                if (c.IsBuffRemove == ParseEnum.BuffRemove.Manual && 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));
                }
            }
        }