Preserve source rank recovery categories for WoW actor cooldowns (#3)

Native integration: Codex/healer-man-godot#114.
Coordinator: /root, session 01a11cd3-fa7c-7510-ba8f-bc7a3d0310a6.
Workers: single_pass_source, single_pass_validation, single_pass_renderer; GPT-6 Luna xhigh.
This commit is contained in:
warren committed 2026-10-09 18:13:10 -04:00
1 parent fc21cbca9b
commit 8a7e44cc14
13 files changed
+448 -18

No files matched your search

+13 -8
View File
@@ -47,6 +47,7 @@ import {
useCombatStore,
} from "./combatStore";
import { raceAffixHasteMultiplier } from "./dungeonRaceAffixBuffs";
import { abilityGcdCategory, startAbilityGlobalCooldown } from "./wowGlobalCooldown";
import { activeRaceOrbId } from "./dungeonRaceAffixRuntime";
import {
WOW335_PALADIN_ILLUMINATION_TALENT_ID,
@@ -969,9 +970,9 @@ function partyWarlockBackdraftCast(
const haste = raceAffixHasteMultiplier(now);
const reduction = effects.reductionPercent / 100;
const castTimeMs = Math.max(0, Math.round(Math.round(ability.castTimeMs / haste) * (1 - reduction)));
const gcdMs = ability.gcdMs > 0
const gcdMs = ability.gcdMs >= 1_000 && abilityGcdCategory(member, ability) === 133
? Math.max(1_000, Math.round(Math.round(ability.gcdMs / haste) * (1 - reduction)))
: 0;
: ability.gcdMs;
return {
ability: { ...ability, castTimeMs, gcdMs },
auraInstanceId: aura.instanceId,
@@ -5646,12 +5647,14 @@ export function advanceDungeonPartyCombat(now = Date.now()): void {
continue;
}
applyPartyRomChampionRunePulseOnUse(member, castAbility, now);
if (castAbility.gcdMs > 0 && castingHastePercent > 0) {
if (castingHastePercent > 0 && castAbility.gcdMs > 0
&& (abilityGcdCategory(committed, castAbility) === null
|| abilityGcdCategory(committed, castAbility) === 133 && castAbility.gcdMs >= 1_000)) {
committed = {
...committed,
globalCooldownEndsAt: now + Math.max(1_000, Math.round(
...startAbilityGlobalCooldown(committed, castAbility, now, Math.max(1_000, Math.round(
castAbility.gcdMs / (1 + castingHastePercent / 100),
)),
))),
};
}
applyPartyDeathKnightBladeBarrier(member, committed, castAbility, now);
@@ -5950,12 +5953,14 @@ export function advanceDungeonPartyCombat(now = Date.now()): void {
continue;
}
applyPartyRomChampionRunePulseOnUse(runtimeMember, castAbility, now);
if (castAbility.gcdMs > 0 && castingHastePercent > 0) {
if (castingHastePercent > 0 && castAbility.gcdMs > 0
&& (abilityGcdCategory(committed, castAbility) === null
|| abilityGcdCategory(committed, castAbility) === 133 && castAbility.gcdMs >= 1_000)) {
committed = {
...committed,
globalCooldownEndsAt: now + Math.max(1_000, Math.round(
...startAbilityGlobalCooldown(committed, castAbility, now, Math.max(1_000, Math.round(
castAbility.gcdMs / (1 + castingHastePercent / 100),
)),
))),
};
}
applyPartyDeathKnightBladeBarrier(runtimeMember, committed, castAbility, now);