Skip to content

fix(DB/Gossip): add restore 'Keys to the Focusing Iris' option#25228

Open
sogladev wants to merge 4 commits intoazerothcore:masterfrom
sogladev:fix-db-restore-heroic-key
Open

fix(DB/Gossip): add restore 'Keys to the Focusing Iris' option#25228
sogladev wants to merge 4 commits intoazerothcore:masterfrom
sogladev:fix-db-restore-heroic-key

Conversation

@sogladev
Copy link
Copy Markdown
Member

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 March 25, 2026 16:00
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

Adds a gossip-based way to restore “Key to the Focusing Iris” / “Heroic Key to the Focusing Iris” from Alexstrasza during Children’s Week, addressing the linked issue.

Changes:

  • Add gossip selection handling in npc_alexstraza_the_lifebinder to cast restore-key spells.
  • Add DB gossip menu options + conditions to show options only when appropriate.
  • Update spell_dbc rows so the restore spells create the relevant key items.

Reviewed changes

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

File Description
src/server/scripts/Events/childrens_week.cpp Adds gossip-select behavior and constants for Alexstrasza key restoration.
data/sql/updates/pending_db_world/rev_1774448216705690901.sql Adds gossip options/conditions and configures the restore spells to create key items.

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

Comment on lines +10 to +16
(15, 10192, 0, 0, 0, 8, 0, 13372, 0, 0, 0, 0, 0, '', 'must have completed Quest \'The Key to the Focusing Iris\''),
(15, 10192, 0, 0, 0, 2, 0, 44582, 1, 1, 1, 0, 0, '', 'must not have item \'Key to the Focusing Iris\''),
(15, 10192, 1, 0, 0, 8, 0, 13375, 0, 0, 0, 0, 0, '', 'must have completed Quest \'The Heroic Key to the Focusing Iris\''),
(15, 10192, 1, 0, 0, 2, 0, 44581, 1, 1, 1, 0, 0, '', 'must not have item \'Heroic Key to the Focusing Iris\'');

UPDATE `spell_dbc` SET `Targets` = 1, `Effect_1` = 24, `EffectBasePoints_1` = 1, `EffectItemType_1` = 44582 WHERE (`ID` = 60989);
UPDATE `spell_dbc` SET `Targets` = 1, `Effect_1` = 24, `EffectBasePoints_1` = 1, `EffectItemType_1` = 44581 WHERE (`ID` = 60992);
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 SQL gates and creates items 44582/44581, but the script-side constants introduced for the key items are 44569/44577. At least one side is likely using the wrong item entries, which would make the gossip either never appear (wrong condition item) or create the wrong item (wrong EffectItemType). Please verify the correct key item IDs and make the conditions + spell_dbc.EffectItemType_1 match those IDs (and align/adjust the C++ constants accordingly).

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +6
(10192, 0, 0, 'Oh great Queen of the Dragons, I have somehow misplaced my Key to the Focusing Iris. Can you find it for me?', 32832, 1, 1, 0, 0, 0, 0, '', 0, 0),
(10192, 1, 0, 'Oh great Queen of the Dragons, I have somehow misplaced my Heroic Key to the Focusing Iris. Can you find it for me?', 32836, 1, 1, 0, 0, 0, 0, '', 0, 0);
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.

Both inserted rows set VerifiedBuild to 0. If this repo’s convention is to set VerifiedBuild to the client build used for verification, please populate it accordingly to avoid losing provenance and to keep consistency with other world DB updates.

Copilot uses AI. Check for mistakes.
GOSSIP_MENU_ALEXSTRAZA = 10192,
};

struct npc_alexstraza_the_lifebinder : public ScriptedAI
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 newly introduced enum name uses Alexstrasza while the NPC struct uses alexstraza (missing the second 's'). Since this enum is specific to this NPC/gossip, consider renaming the enum to match the established spelling used in this file for the NPC (or vice versa if the NPC name is the part that should be corrected) to avoid confusion and inconsistent identifiers.

Copilot uses AI. Check for mistakes.
Comment on lines +650 to +659
switch (action)
{
case 0:
CloseGossipMenuFor(player);
player->CastSpell(player, SPELL_KEY_TO_FOCUSING_IRIS, false);
break;
case 1:
CloseGossipMenuFor(player);
player->CastSpell(player, SPELL_HEROIC_KEY_TO_FOCUSING_IRIS, false);
break;
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.

Using raw case 0 / case 1 makes it harder to track which gossip option each case corresponds to. Consider introducing named constants (e.g., GOSSIP_OPTION_RESTORE_NORMAL, GOSSIP_OPTION_RESTORE_HEROIC) and switching on those, so future changes to option ordering don’t require hunting down magic numbers.

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 Ready to be Reviewed Script Refers to C++ Scripts for the Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alexstrasza - missing Keys to the Focusing Iris (Normal and Heroic) gossip option.

3 participants