Skip to content

Core/Auras: Fix hunter periodic damage critical bonus calculation#463

Open
gonzo1247 wants to merge 2 commits intoThe-Cataclysm-Preservation-Project:masterfrom
gonzo1247:Hunter-Dot-Correcture
Open

Core/Auras: Fix hunter periodic damage critical bonus calculation#463
gonzo1247 wants to merge 2 commits intoThe-Cataclysm-Preservation-Project:masterfrom
gonzo1247:Hunter-Dot-Correcture

Conversation

@gonzo1247
Copy link
Contributor

Changes proposed:

Certain Hunter periodic spells (e.g. Serpent Sting, Black Arrow) were using the melee/ranged critical damage baseline (200%) due to being classified with SPELL_DAMAGE_CLASS_RANGED.

However, these spells are periodic in nature and should follow the magical critical damage baseline (150%), as intended by game mechanics.

Because of this, talents like Toxicology (82832 / 82833), which increase critical damage of these effects by 50% / 100%, had little to no effect, since the spells were already dealing 200% critical damage by default.

This change ensures that:

  • Hunter periodic spells use the correct magical critical damage baseline (150%)
  • SPELLMOD_CRIT_DAMAGE_BONUS correctly scales the crit bonus portion
  • Talents like Toxicology now properly increase critical damage as intended

Example:
Before:

  • Base crit: 200%
  • Toxicology had no effective impact

After:

  • Base crit: 150%
  • Toxicology increases crit damage to 200% / 250% as expected

IsReducedPeriodicCritDamageSpell is used to explicitly identify Hunter periodic spells that should use the reduced periodic critical damage baseline (150%).

These spells are flagged as SPELL_DAMAGE_CLASS_RANGED and would normally follow the 200% melee/ranged critical damage path. However, they are intended exceptions and should instead use the reduced 150% baseline.

A generic solution is not feasible here, as there are no reliable shared attributes that distinguish these spells without introducing unintended side effects. Therefore, an explicit spell-based check is used to ensure correct behavior.

Tests performed: (Does it build, tested in-game, etc)
Build has been tested in-game using the Toxicology talent (82832 / 82833), both with and without it.

Results:

  • Without talent: periodic critical damage correctly uses the 150% magical baseline
  • With talent: SPELLMOD_CRIT_DAMAGE_BONUS properly increases the crit bonus portion

This confirms that Toxicology now correctly affects Serpent Sting and Black Arrow as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant