fix(DB/Gossip): add restore 'Keys to the Focusing Iris' option#25228
fix(DB/Gossip): add restore 'Keys to the Focusing Iris' option#25228sogladev wants to merge 4 commits intoazerothcore:masterfrom
Conversation
Co-authored-by: avarishd <[email protected]>
There was a problem hiding this comment.
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_lifebinderto cast restore-key spells. - Add DB gossip menu options + conditions to show options only when appropriate.
- Update
spell_dbcrows 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.
| (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); |
There was a problem hiding this comment.
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).
| (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); |
There was a problem hiding this comment.
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.
| GOSSIP_MENU_ALEXSTRAZA = 10192, | ||
| }; | ||
|
|
||
| struct npc_alexstraza_the_lifebinder : public ScriptedAI |
There was a problem hiding this comment.
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.
| 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; |
There was a problem hiding this comment.
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.
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:
SOURCE:
The changes have been validated through:
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.