internal virtual void ComputeFightTargets(AgentData agentData, List <CombatItem> combatItems)
        {
            foreach (int id in GetUniqueTargetIDs())
            {
                RegroupTargetsByID(id, agentData, combatItems);
            }
            List <int> ids = GetFightTargetsIDs();

            foreach (int id in ids)
            {
                IReadOnlyList <AgentItem> agents = agentData.GetNPCsByID(id);
                foreach (AgentItem agentItem in agents)
                {
                    _targets.Add(new NPC(agentItem));
                }
            }
            List <ArcDPSEnums.TrashID> ids2 = GetTrashMobsIDS();
            var aList = agentData.GetAgentByType(AgentItem.AgentType.NPC).Where(x => ids2.Contains(ArcDPSEnums.GetTrashID(x.ID))).ToList();

            //aList.AddRange(agentData.GetAgentByType(AgentItem.AgentType.Gadget).Where(x => ids2.Contains(ParseEnum.GetTrashIDS(x.ID))));
            foreach (AgentItem a in aList)
            {
                _trashMobs.Add(new NPC(a));
            }
        }
        // Constructors
        internal FightData(int id, AgentData agentData, EvtcParserSettings parserSettings, long start, long end)
        {
            LogStart  = start;
            LogEnd    = end;
            FightEnd  = end - start;
            TriggerID = id;
            switch (ArcDPSEnums.GetTargetID(id))
            {
            case ArcDPSEnums.TargetID.Mordremoth:
                Logic = new Mordremoth(id);
                break;

            //
            case ArcDPSEnums.TargetID.ValeGuardian:
                Logic = new ValeGuardian(id);
                break;

            case ArcDPSEnums.TargetID.Gorseval:
                Logic = new Gorseval(id);
                break;

            case ArcDPSEnums.TargetID.Sabetha:
                Logic = new Sabetha(id);
                break;

            case ArcDPSEnums.TargetID.Slothasor:
                Logic = new Slothasor(id);
                break;

            case ArcDPSEnums.TargetID.Zane:
            case ArcDPSEnums.TargetID.Berg:
            case ArcDPSEnums.TargetID.Narella:
                Logic = new BanditTrio(id);
                break;

            case ArcDPSEnums.TargetID.Matthias:
                Logic = new Matthias(id);
                break;

            /*case ParseEnum.TargetIDS.Escort:
             *  Logic = new Escort(id, agentData);
             *  break;*/
            case ArcDPSEnums.TargetID.KeepConstruct:
                Logic = new KeepConstruct(id);
                break;

            case ArcDPSEnums.TargetID.Xera:
                // some TC logs are registered as Xera
                if (agentData.GetNPCsByID((int)ArcDPSEnums.TrashID.HauntingStatue).Count > 0)
                {
                    TriggerID = (int)ArcDPSEnums.TrashID.HauntingStatue;
                    Logic     = new TwistedCastle((int)ArcDPSEnums.TargetID.DummyTarget);
                    break;
                }
                Logic = new Xera(id);
                break;

            case ArcDPSEnums.TargetID.Cairn:
                Logic = new Cairn(id);
                break;

            case ArcDPSEnums.TargetID.MursaatOverseer:
                Logic = new MursaatOverseer(id);
                break;

            case ArcDPSEnums.TargetID.Samarog:
                Logic = new Samarog(id);
                break;

            case ArcDPSEnums.TargetID.Deimos:
                Logic = new Deimos(id);
                break;

            case ArcDPSEnums.TargetID.SoullessHorror:
                Logic = new SoullessHorror(id);
                break;

            case ArcDPSEnums.TargetID.Desmina:
                Logic = new River((int)ArcDPSEnums.TargetID.DummyTarget);
                break;

            case ArcDPSEnums.TargetID.BrokenKing:
                Logic = new BrokenKing(id);
                break;

            case ArcDPSEnums.TargetID.SoulEater:
                Logic = new EaterOfSouls(id);
                break;

            case ArcDPSEnums.TargetID.EyeOfFate:
            case ArcDPSEnums.TargetID.EyeOfJudgement:
                Logic = new DarkMaze(id);
                break;

            case ArcDPSEnums.TargetID.Dhuum:
                // some eyes logs are registered as Dhuum
                if (agentData.GetNPCsByID((int)ArcDPSEnums.TargetID.EyeOfFate).Count > 0 ||
                    agentData.GetNPCsByID((int)ArcDPSEnums.TargetID.EyeOfJudgement).Count > 0)
                {
                    TriggerID = (int)ArcDPSEnums.TargetID.EyeOfFate;
                    Logic     = new DarkMaze(TriggerID);
                    break;
                }
                Logic = new Dhuum(id);
                break;

            case ArcDPSEnums.TargetID.ConjuredAmalgamate:
            case ArcDPSEnums.TargetID.ConjuredAmalgamate_CHINA:
            case ArcDPSEnums.TargetID.CALeftArm_CHINA:
            case ArcDPSEnums.TargetID.CARightArm_CHINA:
                Logic     = new ConjuredAmalgamate(id);
                TriggerID = (int)ArcDPSEnums.TargetID.ConjuredAmalgamate;
                break;

            case ArcDPSEnums.TargetID.Kenut:
            case ArcDPSEnums.TargetID.Nikare:
                Logic = new TwinLargos(id);
                break;

            case ArcDPSEnums.TargetID.Qadim:
                Logic = new Qadim(id);
                break;

            case ArcDPSEnums.TargetID.Freezie:
                Logic = new Freezie(id);
                break;

            case ArcDPSEnums.TargetID.Adina:
                Logic = new Adina(id);
                break;

            case ArcDPSEnums.TargetID.Sabir:
                Logic = new Sabir(id);
                break;

            case ArcDPSEnums.TargetID.PeerlessQadim:
                Logic = new PeerlessQadim(id);
                break;

            //
            case ArcDPSEnums.TargetID.IcebroodConstruct:
                Logic = new IcebroodConstruct(id);
                break;

            case ArcDPSEnums.TargetID.FraenirOfJormag:
                Logic = new FraenirOfJormag(id);
                break;

            case ArcDPSEnums.TargetID.VoiceOfTheFallen:
            case ArcDPSEnums.TargetID.ClawOfTheFallen:
                Logic = new SuperKodanBrothers(id);
                break;

            case ArcDPSEnums.TargetID.Boneskinner:
                Logic = new Boneskinner(id);
                break;

            case ArcDPSEnums.TargetID.WhisperOfJormag:
                Logic = new WhisperOfJormag(id);
                break;

            case ArcDPSEnums.TargetID.VariniaStormsounder:
                Logic = new ColdWar(id);
                break;

            //
            case ArcDPSEnums.TargetID.MAMA:
                Logic = new MAMA(id);
                break;

            case ArcDPSEnums.TargetID.Siax:
                Logic = new Siax(id);
                break;

            case ArcDPSEnums.TargetID.Ensolyss:
                Logic = new Ensolyss(id);
                break;

            case ArcDPSEnums.TargetID.Skorvald:
                Logic = new Skorvald(id);
                break;

            case ArcDPSEnums.TargetID.Artsariiv:
                Logic = new Artsariiv(id);
                break;

            case ArcDPSEnums.TargetID.Arkk:
                Logic = new Arkk(id);
                break;

            case ArcDPSEnums.TargetID.AiKeeperOfThePeak:
                Logic = new AiKeeperOfThePeak(id);
                break;

            //
            case ArcDPSEnums.TargetID.WorldVersusWorld:
                Logic = new WvWFight(id, parserSettings.DetailedWvWParse);
                break;

            //
            case ArcDPSEnums.TargetID.MassiveGolem10M:
            case ArcDPSEnums.TargetID.MassiveGolem4M:
            case ArcDPSEnums.TargetID.MassiveGolem1M:
            case ArcDPSEnums.TargetID.VitalGolem:
            case ArcDPSEnums.TargetID.AvgGolem:
            case ArcDPSEnums.TargetID.StdGolem:
            case ArcDPSEnums.TargetID.ConditionGolem:
            case ArcDPSEnums.TargetID.PowerGolem:
            case ArcDPSEnums.TargetID.LGolem:
            case ArcDPSEnums.TargetID.MedGolem:
                Logic = new Golem(id);
                break;

            case ArcDPSEnums.TargetID.Instance:
                Logic = new Instance(id);
                break;

            //
            default:
                switch (ArcDPSEnums.GetTrashID(id))
                {
                case ArcDPSEnums.TrashID.HauntingStatue:
                    Logic = new TwistedCastle((int)ArcDPSEnums.TargetID.DummyTarget);
                    break;

                default:
                    // Unknown
                    Logic = new UnknownFightLogic(id);
                    break;
                }
                break;
            }
        }
Ejemplo n.º 3
0
        internal virtual void ComputeFightTargets(AgentData agentData, List <CombatItem> combatItems, IReadOnlyDictionary <uint, AbstractExtensionHandler> extensions)
        {
            foreach (int id in GetUniqueNPCIDs())
            {
                RegroupTargetsByID(id, agentData, combatItems, extensions);
            }
            //
            List <int> targetIDs = GetTargetsIDs();

            foreach (int id in targetIDs)
            {
                IReadOnlyList <AgentItem> agents = agentData.GetNPCsByID(id);
                foreach (AgentItem agentItem in agents)
                {
                    _targets.Add(new NPC(agentItem));
                }
            }
            _targets.Sort((x, y) => x.FirstAware.CompareTo(y.FirstAware));
            //
            List <ArcDPSEnums.TrashID> trashIDs = GetTrashMobsIDs();
            var aList = agentData.GetAgentByType(AgentItem.AgentType.NPC).Where(x => trashIDs.Contains(ArcDPSEnums.GetTrashID(x.ID))).ToList();

            //aList.AddRange(agentData.GetAgentByType(AgentItem.AgentType.Gadget).Where(x => ids2.Contains(ParseEnum.GetTrashIDS(x.ID))));
            foreach (AgentItem a in aList)
            {
                _trashMobs.Add(new NPC(a));
            }
            _trashMobs.Sort((x, y) => x.FirstAware.CompareTo(y.FirstAware));
            //
            List <int> friendlyNPCIDs = GetFriendlyNPCIDs();

            foreach (int id in friendlyNPCIDs)
            {
                IReadOnlyList <AgentItem> agents = agentData.GetNPCsByID(id);
                foreach (AgentItem agentItem in agents)
                {
                    _nonPlayerFriendlies.Add(new NPC(agentItem));
                }
            }
            _nonPlayerFriendlies.Sort((x, y) => x.FirstAware.CompareTo(y.FirstAware));
            //
            TargetAgents            = new HashSet <AgentItem>(_targets.Select(x => x.AgentItem));
            NonPlayerFriendlyAgents = new HashSet <AgentItem>(_nonPlayerFriendlies.Select(x => x.AgentItem));
            TrashMobAgents          = new HashSet <AgentItem>(_trashMobs.Select(x => x.AgentItem));
        }