Skip to content

fix(Scripts/Naxxramas): Thaddius casting Ball Lightning shouldn't pr…#24624

Open
Nyeriah wants to merge 7 commits intoazerothcore:masterfrom
Nyeriah:thaddius
Open

fix(Scripts/Naxxramas): Thaddius casting Ball Lightning shouldn't pr…#24624
Nyeriah wants to merge 7 commits intoazerothcore:masterfrom
Nyeriah:thaddius

Conversation

@Nyeriah
Copy link
Member

@Nyeriah Nyeriah commented Feb 5, 2026

…event other spells

Changes Proposed:

This PR proposes changes to:

  • Core (units, players, creatures, game systems).
  • Scripts (bosses, spell scripts, creature scripts).
  • Database (SAI, creatures, etc).

AI-assisted Pull Requests

Important

While the use of AI tools when preparing pull requests is not prohibited, contributors must clearly disclose when such tools have been used and specify the model involved.

Contributors are also expected to fully understand the changes they are submitting and must be able to explain and justify those changes when requested by maintainers.

  • AI tools (e.g. ChatGPT, Claude, or similar) were used entirely or partially in preparing this pull request. Please specify which tools were used, if any.

Issues Addressed:

SOURCE:

The changes have been validated through:

  • Live research (checked on live servers, e.g Classic WotLK, Retail, etc.)
  • Sniffs (remember to share them with the open source community!)
  • Video evidence, knowledge databases or other public sources (e.g forums, Wowhead, etc.)
  • The changes promoted by this pull request come partially or entirely from another project (cherry-pick). Cherry-picks must be committed using the proper --author tag in order to be accepted, thus crediting the original authors, unless otherwise unable to be found

Tests Performed:

This PR has been:

  • Tested in-game by the author.
  • Tested in-game by other community members/someone else other than the author/has been live on production servers.
  • This pull request requires further testing and may have edge cases to be tested.

How to Test the Changes:

  • This pull request can be tested by following the reproduction steps provided in the linked issue
  • This pull request requires further testing. Provide steps to test your changes. If it requires any specific setup e.g multiple players please specify it as well.

Known Issues and TODO List:

  • [ ]
  • [ ]

How to Test AzerothCore PRs

When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].

You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:

http://www.azerothcore.org/wiki/How-to-test-a-PR

REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).

For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.

Copilot AI review requested due to automatic review settings February 5, 2026 01:35
@github-actions github-actions bot added Script Refers to C++ Scripts for the Core file-cpp Used to trigger the matrix build labels Feb 5, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where Thaddius in Naxxramas would stop casting Chain Lightning and Polarity Shift while spamming Ball Lightning when players were out of melee range. The fix removes the UNIT_STATE_CASTING check that was blocking event execution and refactors the berserk mechanic to use the modern ScheduleEnrageTimer method.

Changes:

  • Removed UNIT_STATE_CASTING check to allow Chain Lightning and Polarity Shift events to fire while Ball Lightning is being cast
  • Refactored berserk timer to use ScheduleEnrageTimer instead of a manual event
  • Updated spell casting to use helper methods (DoCastVictim, DoCastAOE) for cleaner code

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Rorschach91
Copy link
Member

Rorschach91 commented Feb 5, 2026

Tested: https://youtu.be/jPIS6HrLWJQ

In addition, after you kill Stalagg and Feugen this error appears (but this isn't your PR's fault):

error

@xDevICCI
Copy link
Contributor

xDevICCI commented Feb 5, 2026

this pr could be test 2 character (?)

When handling EVENT_THADDIUS_POLARITY_SHIFT, check if the boss is currently casting and, if so, defer the event by 1s and disable ball lightning until the cast completes. Also schedule EVENT_ALLOW_BALL_LIGHTNING 3s after successfully casting SPELL_POLARITY_SHIFT. This prevents overlapping casts and ensures ball lightning is re-enabled at the correct time.
@Nyeriah
Copy link
Member Author

Nyeriah commented Feb 5, 2026

Please retest

@Rorschach91
Copy link
Member

Rorschach91 commented Feb 6, 2026

Please retest

Tested. Thaddius casts Ball Lightning and Polarity Shift (I didn’t see Chain Lightning being cast).
The "Attempted sending" error still remains.

@Nyeriah
Copy link
Member Author

Nyeriah commented Feb 6, 2026

The "Attempted sending" error still remains.

not related to this PR by any means but widespread error in the core

@Rorschach91 Rorschach91 changed the title fix(Scripts/Naxxramas): Thaddius casting Chain Lightning shouldn't pr… fix(Scripts/Naxxramas): Thaddius casting Ball Lightning shouldn't pr… Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

file-cpp Used to trigger the matrix build Ready to be Reviewed Script Refers to C++ Scripts for the Core Waiting to be Tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Raid-Naxx] Thaddius casts Ball Lightning only when his target is not in melee range.

3 participants