fix(Quest): make Doctor Sabnok immune to player damage#25682
Open
KaineOfficial wants to merge 2 commits intoazerothcore:masterfrom
Open
fix(Quest): make Doctor Sabnok immune to player damage#25682KaineOfficial wants to merge 2 commits intoazerothcore:masterfrom
KaineOfficial wants to merge 2 commits intoazerothcore:masterfrom
Conversation
Quest 13152 'A visit to the doctor', the player could attack and cast spells on Doctor Sabnok (NPC 30992) during the cinematic. The OnSpawn SAI was only setting UNIT_FLAG_NOT_SELECTABLE (256), which hides the target frame but does not prevent damage. Adding UNIT_FLAG_IMMUNE_TO_PC (512) so only Patches can damage him, matching the flag combination already used on Patches itself (768). Closes azerothcore#25668
Rorschach91
reviewed
May 3, 2026
| @@ -0,0 +1,11 @@ | |||
| -- | |||
| -- Fix: Doctor Sabnok (NPC 30992) attackable by player during quest 13152 'A visit to the doctor'. | |||
| -- The OnSpawn SAI was setting only UNIT_FLAG_NOT_SELECTABLE (256), which hides the target frame | |||
Member
There was a problem hiding this comment.
Wrong. This is UNIT_FLAG_IMMUNE_TO_PC, not UNIT_FLAG_NOT_SELECTABLE.
Rorschach91
reviewed
May 3, 2026
| -- | ||
| -- Fix: Doctor Sabnok (NPC 30992) attackable by player during quest 13152 'A visit to the doctor'. | ||
| -- The OnSpawn SAI was setting only UNIT_FLAG_NOT_SELECTABLE (256), which hides the target frame | ||
| -- but does not block damage. Adding UNIT_FLAG_IMMUNE_TO_PC (512) so only Patches can damage him. |
Member
There was a problem hiding this comment.
Flag 512 is UNIT_FLAG_IMMUNE_TO_NPC.
Rorschach91
reviewed
May 3, 2026
| -- Closes issue #25668. | ||
| -- | ||
|
|
||
| UPDATE `smart_scripts` |
Member
There was a problem hiding this comment.
This solution is incorrect. Sabnok spawns with Immune to Player active (row 6 of its SmartAI). The problem is in the last row of the action list 3099200 (remove unit flag immune to pc).
Removing that row, it will fix the issue.
Member
|
If you are using an AI, please do not remove the section when it explicitly asks you if you are using it. |
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
Doctor Sabnok (NPC 30992) was attackable by the player during quest 13152 'A visit to the doctor'. The player could click on him and cast spells while the cinematic was playing, breaking the intended scripted fight where Patches kills him.
The OnSpawn SAI on entry 30992 was only setting
UNIT_FLAG_NOT_SELECTABLE(256). That flag hides the target frame on the UI but it does not block AoE damage or already targeted abilities, so a player could still hit him.Patches itself (NPC 30993) already uses the value 768 (
NOT_SELECTABLE | IMMUNE_TO_PC) for the same purpose, so this PR aligns the Doctor with the same flag combination.Issues Addressed
Closes #25668
How to Test the Changes
.quest add 13152.go c i 30993then click the apparatus to start the eventBefore the fix, the cursor would highlight him and damage spells would land. After the fix he stays unselectable and immune to player damage, Patches kills him as intended.
Test Plan