Skip to content

fix(Core/Scripts): Move EasternKingdoms gossip to database#25208

Open
Nyeriah wants to merge 1 commit intoazerothcore:masterfrom
Nyeriah:gossip_ek
Open

fix(Core/Scripts): Move EasternKingdoms gossip to database#25208
Nyeriah wants to merge 1 commit intoazerothcore:masterfrom
Nyeriah:gossip_ek

Conversation

@Nyeriah
Copy link
Copy Markdown
Member

@Nyeriah Nyeriah commented Mar 25, 2026

Changes Proposed:

This PR proposes changes to:

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

Move gossip handling from C++ scripts to database-driven gossip (conditions + SmartAI) for 3 NPCs in EasternKingdoms:

  • Augustus the Touched (12384): Vendor option gated by quest 6164 reward. Two gossip texts (4979/4980) with quest conditions.
  • Parqual Fintallas (4488): Test of Lore quiz with 4 answer options. Wrong answers cast Mark of Shame, correct answer (Ner'zhul) credits quest 6628. Uses SAI for gossip select actions.
  • Lokhtos Darkbargainer (12944): Rep-gated vendor (Thorium Brotherhood >= Friendly), conditional contract creation spell. Rep-based gossip text switching (3673/3677). Uses SAI for contract spell cast.

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.

  • AI tools (e.g. ChatGPT, Claude, or similar) were used entirely or partially in preparing this pull request. Claude Opus 4.6 was used.

SOURCE:

The changes have been validated through:

  • 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

Augustus migration based on TC work by dr-j (commit cefed89c38bc).
Parqual migration based on TC work by offl (TC issue #24993, commit 7908b00311).
Lokhtos migration is original work (TC still uses C++ for this NPC).

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.
  1. Test Augustus the Touched in Eastern Plaguelands: verify vendor option only appears after completing quest 6164, and gossip text changes from 4979 to 4980.
  2. Test Parqual Fintallas in Undercity: pick up quest 6628 (Test of Lore), verify 4 quiz options appear, wrong answers cast Mark of Shame (spell 6767), correct answer (Ner'zhul) credits quest. Options should not appear if quest not taken or if Shame aura is active.
  3. Test Lokhtos Darkbargainer in Blackrock Depths: verify vendor option only appears at Friendly+ rep with Thorium Brotherhood. Verify contract option appears only when quest 7604 not rewarded, player has Sulfuron Ingot but not the contract. Verify contract creation spell fires on select.

Known Issues and TODO List:

  • Gloom'rel (9037) gossip migration skipped - requires multi-step gossip with instance script dependency for Spectral Chalice respawn.

🤖 Generated with Claude Code

Move gossip handling from C++ to database-driven gossip with
conditions and SmartAI for Augustus the Touched, Parqual Fintallas,
and Lokhtos Darkbargainer.

Closes #0

Co-Authored-By: offl <offl@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 25, 2026 00:17
Copy link
Copy Markdown
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

Migrates gossip handling for three Eastern Kingdoms NPCs from C++ scripts to database-driven gossip using conditions and SmartAI.

Changes:

  • Removed C++ gossip scripts/registrations for Augustus the Touched, Parqual Fintallas, and Lokhtos Darkbargainer.
  • Added pending world DB update to drive gossip text switching, option visibility, and gossip-select actions via Conditions + SmartAI.
  • Set AIName='SmartAI' for Parqual and Lokhtos to support gossip-select action scripting.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/server/scripts/EasternKingdoms/zone_undercity.cpp Removes Parqual Fintallas C++ gossip script and registration.
src/server/scripts/EasternKingdoms/zone_eastern_plaguelands.cpp Removes Augustus the Touched C++ gossip script and registration.
src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp Removes Lokhtos Darkbargainer C++ AI/gossip script and registration.
data/sql/updates/pending_db_world/rev_1774395836122258800.sql Adds DB-driven gossip/SAI logic for the three NPCs.

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

Comment on lines +94 to +99
-- Condition: show text 3677 only if rep >= Friendly with Thorium Brotherhood (faction 59)
-- Text 3673 has no condition and serves as the default (unfriendly) text
-- Friendly(4)=16, Honored(5)=32, Revered(6)=64, Exalted(7)=128 => mask 240
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 14 AND `SourceGroup` = 4781;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(14, 4781, 3677, 0, 0, 5, 0, 59, 240, 0, 0, 0, 0, '', 'Lokhtos Darkbargainer - Show text 3677 if Thorium Brotherhood rep >= Friendly');
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

With 3673 left unconditional, Friendly+ players will satisfy both texts (3673 and 3677). For gossip_menu, multiple valid texts for the same MenuID can result in non-deterministic/random selection, so Friendly+ players may still see the unfriendly text. Add a complementary condition to 3673 (rep < Friendly) or otherwise ensure only one text is valid at a time (e.g., by conditioning both texts or using mutually exclusive ElseGroups).

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +28
-- Condition: show vendor option (MenuID 4085, OptionID 0) only if quest 6164 rewarded
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 4085 AND `SourceEntry` = 0;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(15, 4085, 0, 0, 0, 8, 0, 6164, 0, 0, 0, 0, 0, '', 'Augustus the Touched - Show vendor option only if quest 6164 rewarded');
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

The C++ script previously added the vendor gossip item programmatically, but this DB update only adds a condition for (MenuID=4085, OptionID=0) and does not add/ensure the corresponding gossip_menu_option row exists for that option. If the option row isn’t present in DB, the vendor entry will never appear even when the condition passes. Make the update self-contained by inserting/updating the required gossip_menu_option entry for MenuID 4085 (OptionID 0) with the vendor option type, then keep this condition to gate it by quest reward.

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +20
-- Conditions on gossip_menu text: 4979 before quest, 4980 after quest
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 14 AND `SourceGroup` = 4085;
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

This delete removes all SourceTypeOrReferenceId=14 conditions for MenuID=4085, not just those related to texts 4979/4980. Narrowing the DELETE to SourceEntry IN (4979, 4980) makes the update safer and reduces the chance of accidentally removing unrelated conditions on the same menu.

Copilot uses AI. Check for mistakes.
Comment on lines +96 to +97
-- Friendly(4)=16, Honored(5)=32, Revered(6)=64, Exalted(7)=128 => mask 240
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 14 AND `SourceGroup` = 4781;
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

Similar to the Augustus section, this DELETE removes all gossip-menu-text conditions for MenuID=4781. Consider narrowing it to only the entries you manage here (e.g., SourceEntry IN (3673, 3677, 5834) if applicable) to avoid clobbering other conditions that may legitimately exist for the same menu.

Copilot uses AI. Check for mistakes.
@github-actions github-actions bot added DB related to the SQL database Script Refers to C++ Scripts for the Core file-cpp Used to trigger the matrix build labels Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DB related to the SQL database file-cpp Used to trigger the matrix build Script Refers to C++ Scripts for the Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants