# Enemy Bloodlust source contract — 2026-10-05 `src/game/enemyBloodlust.ts` records the sourced NPC contract for spell 6742 and exposes the melee swing-interval calculation used when independent Aura 138 haste effects overlap. It models one explicitly selected friendly creature per application. It does not infer Shaman player-party semantics from the similarly named player spell. ## Pinned client rows The active Ascension Spell.dbc is `../LadiksMPQEditor/client-current/area-52/patch-D/DBFilesClient/Spell.dbc` (SHA-256 `2f77f18b91ffbae32a19568e4bc05ec78ee384b6ba8dd2a6e05f0e97abbb2dce`). The Epoch Spell.dbc is `../HealerMan-Storage/pipeline-work/dungeons/epoch-client/DBFilesClient/Spell.dbc` (SHA-256 `d5cce1a83550dcfa9eb2f0251dbb11fd24c272534b2b1a9b230924a44d817ab3`). Both contain the same spell 6742 fields: | Spell.dbc field | Value | | --- | ---: | | Range index | 4 | | School mask / damage class | 8 / 1 | | Duration index / resolved duration | 9 / 30,000 ms | | Dispel / stack amount | 1 (Magic) / 0 | | Attributes 0–7 | 0 | | Effect | 6 (`APPLY_AURA`) | | Aura / base points | 138 (`MOD_MELEE_HASTE`) / +30 | | Implicit targets A / B | 21 (`TARGET_UNIT_TARGET_ALLY`) / 0 | | Radius / misc value / period | 0 / 0 / 0 | | Trigger spell | 0 | The duration comes from the pinned shared patch-S SpellDuration.dbc (`eeae44ef0185924f3d6ec57ab2701c66566db86e51ab0bae017a9449126eb3a0`); the shared SpellRadius.dbc fallback is `dba6ed2f165f75c84dda5f32ae46b1a01fe562efd88fa51fd19365705c3e6a44`. SpellRange index 4 comes from shared patch-S SpellRange.dbc (SHA-256 `bb899631818942a7a7100abfb7a970612a79ac99637b1b459561e2b108125ddd`): both friendly and hostile ranges are 0–30 yards, with flags 0. This row and the effect target describe a selected friendly unit, not an area target; the effect has no radius. ## Historical NPC selection and cast gates The read-only AzerothCore world snapshot's `creature_template_spell.sql` lists Hamhock (entry 1717) with spells 6742 and 421. Its `smart_scripts.sql` rows provide two separate Bloodlust paths: - Update-in-combat event 0 has a fixed 5,000 ms initial delay, no repeat timer, 100% chance, and NOT_REPEATABLE flag 1. It casts spell 6742 with cast flags 32 (`SMARTCAST_AURA_NOT_PRESENT`) on target type 1 (self). AzerothCore only processes this event while Hamhock is engaged; the cast flag skips recasting while that target already has Bloodlust. - Friendly-missing-buff event 16 uses spell 6742, radius 30, repeat interval 10,000 ms, and `onlyInCombat=0`. It casts spell 6742 with flags 0 on target type 7 (`SMART_TARGET_ACTION_INVOKER`), the selected missing-buff recipient. The event starts active without an initial delay and resets its 10-second repeat timer after it processes a recipient. The historical `FriendlyMissingBuffInRange` predicate further requires the candidate creature to be alive, in combat, non-hostile to the caster, within 30 yards on the same map and phase, and missing spell 6742. The search uses a creature-list searcher, so this AI path selects creatures rather than the player party. Its predicate has no self-exclusion or line-of-sight check; the normal, untriggered cast still uses ordinary spell validation. Distance checks include the source and target object sizes. These are source gates; the current game entity state has no faction, phase, or collision-radius data and must document its corresponding selection approximation. ## Haste stacking AzerothCore maps Aura 138 to `HandleModMeleeSpeedPct`, which applies a separate percentage attack-speed factor to main-hand and off-hand swing intervals. The same-effect spell-group lookup suppresses weaker members only when the data places them in an exclusive group. The historical `spell_group.sql` does not place either 6742 or Enrage 8599 in its “Melee Haste Buffs” group. Their two +30% effects therefore combine as separate factors: an active Bloodlust and Enrage yield `1 / (1.3 × 1.3)`, or about 0.591716 of the prior swing interval. They do not become one additive +60% modifier (0.625 interval factor). `enemyMeleeHasteIntervalMultiplier` applies the sourced positive and negative Aura 138 interval factors to marked source modifiers in the already-filtered active aura list for one enemy, then preserves the existing additive interval calculation for unmarked haste modifiers. It leaves auto-attack ability cooldowns and unrelated haste channels unchanged. The Bloodlust contract itself exposes only melee haste, Magic dispel, a 30-second duration, and the explicit-friendly 30-yard target shape. Focused validation is `npx vitest run src/game/enemyBloodlust.test.ts src/game/enemyBloodlust.integration.test.ts`.