Skip to content

Commit

Permalink
move event ordering back to Deva needed for aplcheck, for analyzers c…
Browse files Browse the repository at this point in the history
…astlinks should be enough
  • Loading branch information
Krealle committed Apr 4, 2024
1 parent f6b5414 commit fc7c9c6
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 78 deletions.
4 changes: 2 additions & 2 deletions src/analysis/retail/evoker/devastation/CombatLogParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import EssenceBurst from './modules/abilities/EssenceBurst';
import Burnout from './modules/abilities/Burnout';
import DragonRage from './modules/abilities/DragonRage';
import CastLinkNormalizer from './modules/normalizers/CastLinkNormalizer';
import EssenceBurstNormalizer from './modules/normalizers/EssenceBurstNormalizer';
import Snapfire from './modules/abilities/Snapfire';
import T30DevaTier4P from './modules/dragonflight/tier/T30DevaTier4P';
import CooldownThroughputTracker from './modules/features/CooldownThroughputTracker';
Expand All @@ -31,7 +32,6 @@ import T31DevaTier from './modules/dragonflight/tier/T31DevaTier';

// Shared
import {
EssenceBurstEventOrderNormalizer,
EssenceBurstCastLinkNormalizer,
EBRefreshNormalizer,
LeapingFlamesNormalizer,
Expand All @@ -47,7 +47,6 @@ class CombatLogParser extends MainCombatLogParser {
static specModules = {
// Shared
ebRefreshNormalizer: EBRefreshNormalizer,
essenceBurstEventOrderNormalizer: EssenceBurstEventOrderNormalizer,
essenceBurstCastLinkNormalizer: EssenceBurstCastLinkNormalizer,
leapingFlamesNormalizer: LeapingFlamesNormalizer,
leapingFlames: LeapingFlames,
Expand All @@ -63,6 +62,7 @@ class CombatLogParser extends MainCombatLogParser {

// Normalizer
castLinkNormalizer: CastLinkNormalizer,
essenceBurstNormalizer: EssenceBurstNormalizer,

// features
apls: AplCheck,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import SPELLS from 'common/SPELLS/evoker';
import EventOrderNormalizer, { EventOrder } from 'parser/core/EventOrderNormalizer';
import { EventType } from 'parser/core/Events';
import { Options } from 'parser/core/Module';
import { EB_GENERATION_EVENT_TYPES } from '../../../shared/modules/normalizers/EssenceBurstCastLinkNormalizer';

const EVENT_ORDERS: EventOrder[] = [
{
beforeEventId: SPELLS.SHATTERING_STAR.id,
beforeEventType: EventType.Cast,
afterEventId: SPELLS.ESSENCE_BURST_DEV_BUFF.id,
afterEventType: EB_GENERATION_EVENT_TYPES,
bufferMs: 50,
anyTarget: true,
updateTimestamp: true,
},
];

/**
* The applybuff from Arcane Vigor is logged before the cast of Shattering Star
* This also happens to Living Flames cast with Burnout
* This normalizes events so that the Shattering Star cast always comes before the EB buff
*
* EventOrderNormalizer only normalizes 1 instance per entry in the EventOrder array
* which means that abilities that can generate multiple EB at once, eg. Living Flame cast with
* Leaping Flames, will only have one event normalized, which can be non ideal. Therefore we will build
* an array with all the different types to make sure we get them all normalized.
**/
class EssenceBurstNormalizer extends EventOrderNormalizer {
constructor(options: Options) {
super(options, EVENT_ORDERS);

EB_GENERATION_EVENT_TYPES.forEach((ebApplyEventType) => {
EVENT_ORDERS.push({
beforeEventId: SPELLS.LIVING_FLAME_CAST.id,
beforeEventType: EventType.Cast,
afterEventId: SPELLS.ESSENCE_BURST_DEV_BUFF.id,
afterEventType: ebApplyEventType,
bufferMs: 50,
anyTarget: true,
updateTimestamp: true,
});
});
}
}

export default EssenceBurstNormalizer;
1 change: 0 additions & 1 deletion src/analysis/retail/evoker/shared/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export {
default as LivingFlameNormalizer,
isFromLeapingFlames,
} from './modules/normalizers/LeapingFlamesNormalizer';
export { default as EssenceBurstEventOrderNormalizer } from './modules/normalizers/EssenceBurstEventOrderNormalizer';
export { default as EssenceBurstCastLinkNormalizer } from './modules/normalizers/EssenceBurstCastLinkNormalizer';
export { default as EBRefreshNormalizer } from './modules/normalizers/EBRefreshNormalizer';
export { default as LeapingFlames } from './modules/talents/LeapingFlames';
Expand Down

This file was deleted.

0 comments on commit fc7c9c6

Please sign in to comment.