public ParsedLog(LogData logData, FightData fightData, AgentData agentData, SkillData skillData, CombatData combatData, List <Player> playerList, Target target) { _container = new ParsedEvtcContainer(logData, fightData, agentData, skillData, combatData, playerList); // FightData.SetSuccess(_container); if (FightData.FightDuration <= 2200) { throw new TooShortException(); } if (Properties.Settings.Default.SkipFailedTries && !FightData.Success) { throw new SkipException(); } CombatData.Update(FightData.FightEnd); FightData.SetCM(_container); // Boons = new BoonsContainer(logData.GW2Version); BoonSourceFinder = Boon.GetBoonSourceFinder(logData.GW2Version, Boons); DamageModifiers = new DamageModifiersContainer(logData.GW2Version); MechanicData = new MechanicData(fightData); FightData.Logic.ComputeMechanics(this); Statistics = new Statistics(this); LegacyTarget = target; }
public ParsedEvtcContainer(LogData logData, FightData fightData, AgentData agentData, SkillData skillData, CombatData combatData, List <Player> playerList) { LogData = logData; FightData = fightData; AgentData = agentData; SkillData = skillData; CombatData = combatData; PlayerList = playerList; Boons = new BoonsContainer(logData.GW2Version); DamageModifiers = new DamageModifiersContainer(logData.GW2Version); PlayerListBySpec = playerList.GroupBy(x => x.Prof).ToDictionary(x => x.Key, x => x.ToList()); PlayerIDs = new HashSet <ushort>(playerList.Select(x => x.InstID)); }
internal ParsedEvtcLog(int evtcVersion, FightData fightData, AgentData agentData, SkillData skillData, List <CombatItem> combatItems, List <Player> playerList, IReadOnlyDictionary <uint, AbstractExtensionHandler> extensions, long evtcLogDuration, EvtcParserSettings parserSettings, ParserController operation) { FightData = fightData; AgentData = agentData; SkillData = skillData; PlayerList = playerList; ParserSettings = parserSettings; _operation = operation; var friendlies = new List <AbstractSingleActor>(); friendlies.AddRange(playerList); friendlies.AddRange(fightData.Logic.NonPlayerFriendlies); Friendlies = friendlies; // FriendliesListBySpec = friendlies.GroupBy(x => x.Spec).ToDictionary(x => x.Key, x => x.ToList()); PlayerAgents = new HashSet <AgentItem>(playerList.Select(x => x.AgentItem)); FriendlyAgents = new HashSet <AgentItem>(friendlies.Select(x => x.AgentItem)); _operation.UpdateProgressWithCancellationCheck("Creating GW2EI Combat Events"); CombatData = new CombatData(combatItems, FightData, AgentData, SkillData, playerList, operation, extensions, evtcVersion); operation.UpdateProgressWithCancellationCheck("Checking CM"); FightData.SetCM(CombatData, AgentData); operation.UpdateProgressWithCancellationCheck("Setting Fight Name"); FightData.SetFightName(CombatData, AgentData); // _operation.UpdateProgressWithCancellationCheck("Checking Success"); FightData.Logic.CheckSuccess(CombatData, AgentData, FightData, PlayerAgents); if (FightData.FightDuration <= ParserSettings.TooShortLimit) { throw new TooShortException(FightData.FightDuration, ParserSettings.TooShortLimit); } if (ParserSettings.SkipFailedTries && !FightData.Success) { throw new SkipException(); } _operation.UpdateProgressWithCancellationCheck("Creating GW2EI Log Meta Data"); LogData = new LogData(evtcVersion, CombatData, evtcLogDuration, playerList, extensions, operation); // _operation.UpdateProgressWithCancellationCheck("Creating Buff Container"); Buffs = new BuffsContainer(LogData.GW2Build, CombatData, operation); _operation.UpdateProgressWithCancellationCheck("Creating Damage Modifier Container"); DamageModifiers = new DamageModifiersContainer(LogData.GW2Build, fightData.Logic.Mode, parserSettings); _operation.UpdateProgressWithCancellationCheck("Creating Mechanic Data"); MechanicData = FightData.Logic.GetMechanicData(); _operation.UpdateProgressWithCancellationCheck("Creating General Statistics Container"); StatisticsHelper = new StatisticsHelper(CombatData, PlayerList, Buffs); }
public ParsedLog(string buildVersion, FightData fightData, AgentData agentData, SkillData skillData, List <CombatItem> combatItems, List <Player> playerList) { FightData = fightData; AgentData = agentData; SkillData = skillData; PlayerList = playerList; // PlayerListBySpec = playerList.GroupBy(x => x.Prof).ToDictionary(x => x.Key, x => x.ToList()); PlayerAgents = new HashSet <AgentItem>(playerList.Select(x => x.AgentItem)); CombatData = new CombatData(combatItems, FightData, AgentData, SkillData, playerList); LogData = new LogData(buildVersion, CombatData, combatItems); // UpdateFightData(); // Boons = new BoonsContainer(LogData.GW2Version); DamageModifiers = new DamageModifiersContainer(LogData.GW2Version); MechanicData = FightData.Logic.GetMechanicData(); Statistics = new Statistics(CombatData, AgentData, FightData, PlayerList, Boons); }
public ParsedLog(string buildVersion, FightData fightData, AgentData agentData, SkillData skillData, List <CombatItem> combatItems, List <Player> playerList, long evtcLogDuration, ParserSettings parserSettings, OperationController operation) { FightData = fightData; AgentData = agentData; SkillData = skillData; PlayerList = playerList; ParserSettings = parserSettings; _operation = operation; // PlayerListBySpec = playerList.GroupBy(x => x.Prof).ToDictionary(x => x.Key, x => x.ToList()); PlayerAgents = new HashSet <AgentItem>(playerList.Select(x => x.AgentItem)); _operation.UpdateProgressWithCancellationCheck("Creating GW2EI Combat Events"); CombatData = new CombatData(combatItems, FightData, AgentData, SkillData, playerList); _operation.UpdateProgressWithCancellationCheck("Creating GW2EI Log Meta Data"); LogData = new LogData(buildVersion, CombatData, evtcLogDuration); _operation.UpdateProgressWithCancellationCheck("GW2 Build " + LogData.GW2Version); // _operation.UpdateProgressWithCancellationCheck("Checking Success"); FightData.Logic.CheckSuccess(CombatData, AgentData, FightData, PlayerAgents); if (FightData.FightEnd <= 2200) { throw new TooShortException(); } if (ParserSettings.SkipFailedTries && !FightData.Success) { throw new SkipException(); } _operation.UpdateProgressWithCancellationCheck("Checking CM"); FightData.SetCM(CombatData, AgentData, FightData); // _operation.UpdateProgressWithCancellationCheck("Creating Buff Container"); Buffs = new BuffsContainer(LogData.GW2Version); _operation.UpdateProgressWithCancellationCheck("Creating Damage Modifier Container"); DamageModifiers = new DamageModifiersContainer(LogData.GW2Version); _operation.UpdateProgressWithCancellationCheck("Creating Mechanic Data"); MechanicData = FightData.Logic.GetMechanicData(); _operation.UpdateProgressWithCancellationCheck("Creating General Statistics Container"); Statistics = new GeneralStatistics(CombatData, PlayerList, Buffs); }
internal ParsedEvtcLog(int evtcVersion, FightData fightData, AgentData agentData, SkillData skillData, List <CombatItem> combatItems, List <Player> playerList, IReadOnlyDictionary <uint, AbstractExtensionHandler> extensions, long evtcLogDuration, EvtcParserSettings parserSettings, ParserController operation) { FightData = fightData; AgentData = agentData; SkillData = skillData; PlayerList = playerList; PlayerAgents = new HashSet <AgentItem>(PlayerList.Select(x => x.AgentItem)); ParserSettings = parserSettings; _operation = operation; if (parserSettings.AnonymousPlayer) { operation.UpdateProgressWithCancellationCheck("Anonymous players"); for (int i = 0; i < PlayerList.Count; i++) { PlayerList[i].Anonymize(i + 1); } IReadOnlyList <AgentItem> allPlayerAgents = agentData.GetAgentByType(AgentItem.AgentType.Player); int playerOffset = PlayerList.Count; foreach (AgentItem playerAgent in allPlayerAgents) { if (!PlayerAgents.Contains(playerAgent)) { string character = "Player " + playerOffset; string account = "Account " + (playerOffset++); playerAgent.OverrideName(character + "\0:" + account + "\01"); } } } // _operation.UpdateProgressWithCancellationCheck("Creating GW2EI Combat Events"); CombatData = new CombatData(combatItems, FightData, AgentData, SkillData, PlayerList, operation, extensions, evtcVersion); if (parserSettings.AnonymousPlayer) { operation.UpdateProgressWithCancellationCheck("Anonymous guilds"); IReadOnlyList <AgentItem> allPlayerAgents = agentData.GetAgentByType(AgentItem.AgentType.Player); foreach (AgentItem playerAgent in allPlayerAgents) { foreach (GuildEvent guildEvent in CombatData.GetGuildEvents(playerAgent)) { guildEvent.Anonymize(); } } } // operation.UpdateProgressWithCancellationCheck("Checking CM"); FightData.SetEncounterMode(CombatData, AgentData); operation.UpdateProgressWithCancellationCheck("Setting Fight Name"); FightData.SetFightName(CombatData, AgentData); // var friendlies = new List <AbstractSingleActor>(); friendlies.AddRange(PlayerList); friendlies.AddRange(fightData.Logic.NonPlayerFriendlies); Friendlies = friendlies; FriendliesListBySpec = friendlies.GroupBy(x => x.Spec).ToDictionary(x => x.Key, x => x.ToList()); FriendlyAgents = new HashSet <AgentItem>(Friendlies.Select(x => x.AgentItem)); // _operation.UpdateProgressWithCancellationCheck("Checking Success"); FightData.Logic.CheckSuccess(CombatData, AgentData, FightData, PlayerAgents); if (FightData.FightDuration <= ParserSettings.TooShortLimit) { throw new TooShortException(FightData.FightDuration, ParserSettings.TooShortLimit); } if (ParserSettings.SkipFailedTries && !FightData.Success) { throw new SkipException(); } _operation.UpdateProgressWithCancellationCheck("Creating GW2EI Log Meta Data"); LogData = new LogData(evtcVersion, CombatData, evtcLogDuration, playerList, extensions, operation); // _operation.UpdateProgressWithCancellationCheck("Creating Buff Container"); Buffs = new BuffsContainer(LogData.GW2Build, CombatData, operation); _operation.UpdateProgressWithCancellationCheck("Creating Damage Modifier Container"); DamageModifiers = new DamageModifiersContainer(LogData.GW2Build, fightData.Logic.Mode, parserSettings); _operation.UpdateProgressWithCancellationCheck("Creating Mechanic Data"); MechanicData = FightData.Logic.GetMechanicData(); _operation.UpdateProgressWithCancellationCheck("Creating General Statistics Container"); StatisticsHelper = new StatisticsHelper(CombatData, PlayerList, Buffs); }