fix(Scripts/HoR): clear IMMUNE_TO_PC before engaging Falric and Marwyn#25273
Open
Nyeriah wants to merge 2 commits intoazerothcore:masterfrom
Open
fix(Scripts/HoR): clear IMMUNE_TO_PC before engaging Falric and Marwyn#25273Nyeriah wants to merge 2 commits intoazerothcore:masterfrom
Nyeriah wants to merge 2 commits intoazerothcore:masterfrom
Conversation
After the threat system port (azerothcore#24715) and removal of auto-immunity clearing in AtEngage (azerothcore#25121), IMMUNE_TO_PC causes FlagsAllowFighting() to return false, setting all threat references OFFLINE. This makes UpdateVictim() return null so the bosses never process combat events. Closes azerothcore#25259 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Halls of Reflection boss engagement after the threat-system changes by ensuring UNIT_FLAG_IMMUNE_TO_PC is cleared before SetInCombatWithZone() creates threat references, allowing Falric and Marwyn to properly acquire a victim and start their AI.
Changes:
- Clear
IMMUNE_TO_PCright before delayedSetInCombatWithZone()for Falric. - Clear
IMMUNE_TO_PCright before delayedSetInCombatWithZone()for Marwyn.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp |
Clears PC-immunity before forcing zone combat so threat refs aren’t created OFFLINE. |
src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_marwyn.cpp |
Same fix for Marwyn’s delayed combat start path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes Proposed:
This PR proposes changes to:
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.
Issues Addressed:
Description:
Same root cause as #25263 — after the TrinityCore heap-based threat system port (#24715) and the removal of auto-immunity-clearing in
Creature::AtEngage(#25121), creatures withIMMUNE_TO_PC(0x100) in theircreature_template.unit_flagsthat don't explicitly clear it before entering combat are broken.Both Falric (38112) and Marwyn (38113) have
unit_flags = 832which includesIMMUNE_TO_PC. Their scripts callSetImmuneToAll(false)insideJustEngagedWith(), but by that pointThreatReference::FlagsAllowFighting()has already returnedfalsefor all threat references created duringSetInCombatWithZone(), marking them asOFFLINE. This causesUpdateVictim()to returnnullptr, so the bosses appear to never engage.Fix: Add
SetImmuneToPC(false)beforeSetInCombatWithZone()in the delayed combat start lambda for both Falric and Marwyn, ensuring threat references are created with proper flags.SOURCE:
The changes have been validated through:
Source code analysis of
ThreatManager.cpp(FlagsAllowFighting,ShouldBeOffline) confirming the interaction betweenIMMUNE_TO_PCand the new threat reference system. Same pattern as #25263.Tests Performed:
This PR has been:
How to Test the Changes:
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.