diff --git a/src/analysis/retail/monk/mistweaver/CHANGELOG.tsx b/src/analysis/retail/monk/mistweaver/CHANGELOG.tsx index 79278c9948b..5b266195ed5 100644 --- a/src/analysis/retail/monk/mistweaver/CHANGELOG.tsx +++ b/src/analysis/retail/monk/mistweaver/CHANGELOG.tsx @@ -5,6 +5,7 @@ import { Trevor, Vohrr } from 'CONTRIBUTORS'; import SpellLink from 'interface/SpellLink'; export default [ + change(date (2024, 9, 24), <>Fix crash again, Trevor), change(date (2024, 9, 24), <>Fix crash in guide section when player did not cast , Trevor), change(date (2024, 9, 22), <>Add guide section for , Trevor), change(date (2024, 9, 17), <>Add check for to module, Trevor), diff --git a/src/analysis/retail/monk/shared/hero/ConduitOfTheCelestials/talents/CelestialConduit.tsx b/src/analysis/retail/monk/shared/hero/ConduitOfTheCelestials/talents/CelestialConduit.tsx index 084c8bd2698..44728a937c3 100644 --- a/src/analysis/retail/monk/shared/hero/ConduitOfTheCelestials/talents/CelestialConduit.tsx +++ b/src/analysis/retail/monk/shared/hero/ConduitOfTheCelestials/talents/CelestialConduit.tsx @@ -44,7 +44,6 @@ interface CastInfo { cooldownMap: Map | undefined; // hits per pulse targetsHit: number[]; - castUnity: boolean; } const LESS_IMPORTANT_CDR_SPELLS: Set = new Set([ @@ -84,6 +83,10 @@ class CelestialConduit extends Analyzer { Events.EndChannel.by(SELECTED_PLAYER).spell(TALENTS_MONK.CELESTIAL_CONDUIT_TALENT), this.onChannelEnd, ); + this.addEventListener( + Events.EndChannel.by(SELECTED_PLAYER).spell(TALENTS_MONK.CELESTIAL_CONDUIT_TALENT), + this.onUnityWithin, + ); this.addEventListener( Events.damage.by(SELECTED_PLAYER).spell(SPELLS.CELESTIAL_CONDUIT_DAMAGE), @@ -129,13 +132,13 @@ class CelestialConduit extends Analyzer { cooldownMap: undefined, targetsHit: [], timestamp: event.timestamp, - castUnity: false, }); } - private onUnityWithin(event: CastEvent) { - this.castInfoList.at(-1)!.cooldownMap = this.getCooldownMap(); - this.castInfoList.at(-1)!.castUnity = true; + private onUnityWithin(event: CastEvent | EndChannelEvent) { + if (!this.castInfoList.at(-1)?.cooldownMap) { + this.castInfoList.at(-1)!.cooldownMap = this.getCooldownMap(); + } } private onChannelEnd(event: EndChannelEvent) { @@ -164,7 +167,6 @@ class CelestialConduit extends Analyzer { cooldownMap: undefined, targetsHit: [], timestamp: event.timestamp, - castUnity: false, }); } if (event.type === EventType.Heal) { @@ -199,49 +201,31 @@ class CelestialConduit extends Analyzer { ), details: <>{castInfo.cancelled ? 'No' : 'Yes'}, }; - const unityPerf = castInfo.castUnity - ? QualitativePerformance.Good - : QualitativePerformance.Fail; - const unityItem: CooldownExpandableItem = { - label: ( - <> - Cast - - ), - result: ( - <> - - - ), - details: castInfo.castUnity ? 'Yes' : 'No', - }; const cooldownPerfs: QualitativePerformance[] = []; const cooldownItems: CooldownExpandableItem[] = []; - if (castInfo.cooldownMap) { - castInfo.cooldownMap!.forEach((cooldown, spellId) => { - const perf = - cooldown === 0 - ? LESS_IMPORTANT_CDR_SPELLS.has(spellId) - ? QualitativePerformance.Ok - : QualitativePerformance.Fail - : QualitativePerformance.Good; - cooldownPerfs.push(perf); - cooldownItems.push({ - label: ( - <> - on cooldown when casting{' '} - - - ), - result: ( - <> - - - ), - details: <>{cooldown === 0 ? 'No' : 'Yes'}, - }); + castInfo.cooldownMap!.forEach((cooldown, spellId) => { + const perf = + cooldown === 0 + ? LESS_IMPORTANT_CDR_SPELLS.has(spellId) + ? QualitativePerformance.Ok + : QualitativePerformance.Fail + : QualitativePerformance.Good; + cooldownPerfs.push(perf); + cooldownItems.push({ + label: ( + <> + on cooldown when casting{' '} + + + ), + result: ( + <> + + + ), + details: <>{cooldown === 0 ? 'No' : 'Yes'}, }); - } + }); const avgTargetsHit = castInfo.targetsHit.reduce((prev, cur) => { @@ -259,8 +243,8 @@ class CelestialConduit extends Analyzer { details: <>{avgTargetsHit.toFixed(1)} , }; return { - perf: getAveragePerf([cancelPerf, unityPerf, ...cooldownPerfs, targetHitPerf]), - items: [cancelledItem, unityItem, ...cooldownItems, targetsHitItem], + perf: getAveragePerf([cancelPerf, ...cooldownPerfs, targetHitPerf]), + items: [cancelledItem, ...cooldownItems, targetsHitItem], }; }