public static void CreateStateChangeEvents(List <CombatItem> stateChangeEvents, MetaEventsContainer metaDataEvents, StatusEventsContainer statusEvents, List <RewardEvent> rewardEvents, AgentData agentData) { foreach (CombatItem c in stateChangeEvents) { switch (c.IsStateChange) { case ArcDPSEnums.StateChange.EnterCombat: var enterCombatEvt = new EnterCombatEvent(c, agentData); Add(statusEvents.EnterCombatEvents, enterCombatEvt.Src, enterCombatEvt); break; case ArcDPSEnums.StateChange.ExitCombat: var exitCombatEvt = new ExitCombatEvent(c, agentData); Add(statusEvents.ExitCombatEvents, exitCombatEvt.Src, exitCombatEvt); break; case ArcDPSEnums.StateChange.ChangeUp: var aliveEvt = new AliveEvent(c, agentData); Add(statusEvents.AliveEvents, aliveEvt.Src, aliveEvt); break; case ArcDPSEnums.StateChange.ChangeDead: var deadEvt = new DeadEvent(c, agentData); Add(statusEvents.DeadEvents, deadEvt.Src, deadEvt); break; case ArcDPSEnums.StateChange.ChangeDown: var downEvt = new DownEvent(c, agentData); Add(statusEvents.DownEvents, downEvt.Src, downEvt); break; case ArcDPSEnums.StateChange.Spawn: var spawnEvt = new SpawnEvent(c, agentData); Add(statusEvents.SpawnEvents, spawnEvt.Src, spawnEvt); break; case ArcDPSEnums.StateChange.Despawn: var despawnEvt = new DespawnEvent(c, agentData); Add(statusEvents.DespawnEvents, despawnEvt.Src, despawnEvt); break; case ArcDPSEnums.StateChange.HealthUpdate: var healthEvt = new HealthUpdateEvent(c, agentData); Add(statusEvents.HealthUpdateEvents, healthEvt.Src, healthEvt); break; case ArcDPSEnums.StateChange.LogStart: if (c.Value == 0 || c.BuffDmg == 0) { continue; } metaDataEvents.LogStartEvent = new LogStartEvent(c); break; case ArcDPSEnums.StateChange.LogEnd: if (c.Value == 0 || c.BuffDmg == 0) { continue; } metaDataEvents.LogEndEvent = new LogEndEvent(c); break; case ArcDPSEnums.StateChange.MaxHealthUpdate: var maxHealthEvt = new MaxHealthUpdateEvent(c, agentData); Add(statusEvents.MaxHealthUpdateEvents, maxHealthEvt.Src, maxHealthEvt); break; case ArcDPSEnums.StateChange.PointOfView: if (c.SrcAgent == 0) { continue; } metaDataEvents.PointOfViewEvent = new PointOfViewEvent(c, agentData); break; case ArcDPSEnums.StateChange.Language: metaDataEvents.LanguageEvent = new LanguageEvent(c); break; case ArcDPSEnums.StateChange.GWBuild: if (c.SrcAgent == 0) { continue; } metaDataEvents.BuildEvent = new BuildEvent(c); break; case ArcDPSEnums.StateChange.ShardId: metaDataEvents.ShardEvents.Add(new ShardEvent(c)); break; case ArcDPSEnums.StateChange.Reward: rewardEvents.Add(new RewardEvent(c)); break; case ArcDPSEnums.StateChange.TeamChange: var tcEvt = new TeamChangeEvent(c, agentData); Add(statusEvents.TeamChangeEvents, tcEvt.Src, tcEvt); break; case ArcDPSEnums.StateChange.AttackTarget: var aTEvt = new AttackTargetEvent(c, agentData); Add(statusEvents.AttackTargetEvents, aTEvt.Src, aTEvt); break; case ArcDPSEnums.StateChange.Targetable: var tarEvt = new TargetableEvent(c, agentData); Add(statusEvents.TargetableEvents, tarEvt.Src, tarEvt); break; case ArcDPSEnums.StateChange.MapID: metaDataEvents.MapIDEvents.Add(new MapIDEvent(c)); break; case ArcDPSEnums.StateChange.Guild: var gEvt = new GuildEvent(c, agentData); Add(metaDataEvents.GuildEvents, gEvt.Src, gEvt); break; case ArcDPSEnums.StateChange.BuffInfo: case ArcDPSEnums.StateChange.BuffFormula: if (metaDataEvents.BuffInfoEvents.TryGetValue(c.SkillID, out BuffInfoEvent buffInfoEvent)) { buffInfoEvent.CompleteBuffInfoEvent(c); } else { buffInfoEvent = new BuffInfoEvent(c); metaDataEvents.BuffInfoEvents[c.SkillID] = buffInfoEvent; } if (c.IsStateChange == ArcDPSEnums.StateChange.BuffInfo) { if (metaDataEvents.BuffInfoEventsByCategory.TryGetValue(buffInfoEvent.Category, out List <BuffInfoEvent> bdEvtList)) { bdEvtList.Add(buffInfoEvent); } else { metaDataEvents.BuffInfoEventsByCategory[buffInfoEvent.Category] = new List <BuffInfoEvent> { buffInfoEvent }; } } break; case ArcDPSEnums.StateChange.SkillInfo: case ArcDPSEnums.StateChange.SkillTiming: if (metaDataEvents.SkillInfoEvents.TryGetValue(c.SkillID, out SkillInfoEvent skillInfoEvent)) { skillInfoEvent.CompleteSkillInfoEvent(c); } else { skillInfoEvent = new SkillInfoEvent(c); metaDataEvents.SkillInfoEvents[c.SkillID] = skillInfoEvent; } break; case ArcDPSEnums.StateChange.BreakbarState: var bSEvt = new BreakbarStateEvent(c, agentData); Add(statusEvents.BreakbarStateEvents, bSEvt.Src, bSEvt); break; case ArcDPSEnums.StateChange.BreakbarPercent: var bPEvt = new BreakbarPercentEvent(c, agentData); Add(statusEvents.BreakbarPercentEvents, bPEvt.Src, bPEvt); break; case ArcDPSEnums.StateChange.Error: metaDataEvents.ErrorEvents.Add(new ErrorEvent(c)); break; case ArcDPSEnums.StateChange.Tag: // Getting ready in case this becomes an actual state event _ = new TagEvent(c, agentData); //Add(metaDataEvents.TagEvents, tagEvt.Src, tagEvt); break; } } }
internal AbstractBuffApplyEvent(CombatItem evtcItem, AgentData agentData, SkillData skillData) : base(evtcItem, skillData) { By = agentData.GetAgent(evtcItem.SrcAgent, evtcItem.Time); To = agentData.GetAgent(evtcItem.DstAgent, evtcItem.Time); BuffInstance = evtcItem.Pad; }
internal BuffStackActiveEvent(CombatItem evtcItem, AgentData agentData, SkillData skillData) : base(evtcItem, agentData, skillData) { BuffInstance = (uint)evtcItem.DstAgent; }
public static void AddIndirectDamageEvent(CombatItem damageEvent, List <AbstractHealthDamageEvent> hpDamage, List <AbstractBreakbarDamageEvent> brkBarDamage, AgentData agentData, SkillData skillData) { ArcDPSEnums.ConditionResult result = ArcDPSEnums.GetConditionResult(damageEvent.Result); switch (result) { /*case ArcDPSEnums.ConditionResult.BreakbarDamage: * brkBarDamage.Add(new NonDirectBreakbarDamageEvent(c, agentData, skillData)); * break;*/ case ArcDPSEnums.ConditionResult.Unknown: break; default: hpDamage.Add(new NonDirectHealthDamageEvent(damageEvent, agentData, skillData, result)); break; } }
// 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.MaiTrinStrike: Logic = new AetherbladeHideout(id); break; case ArcDPSEnums.TargetID.MinisterLi: Logic = new KainengOverlook(id); break; case ArcDPSEnums.TargetID.Ankka: Logic = new XunlaiJadeJunkyard(id); break; // This will most likely require a chinese client version case ArcDPSEnums.TargetID.GadgetTheDragonVoid1: case ArcDPSEnums.TargetID.GadgetTheDragonVoid2: Logic = new HarvestTemple(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; case ArcDPSEnums.TrashID.VoidAmalgamate1: Logic = new HarvestTemple(id); break; default: // Unknown Logic = new UnknownFightLogic(id); break; } break; } }
public static void AddBuffApplyEvent(CombatItem buffEvent, List <AbstractBuffEvent> buffEvents, AgentData agentData, SkillData skillData) { if (buffEvent.IsOffcycle > 0) { buffEvents.Add(new BuffExtensionEvent(buffEvent, agentData, skillData)); } else { buffEvents.Add(new BuffApplyEvent(buffEvent, agentData, skillData)); } }
public static List <AnimatedCastEvent> CreateCastEvents(Dictionary <ulong, List <CombatItem> > castEventsBySrcAgent, AgentData agentData, SkillData skillData, FightData fightData) { var res = new List <AnimatedCastEvent>(); foreach (KeyValuePair <ulong, List <CombatItem> > pairBySrcAgent in castEventsBySrcAgent) { var resBySrcAgent = new List <AnimatedCastEvent>(); var castEventsBySrcAgentBySkillID = pairBySrcAgent.Value.GroupBy(x => x.SkillID).ToDictionary(x => x.Key, x => x.ToList()); foreach (KeyValuePair <uint, List <CombatItem> > pairBySrcAgentBySkillID in castEventsBySrcAgentBySkillID) { var resBySrcAgentBySkillID = new List <AnimatedCastEvent>(); CombatItem startItem = null; foreach (CombatItem c in pairBySrcAgentBySkillID.Value) { if (c.StartCasting()) { // missing end if (startItem != null) { resBySrcAgentBySkillID.Add(new AnimatedCastEvent(startItem, agentData, skillData, fightData.LogEnd)); } startItem = c; } else if (c.EndCasting()) { if (startItem != null && startItem.SkillID == c.SkillID) { resBySrcAgentBySkillID.Add(new AnimatedCastEvent(startItem, agentData, skillData, c)); startItem = null; } // missing start else { var toCheck = new AnimatedCastEvent(agentData, skillData, c); // we are only interested in animations started before log starts if (toCheck.Time < fightData.LogStart) { resBySrcAgentBySkillID.Add(toCheck); } } } } // missing end if (startItem != null) { resBySrcAgentBySkillID.Add(new AnimatedCastEvent(startItem, agentData, skillData, fightData.LogEnd)); } resBySrcAgentBySkillID.RemoveAll(x => x.Caster.IsPlayer && x.ActualDuration <= 1); resBySrcAgent.AddRange(resBySrcAgentBySkillID); } resBySrcAgent = resBySrcAgent.OrderBy(x => x.Time).ToList(); // sanitize for (int i = 0; i < resBySrcAgent.Count - 1; i++) { resBySrcAgent[i].CutAt(resBySrcAgent[i + 1].Time + ParserHelper.ServerDelayConstant); } res.AddRange(resBySrcAgent); } res = res.OrderBy(x => x.Time).ToList(); return(res); }
public static List <AnimatedCastEvent> CreateCastEvents(Dictionary <ulong, List <CombatItem> > castEventsBySrcAgent, AgentData agentData, SkillData skillData) { var res = new List <AnimatedCastEvent>(); foreach (KeyValuePair <ulong, List <CombatItem> > pair in castEventsBySrcAgent) { CombatItem startItem = null; foreach (CombatItem c in pair.Value) { if (c.IsActivation.StartCasting()) { // missing end if (startItem != null) { res.Add(new AnimatedCastEvent(startItem, agentData, skillData, c.Time)); } startItem = c; } else if (c.IsActivation.EndCasting()) { if (startItem != null && startItem.SkillID == c.SkillID) { res.Add(new AnimatedCastEvent(startItem, agentData, skillData, c)); startItem = null; } // missing start else { res.Add(new AnimatedCastEvent(agentData, skillData, c)); } } } } res.Sort((x, y) => x.Time.CompareTo(y.Time)); return(res); }
private void EICastParse(IReadOnlyList <Player> players, SkillData skillData, FightData fightData, AgentData agentData) { List <AbstractCastEvent> toAdd = fightData.Logic.SpecialCastEventProcess(this, skillData); toAdd.AddRange(ProfHelper.ComputeInstantCastEvents(players, this, skillData, agentData, fightData.Logic)); foreach (Player p in players) { switch (p.Spec) { case ParserHelper.Spec.Willbender: toAdd.AddRange(WillbenderHelper.ComputeFlowingResolveCastEvents(p, this, skillData, agentData)); break; default: break; } } // var castIDsToSort = new HashSet <long>(); var castAgentsToSort = new HashSet <AgentItem>(); var wepSwapAgentsToSort = new HashSet <AgentItem>(); var instantAgentsToSort = new HashSet <AgentItem>(); foreach (AbstractCastEvent cast in toAdd) { if (cast is AnimatedCastEvent ace) { if (_animatedCastData.TryGetValue(ace.Caster, out List <AnimatedCastEvent> animatedCastList)) { animatedCastList.Add(ace); } else { _animatedCastData[ace.Caster] = new List <AnimatedCastEvent>() { ace }; } castAgentsToSort.Add(ace.Caster); if (_animatedCastDataById.TryGetValue(ace.SkillId, out List <AnimatedCastEvent> animatedCastByIDList)) { animatedCastByIDList.Add(ace); } else { _animatedCastDataById[cast.SkillId] = new List <AnimatedCastEvent>() { ace }; } castIDsToSort.Add(cast.SkillId); } if (cast is WeaponSwapEvent wse) { if (_weaponSwapData.TryGetValue(wse.Caster, out List <WeaponSwapEvent> weaponSwapList)) { weaponSwapList.Add(wse); } else { _weaponSwapData[wse.Caster] = new List <WeaponSwapEvent>() { wse }; } wepSwapAgentsToSort.Add(wse.Caster); } if (cast is InstantCastEvent ice) { if (_instantCastData.TryGetValue(ice.Caster, out List <InstantCastEvent> instantCastList)) { instantCastList.Add(ice); } else { _instantCastData[ice.Caster] = new List <InstantCastEvent>() { ice }; } instantAgentsToSort.Add(ice.Caster); } } foreach (long castID in castIDsToSort) { _animatedCastDataById[castID] = _animatedCastDataById[castID].OrderBy(x => x.Time).ToList(); } foreach (AgentItem a in castAgentsToSort) { _animatedCastData[a] = _animatedCastData[a].OrderBy(x => x.Time).ToList(); } foreach (AgentItem a in wepSwapAgentsToSort) { _weaponSwapData[a] = _weaponSwapData[a].OrderBy(x => x.Time).ToList(); } foreach (AgentItem a in instantAgentsToSort) { _instantCastData[a] = _instantCastData[a].OrderBy(x => x.Time).ToList(); } }
internal NonDirectBreakbarDamageEvent(CombatItem evtcItem, AgentData agentData, SkillData skillData) : base(evtcItem, agentData, skillData) { BreakbarDamage = evtcItem.BuffDmg / 10.0; }
public static void AddStateChangeEvent(CombatItem stateChangeEvent, AgentData agentData, SkillData skillData, MetaEventsContainer metaDataEvents, StatusEventsContainer statusEvents, List <RewardEvent> rewardEvents, List <WeaponSwapEvent> wepSwaps, List <AbstractBuffEvent> buffEvents) { switch (stateChangeEvent.IsStateChange) { case ArcDPSEnums.StateChange.EnterCombat: var enterCombatEvt = new EnterCombatEvent(stateChangeEvent, agentData); Add(statusEvents.EnterCombatEvents, enterCombatEvt.Src, enterCombatEvt); break; case ArcDPSEnums.StateChange.ExitCombat: var exitCombatEvt = new ExitCombatEvent(stateChangeEvent, agentData); Add(statusEvents.ExitCombatEvents, exitCombatEvt.Src, exitCombatEvt); break; case ArcDPSEnums.StateChange.ChangeUp: var aliveEvt = new AliveEvent(stateChangeEvent, agentData); Add(statusEvents.AliveEvents, aliveEvt.Src, aliveEvt); break; case ArcDPSEnums.StateChange.ChangeDead: var deadEvt = new DeadEvent(stateChangeEvent, agentData); Add(statusEvents.DeadEvents, deadEvt.Src, deadEvt); break; case ArcDPSEnums.StateChange.ChangeDown: var downEvt = new DownEvent(stateChangeEvent, agentData); Add(statusEvents.DownEvents, downEvt.Src, downEvt); break; case ArcDPSEnums.StateChange.Spawn: var spawnEvt = new SpawnEvent(stateChangeEvent, agentData); Add(statusEvents.SpawnEvents, spawnEvt.Src, spawnEvt); break; case ArcDPSEnums.StateChange.Despawn: var despawnEvt = new DespawnEvent(stateChangeEvent, agentData); Add(statusEvents.DespawnEvents, despawnEvt.Src, despawnEvt); break; case ArcDPSEnums.StateChange.HealthUpdate: var healthEvt = new HealthUpdateEvent(stateChangeEvent, agentData); Add(statusEvents.HealthUpdateEvents, healthEvt.Src, healthEvt); break; case ArcDPSEnums.StateChange.BarrierUpdate: var barrierEvt = new BarrierUpdateEvent(stateChangeEvent, agentData); Add(statusEvents.BarrierUpdateEvents, barrierEvt.Src, barrierEvt); break; case ArcDPSEnums.StateChange.LogStart: if (stateChangeEvent.Value == 0 || stateChangeEvent.BuffDmg == 0) { return; } metaDataEvents.LogStartEvent = new LogStartEvent(stateChangeEvent); break; case ArcDPSEnums.StateChange.LogEnd: if (stateChangeEvent.Value == 0 || stateChangeEvent.BuffDmg == 0) { return; } metaDataEvents.LogEndEvent = new LogEndEvent(stateChangeEvent); break; case ArcDPSEnums.StateChange.MaxHealthUpdate: var maxHealthEvt = new MaxHealthUpdateEvent(stateChangeEvent, agentData); Add(statusEvents.MaxHealthUpdateEvents, maxHealthEvt.Src, maxHealthEvt); break; case ArcDPSEnums.StateChange.PointOfView: if (stateChangeEvent.SrcAgent == 0) { return; } metaDataEvents.PointOfViewEvent = new PointOfViewEvent(stateChangeEvent, agentData); break; case ArcDPSEnums.StateChange.Language: metaDataEvents.LanguageEvent = new LanguageEvent(stateChangeEvent); break; case ArcDPSEnums.StateChange.GWBuild: if (stateChangeEvent.SrcAgent == 0) { return; } metaDataEvents.BuildEvent = new BuildEvent(stateChangeEvent); break; case ArcDPSEnums.StateChange.ShardId: metaDataEvents.ShardEvents.Add(new ShardEvent(stateChangeEvent)); break; case ArcDPSEnums.StateChange.Reward: #if !NO_REWARDS rewardEvents.Add(new RewardEvent(stateChangeEvent)); #endif break; case ArcDPSEnums.StateChange.TeamChange: var tcEvt = new TeamChangeEvent(stateChangeEvent, agentData); Add(statusEvents.TeamChangeEvents, tcEvt.Src, tcEvt); break; case ArcDPSEnums.StateChange.AttackTarget: var aTEvt = new AttackTargetEvent(stateChangeEvent, agentData); Add(statusEvents.AttackTargetEvents, aTEvt.Src, aTEvt); break; case ArcDPSEnums.StateChange.Targetable: var tarEvt = new TargetableEvent(stateChangeEvent, agentData); Add(statusEvents.TargetableEvents, tarEvt.Src, tarEvt); break; case ArcDPSEnums.StateChange.MapID: metaDataEvents.MapIDEvents.Add(new MapIDEvent(stateChangeEvent)); break; case ArcDPSEnums.StateChange.Guild: var gEvt = new GuildEvent(stateChangeEvent, agentData); Add(metaDataEvents.GuildEvents, gEvt.Src, gEvt); break; case ArcDPSEnums.StateChange.BuffInfo: case ArcDPSEnums.StateChange.BuffFormula: if (metaDataEvents.BuffInfoEvents.TryGetValue(stateChangeEvent.SkillID, out BuffInfoEvent buffInfoEvent)) { buffInfoEvent.CompleteBuffInfoEvent(stateChangeEvent); } else { buffInfoEvent = new BuffInfoEvent(stateChangeEvent); metaDataEvents.BuffInfoEvents[stateChangeEvent.SkillID] = buffInfoEvent; } if (stateChangeEvent.IsStateChange == ArcDPSEnums.StateChange.BuffInfo) { if (metaDataEvents.BuffInfoEventsByCategory.TryGetValue(buffInfoEvent.Category, out List <BuffInfoEvent> bdEvtList)) { bdEvtList.Add(buffInfoEvent); } else { metaDataEvents.BuffInfoEventsByCategory[buffInfoEvent.Category] = new List <BuffInfoEvent> { buffInfoEvent }; } } break; case ArcDPSEnums.StateChange.SkillInfo: case ArcDPSEnums.StateChange.SkillTiming: if (metaDataEvents.SkillInfoEvents.TryGetValue(stateChangeEvent.SkillID, out SkillInfoEvent skillInfoEvent)) { skillInfoEvent.CompleteSkillInfoEvent(stateChangeEvent); } else { skillInfoEvent = new SkillInfoEvent(stateChangeEvent); metaDataEvents.SkillInfoEvents[stateChangeEvent.SkillID] = skillInfoEvent; } break; case ArcDPSEnums.StateChange.BreakbarState: var bSEvt = new BreakbarStateEvent(stateChangeEvent, agentData); Add(statusEvents.BreakbarStateEvents, bSEvt.Src, bSEvt); break; case ArcDPSEnums.StateChange.BreakbarPercent: var bPEvt = new BreakbarPercentEvent(stateChangeEvent, agentData); Add(statusEvents.BreakbarPercentEvents, bPEvt.Src, bPEvt); break; case ArcDPSEnums.StateChange.Error: metaDataEvents.ErrorEvents.Add(new ErrorEvent(stateChangeEvent)); break; case ArcDPSEnums.StateChange.Tag: // Getting ready in case this becomes an actual state event _ = new TagEvent(stateChangeEvent, agentData); //Add(metaDataEvents.TagEvents, tagEvt.Src, tagEvt); break; case ArcDPSEnums.StateChange.Velocity: var velEvt = new VelocityEvent(stateChangeEvent, agentData); Add(statusEvents.MovementEvents, velEvt.Src, velEvt); break; case ArcDPSEnums.StateChange.Rotation: var rotEvt = new RotationEvent(stateChangeEvent, agentData); Add(statusEvents.MovementEvents, rotEvt.Src, rotEvt); break; case ArcDPSEnums.StateChange.Position: var posEvt = new PositionEvent(stateChangeEvent, agentData); Add(statusEvents.MovementEvents, posEvt.Src, posEvt); break; case ArcDPSEnums.StateChange.WeaponSwap: wepSwaps.Add(new WeaponSwapEvent(stateChangeEvent, agentData, skillData)); break; case ArcDPSEnums.StateChange.StackActive: buffEvents.Add(new BuffStackActiveEvent(stateChangeEvent, agentData, skillData)); break; case ArcDPSEnums.StateChange.StackReset: buffEvents.Add(new BuffStackResetEvent(stateChangeEvent, agentData, skillData)); break; case ArcDPSEnums.StateChange.BuffInitial: buffEvents.Add(new BuffApplyEvent(stateChangeEvent, agentData, skillData)); break; default: break; } }
internal AbstractBuffStackEvent(CombatItem evtcItem, AgentData agentData, SkillData skillData) : base(evtcItem, skillData) { To = agentData.GetAgent(evtcItem.SrcAgent); }
internal RotationEvent(CombatItem evtcItem, AgentData agentData) : base(evtcItem, agentData) { }
internal NonDirectBreakbarDamageEvent(CombatItem evtcItem, AgentData agentData, SkillData skillData) : base(evtcItem, agentData, skillData) { BreakbarDamage = evtcItem.BuffDmg / 10.0; _cycle = GetBuffCycle(evtcItem.IsOffcycle); }
internal BuffRemoveAllEvent(CombatItem evtcItem, AgentData agentData, SkillData skillData) : base(evtcItem, agentData, skillData) { _lastRemovedDuration = evtcItem.BuffDmg; RemovedStacks = evtcItem.Result; }
private void EIExtraEventProcess(IReadOnlyList <Player> players, SkillData skillData, AgentData agentData, FightData fightData, ParserController operation, int arcdpsVersion) { operation.UpdateProgressWithCancellationCheck("Creating Custom Buff Events"); EIBuffParse(players, skillData, fightData); operation.UpdateProgressWithCancellationCheck("Creating Custom Damage Events"); EIDamageParse(skillData, fightData); operation.UpdateProgressWithCancellationCheck("Creating Custom Cast Events"); EICastParse(players, skillData, fightData, agentData); operation.UpdateProgressWithCancellationCheck("Creating Custom Status Events"); EIMetaAndStatusParse(fightData, arcdpsVersion); // master attachements operation.UpdateProgressWithCancellationCheck("Attaching Banners to Warriors"); WarriorHelper.AttachMasterToWarriorBanners(players, this); operation.UpdateProgressWithCancellationCheck("Attaching Turrets to Engineers"); EngineerHelper.AttachMasterToEngineerTurrets(players, this); operation.UpdateProgressWithCancellationCheck("Attaching Ranger Gadgets to Rangers"); RangerHelper.AttachMasterToRangerGadgets(players, this); operation.UpdateProgressWithCancellationCheck("Attaching Racial Gadgets to Players"); ProfHelper.AttachMasterToRacialGadgets(players, this); }
public static void AddStateChangeEvent(CombatItem stateChangeEvent, AgentData agentData, SkillData skillData, MetaEventsContainer metaDataEvents, StatusEventsContainer statusEvents, List <RewardEvent> rewardEvents, List <WeaponSwapEvent> wepSwaps, List <AbstractBuffEvent> buffEvents, int evtcVersion) { switch (stateChangeEvent.IsStateChange) { case ArcDPSEnums.StateChange.EnterCombat: var enterCombatEvt = new EnterCombatEvent(stateChangeEvent, agentData); Add(statusEvents.EnterCombatEvents, enterCombatEvt.Src, enterCombatEvt); break; case ArcDPSEnums.StateChange.ExitCombat: var exitCombatEvt = new ExitCombatEvent(stateChangeEvent, agentData); Add(statusEvents.ExitCombatEvents, exitCombatEvt.Src, exitCombatEvt); break; case ArcDPSEnums.StateChange.ChangeUp: var aliveEvt = new AliveEvent(stateChangeEvent, agentData); Add(statusEvents.AliveEvents, aliveEvt.Src, aliveEvt); break; case ArcDPSEnums.StateChange.ChangeDead: var deadEvt = new DeadEvent(stateChangeEvent, agentData); Add(statusEvents.DeadEvents, deadEvt.Src, deadEvt); break; case ArcDPSEnums.StateChange.ChangeDown: var downEvt = new DownEvent(stateChangeEvent, agentData); Add(statusEvents.DownEvents, downEvt.Src, downEvt); break; case ArcDPSEnums.StateChange.Spawn: var spawnEvt = new SpawnEvent(stateChangeEvent, agentData); Add(statusEvents.SpawnEvents, spawnEvt.Src, spawnEvt); break; case ArcDPSEnums.StateChange.Despawn: var despawnEvt = new DespawnEvent(stateChangeEvent, agentData); Add(statusEvents.DespawnEvents, despawnEvt.Src, despawnEvt); break; case ArcDPSEnums.StateChange.HealthUpdate: var healthEvt = new HealthUpdateEvent(stateChangeEvent, agentData); Add(statusEvents.HealthUpdateEvents, healthEvt.Src, healthEvt); break; case ArcDPSEnums.StateChange.BarrierUpdate: var barrierEvt = new BarrierUpdateEvent(stateChangeEvent, agentData); Add(statusEvents.BarrierUpdateEvents, barrierEvt.Src, barrierEvt); break; case ArcDPSEnums.StateChange.InstanceStart: metaDataEvents.InstanceStartEvent = new InstanceStartEvent(stateChangeEvent); break; case ArcDPSEnums.StateChange.LogStart: if (stateChangeEvent.Value == 0 || stateChangeEvent.BuffDmg == 0) { return; } metaDataEvents.LogStartEvent = new LogStartEvent(stateChangeEvent); break; case ArcDPSEnums.StateChange.LogEnd: if (stateChangeEvent.Value == 0 || stateChangeEvent.BuffDmg == 0) { return; } metaDataEvents.LogEndEvent = new LogEndEvent(stateChangeEvent); break; case ArcDPSEnums.StateChange.MaxHealthUpdate: var maxHealthEvt = new MaxHealthUpdateEvent(stateChangeEvent, agentData); Add(statusEvents.MaxHealthUpdateEvents, maxHealthEvt.Src, maxHealthEvt); break; case ArcDPSEnums.StateChange.PointOfView: if (stateChangeEvent.SrcAgent == 0) { return; } metaDataEvents.PointOfViewEvent = new PointOfViewEvent(stateChangeEvent, agentData); break; case ArcDPSEnums.StateChange.Language: metaDataEvents.LanguageEvent = new LanguageEvent(stateChangeEvent); break; case ArcDPSEnums.StateChange.GWBuild: if (stateChangeEvent.SrcAgent == 0) { return; } metaDataEvents.BuildEvent = new BuildEvent(stateChangeEvent); break; case ArcDPSEnums.StateChange.ShardId: metaDataEvents.ShardEvents.Add(new ShardEvent(stateChangeEvent)); break; case ArcDPSEnums.StateChange.Reward: #if !NO_REWARDS rewardEvents.Add(new RewardEvent(stateChangeEvent)); #endif break; case ArcDPSEnums.StateChange.TeamChange: var tcEvt = new TeamChangeEvent(stateChangeEvent, agentData); Add(statusEvents.TeamChangeEvents, tcEvt.Src, tcEvt); break; case ArcDPSEnums.StateChange.AttackTarget: var aTEvt = new AttackTargetEvent(stateChangeEvent, agentData); Add(statusEvents.AttackTargetEvents, aTEvt.Src, aTEvt); Add(statusEvents.AttackTargetEventsByAttackTarget, aTEvt.AttackTarget, aTEvt); break; case ArcDPSEnums.StateChange.Targetable: var tarEvt = new TargetableEvent(stateChangeEvent, agentData); Add(statusEvents.TargetableEvents, tarEvt.Src, tarEvt); break; case ArcDPSEnums.StateChange.MapID: metaDataEvents.MapIDEvents.Add(new MapIDEvent(stateChangeEvent)); break; case ArcDPSEnums.StateChange.Guild: var gEvt = new GuildEvent(stateChangeEvent, agentData); Add(metaDataEvents.GuildEvents, gEvt.Src, gEvt); break; case ArcDPSEnums.StateChange.BuffInfo: case ArcDPSEnums.StateChange.BuffFormula: if (metaDataEvents.BuffInfoEvents.TryGetValue(stateChangeEvent.SkillID, out BuffInfoEvent buffInfoEvent)) { buffInfoEvent.CompleteBuffInfoEvent(stateChangeEvent, evtcVersion); } else { buffInfoEvent = new BuffInfoEvent(stateChangeEvent, evtcVersion); metaDataEvents.BuffInfoEvents[stateChangeEvent.SkillID] = buffInfoEvent; } if (stateChangeEvent.IsStateChange == ArcDPSEnums.StateChange.BuffInfo) { if (metaDataEvents.BuffInfoEventsByCategory.TryGetValue(buffInfoEvent.Category, out List <BuffInfoEvent> bdEvtList)) { bdEvtList.Add(buffInfoEvent); } else { metaDataEvents.BuffInfoEventsByCategory[buffInfoEvent.Category] = new List <BuffInfoEvent> { buffInfoEvent }; } } break; case ArcDPSEnums.StateChange.SkillInfo: case ArcDPSEnums.StateChange.SkillTiming: if (metaDataEvents.SkillInfoEvents.TryGetValue(stateChangeEvent.SkillID, out SkillInfoEvent skillInfoEvent)) { skillInfoEvent.CompleteSkillInfoEvent(stateChangeEvent); } else { skillInfoEvent = new SkillInfoEvent(stateChangeEvent); metaDataEvents.SkillInfoEvents[stateChangeEvent.SkillID] = skillInfoEvent; } break; case ArcDPSEnums.StateChange.BreakbarState: var bSEvt = new BreakbarStateEvent(stateChangeEvent, agentData); Add(statusEvents.BreakbarStateEvents, bSEvt.Src, bSEvt); break; case ArcDPSEnums.StateChange.BreakbarPercent: var bPEvt = new BreakbarPercentEvent(stateChangeEvent, agentData); Add(statusEvents.BreakbarPercentEvents, bPEvt.Src, bPEvt); break; case ArcDPSEnums.StateChange.Error: metaDataEvents.ErrorEvents.Add(new ErrorEvent(stateChangeEvent)); break; case ArcDPSEnums.StateChange.Tag: var tagEvent = new TagEvent(stateChangeEvent, agentData); Add(statusEvents.TagEvents, tagEvent.Src, tagEvent); break; case ArcDPSEnums.StateChange.Velocity: var velEvt = new VelocityEvent(stateChangeEvent, agentData); Add(statusEvents.MovementEvents, velEvt.Src, velEvt); break; case ArcDPSEnums.StateChange.Rotation: var rotEvt = new RotationEvent(stateChangeEvent, agentData); Add(statusEvents.MovementEvents, rotEvt.Src, rotEvt); break; case ArcDPSEnums.StateChange.Position: var posEvt = new PositionEvent(stateChangeEvent, agentData); Add(statusEvents.MovementEvents, posEvt.Src, posEvt); break; case ArcDPSEnums.StateChange.WeaponSwap: wepSwaps.Add(new WeaponSwapEvent(stateChangeEvent, agentData, skillData)); break; case ArcDPSEnums.StateChange.StackActive: buffEvents.Add(new BuffStackActiveEvent(stateChangeEvent, agentData, skillData)); break; case ArcDPSEnums.StateChange.StackReset: buffEvents.Add(new BuffStackResetEvent(stateChangeEvent, agentData, skillData)); break; case ArcDPSEnums.StateChange.BuffInitial: buffEvents.Add(new BuffApplyEvent(stateChangeEvent, agentData, skillData)); break; case ArcDPSEnums.StateChange.Effect: var effectEvt = new EffectEvent(stateChangeEvent, agentData); statusEvents.EffectEvents.Add(effectEvt); Add(statusEvents.EffectEventsByID, effectEvt.EffectID, effectEvt); Add(statusEvents.EffectEventsBySrc, effectEvt.Src, effectEvt); if (effectEvt.IsAroundDst) { Add(statusEvents.EffectEventsByDst, effectEvt.Dst, effectEvt); } break; case ArcDPSEnums.StateChange.EffectIDToGUID: if (evtcVersion >= ParserHelper.ArcDPSBuilds.FunctionalIDToGUIDEvents) { switch (ArcDPSEnums.GetContentLocal((byte)stateChangeEvent.OverstackValue)) { case ArcDPSEnums.ContentLocal.Effect: var effectGUID = new EffectGUIDEvent(stateChangeEvent); metaDataEvents.EffectGUIDEventsByEffectID[effectGUID.ContentID] = effectGUID; metaDataEvents.EffectGUIDEventsByGUID[effectGUID.ContentGUID] = effectGUID; break; case ArcDPSEnums.ContentLocal.Marker: var markerGUID = new MarkerGUIDEvent(stateChangeEvent); metaDataEvents.MarkerGUIDEventsByMarkerID[markerGUID.ContentID] = markerGUID; metaDataEvents.MarkerGUIDEventsByGUID[markerGUID.ContentGUID] = markerGUID; break; default: break; } } break; default: break; } }
internal CombatData(List <CombatItem> allCombatItems, FightData fightData, AgentData agentData, SkillData skillData, IReadOnlyList <Player> players, ParserController operation, IReadOnlyDictionary <uint, AbstractExtensionHandler> extensions, int evtcVersion) { var combatEvents = allCombatItems.OrderBy(x => x.Time).ToList(); _skillIds = new HashSet <long>(); var castCombatEvents = new Dictionary <ulong, List <CombatItem> >(); var buffEvents = new List <AbstractBuffEvent>(); var wepSwaps = new List <WeaponSwapEvent>(); var brkDamageData = new List <AbstractBreakbarDamageEvent>(); var damageData = new List <AbstractHealthDamageEvent>(); operation.UpdateProgressWithCancellationCheck("Creating EI Combat Data"); foreach (CombatItem combatItem in combatEvents) { _skillIds.Add(combatItem.SkillID); if (combatItem.IsStateChange != ArcDPSEnums.StateChange.None) { if (combatItem.IsExtension) { if (extensions.TryGetValue(combatItem.Pad, out AbstractExtensionHandler handler)) { handler.InsertEIExtensionEvent(combatItem, agentData, skillData); } } else { CombatEventFactory.AddStateChangeEvent(combatItem, agentData, skillData, _metaDataEvents, _statusEvents, _rewardEvents, wepSwaps, buffEvents, evtcVersion); } } else if (combatItem.IsActivation != ArcDPSEnums.Activation.None) { if (castCombatEvents.TryGetValue(combatItem.SrcAgent, out List <CombatItem> list)) { list.Add(combatItem); } else { castCombatEvents[combatItem.SrcAgent] = new List <CombatItem>() { combatItem }; } } else if (combatItem.IsBuffRemove != ArcDPSEnums.BuffRemove.None) { CombatEventFactory.AddBuffRemoveEvent(combatItem, buffEvents, agentData, skillData); } else { if (combatItem.IsBuff != 0 && combatItem.BuffDmg == 0 && combatItem.Value > 0) { CombatEventFactory.AddBuffApplyEvent(combatItem, buffEvents, agentData, skillData); } else if (combatItem.IsBuff == 0) { CombatEventFactory.AddDirectDamageEvent(combatItem, damageData, brkDamageData, agentData, skillData); } else if (combatItem.IsBuff != 0 && combatItem.Value == 0) { CombatEventFactory.AddIndirectDamageEvent(combatItem, damageData, brkDamageData, agentData, skillData); } } } HasStackIDs = false;// arcdpsVersion > 20210529 && buffEvents.Any(x => x is BuffStackActiveEvent || x is BuffStackResetEvent) && (fightData.Logic.Mode == EncounterLogic.FightLogic.ParseMode.Instanced10 || fightData.Logic.Mode == EncounterLogic.FightLogic.ParseMode.Instanced5 || fightData.Logic.Mode == EncounterLogic.FightLogic.ParseMode.Benchmark); HasMovementData = _statusEvents.MovementEvents.Count > 1; HasBreakbarDamageData = brkDamageData.Any(); // operation.UpdateProgressWithCancellationCheck("Combining SkillInfo with SkillData"); skillData.CombineWithSkillInfo(_metaDataEvents.SkillInfoEvents); // operation.UpdateProgressWithCancellationCheck("Creating Cast Events"); List <AnimatedCastEvent> animatedCastData = CombatEventFactory.CreateCastEvents(castCombatEvents, agentData, skillData, fightData); _weaponSwapData = wepSwaps.GroupBy(x => x.Caster).ToDictionary(x => x.Key, x => x.ToList()); _animatedCastData = animatedCastData.GroupBy(x => x.Caster).ToDictionary(x => x.Key, x => x.ToList()); _instantCastData = new Dictionary <AgentItem, List <InstantCastEvent> >(); _animatedCastDataById = animatedCastData.GroupBy(x => x.SkillId).ToDictionary(x => x.Key, x => x.ToList()); // operation.UpdateProgressWithCancellationCheck("Creating Buff Events"); _buffDataByDst = buffEvents.GroupBy(x => x.To).ToDictionary(x => x.Key, x => x.ToList()); _buffData = buffEvents.GroupBy(x => x.BuffID).ToDictionary(x => x.Key, x => x.ToList()); // damage events operation.UpdateProgressWithCancellationCheck("Creating Damage Events"); _damageData = damageData.GroupBy(x => x.From).ToDictionary(x => x.Key, x => x.ToList()); _damageTakenData = damageData.GroupBy(x => x.To).ToDictionary(x => x.Key, x => x.ToList()); _damageDataById = damageData.GroupBy(x => x.SkillId).ToDictionary(x => x.Key, x => x.ToList()); _breakbarDamageData = brkDamageData.GroupBy(x => x.From).ToDictionary(x => x.Key, x => x.ToList()); _breakbarDamageDataById = brkDamageData.GroupBy(x => x.SkillId).ToDictionary(x => x.Key, x => x.ToList()); _breakbarDamageTakenData = brkDamageData.GroupBy(x => x.To).ToDictionary(x => x.Key, x => x.ToList()); _buffRemoveAllData = _buffData.ToDictionary(x => x.Key, x => x.Value.OfType <BuffRemoveAllEvent>().ToList()); // /*healing_data = allCombatItems.Where(x => x.getDstInstid() != 0 && x.isStateChange() == ParseEnum.StateChange.Normal && x.getIFF() == ParseEnum.IFF.Friend && x.isBuffremove() == ParseEnum.BuffRemove.None && * ((x.isBuff() == 1 && x.getBuffDmg() > 0 && x.getValue() == 0) || * (x.isBuff() == 0 && x.getValue() > 0))).ToList(); * * healing_received_data = allCombatItems.Where(x => x.isStateChange() == ParseEnum.StateChange.Normal && x.getIFF() == ParseEnum.IFF.Friend && x.isBuffremove() == ParseEnum.BuffRemove.None && * ((x.isBuff() == 1 && x.getBuffDmg() > 0 && x.getValue() == 0) || * (x.isBuff() == 0 && x.getValue() >= 0))).ToList();*/ foreach (AbstractExtensionHandler handler in extensions.Values) { handler.AttachToCombatData(this, operation, GetBuildEvent().Build); } EIExtraEventProcess(players, skillData, agentData, fightData, operation, evtcVersion); }
public static void AddBuffRemoveEvent(CombatItem buffEvent, List <AbstractBuffEvent> buffEvents, AgentData agentData, SkillData skillData) { switch (buffEvent.IsBuffRemove) { case ArcDPSEnums.BuffRemove.Single: buffEvents.Add(new BuffRemoveSingleEvent(buffEvent, agentData, skillData)); break; case ArcDPSEnums.BuffRemove.All: buffEvents.Add(new BuffRemoveAllEvent(buffEvent, agentData, skillData)); break; case ArcDPSEnums.BuffRemove.Manual: buffEvents.Add(new BuffRemoveManualEvent(buffEvent, agentData, skillData)); break; } }
internal BuffStackResetEvent(CombatItem evtcItem, AgentData agentData, SkillData skillData) : base(evtcItem, agentData, skillData) { BuffInstance = evtcItem.Pad; _resetToDuration = evtcItem.Value; }
public static void AddDirectDamageEvent(CombatItem damageEvent, List <AbstractHealthDamageEvent> hpDamage, List <AbstractBreakbarDamageEvent> brkBarDamage, AgentData agentData, SkillData skillData) { ArcDPSEnums.PhysicalResult result = ArcDPSEnums.GetPhysicalResult(damageEvent.Result); switch (result) { case ArcDPSEnums.PhysicalResult.BreakbarDamage: brkBarDamage.Add(new DirectBreakbarDamageEvent(damageEvent, agentData, skillData)); break; case ArcDPSEnums.PhysicalResult.Activation: case ArcDPSEnums.PhysicalResult.Unknown: break; default: hpDamage.Add(new DirectHealthDamageEvent(damageEvent, agentData, skillData, result)); break; } }
internal BuffRemoveSingleEvent(CombatItem evtcItem, AgentData agentData, SkillData skillData) : base(evtcItem, agentData, skillData) { _iff = evtcItem.IFF; BuffInstance = evtcItem.Pad; _removedActive = evtcItem.IsShields > 0; }
internal void SetFightName(CombatData combatData, AgentData agentData) { FightName = Logic.GetLogicName(combatData, agentData) + (_isCM == CMStatus.CM ? " CM" : ""); }
internal void SetFightName(CombatData combatData, AgentData agentData) { FightName = Logic.GetLogicName(combatData, agentData) + (_encounterStatus == EncounterMode.CM ? " CM" : "") + (_encounterStatus == EncounterMode.Story ? " Story" : ""); }
private void EICastParse(List <Player> players, SkillData skillData, AgentData agentData) { var toAdd = new List <AbstractCastEvent>(); toAdd.AddRange(ProfHelper.ComputeInstantCastEvents(players, this, skillData, agentData)); // var castIDsToSort = new HashSet <long>(); var castAgentsToSort = new HashSet <AgentItem>(); var wepSwapAgentsToSort = new HashSet <AgentItem>(); var instantAgentsToSort = new HashSet <AgentItem>(); foreach (AbstractCastEvent cast in toAdd) { if (cast is AnimatedCastEvent ace) { if (_animatedCastData.TryGetValue(ace.Caster, out List <AnimatedCastEvent> list1)) { list1.Add(ace); } else { _animatedCastData[ace.Caster] = new List <AnimatedCastEvent>() { ace }; } castAgentsToSort.Add(ace.Caster); } if (cast is WeaponSwapEvent wse) { if (_weaponSwapData.TryGetValue(wse.Caster, out List <WeaponSwapEvent> list1)) { list1.Add(wse); } else { _weaponSwapData[wse.Caster] = new List <WeaponSwapEvent>() { wse }; } wepSwapAgentsToSort.Add(wse.Caster); } if (cast is InstantCastEvent ice) { if (_instantCastData.TryGetValue(ice.Caster, out List <InstantCastEvent> list1)) { list1.Add(ice); } else { _instantCastData[ice.Caster] = new List <InstantCastEvent>() { ice }; } instantAgentsToSort.Add(ice.Caster); } if (_castDataById.TryGetValue(cast.SkillId, out List <AbstractCastEvent> list2)) { list2.Add(cast); } else { _castDataById[cast.SkillId] = new List <AbstractCastEvent>() { cast }; } castIDsToSort.Add(cast.SkillId); } foreach (long buffID in castIDsToSort) { _castDataById[buffID].Sort((x, y) => x.Time.CompareTo(y.Time)); } foreach (AgentItem a in castAgentsToSort) { _animatedCastData[a].Sort((x, y) => x.Time.CompareTo(y.Time)); } foreach (AgentItem a in wepSwapAgentsToSort) { _weaponSwapData[a].Sort((x, y) => x.Time.CompareTo(y.Time)); } foreach (AgentItem a in instantAgentsToSort) { _instantCastData[a].Sort((x, y) => x.Time.CompareTo(y.Time)); } }
internal BarrierUpdateEvent(CombatItem evtcItem, AgentData agentData) : base(evtcItem, agentData) { BarrierPercent = evtcItem.DstAgent / 100.0; }
internal BuffExtensionEvent(CombatItem evtcItem, AgentData agentData, SkillData skillData) : base(evtcItem, agentData, skillData) { _oldValue = evtcItem.OverstackValue - evtcItem.Value; _durationChange = evtcItem.Value; }
internal AbstractMovementEvent(CombatItem evtcItem, AgentData agentData) : base(evtcItem, agentData) { _dstAgent = evtcItem.DstAgent; _value = evtcItem.Value; }
internal BuffRemoveManualEvent(CombatItem evtcItem, AgentData agentData, SkillData skillData) : base(evtcItem, agentData, skillData) { }
public static List <AbstractDamageEvent> CreateDamageEvents(List <CombatItem> damageEvents, AgentData agentData, SkillData skillData) { var res = new List <AbstractDamageEvent>(); foreach (CombatItem c in damageEvents) { if ((c.IsBuff != 0 && c.Value == 0)) { res.Add(new NonDirectDamageEvent(c, agentData, skillData)); } else if (c.IsBuff == 0) { res.Add(new DirectDamageEvent(c, agentData, skillData)); } } return(res); }