fix: resolve action ID collisions, spell retention on login, and hook registration - #77
Merged
Merged
Conversation
…, configuration parsing, and gossip menu management
Member
|
thanks for the PR |
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.
closes #75
Overview
This PR addresses several critical issues in the
mod-npc-beastmastermodule that caused creature spawning failures and the loss of hunter abilities for non-hunter classes upon re-logging.Changes Made
1. Resolved Action ID Collision for Spawning
PET_PAGE_MAX = 901) to generate Action IDs for spawning pets. This caused a collision with the "Tracked Pets" menu system (reserved range 1000–4999), causing spawn requests to fail or be misinterpreted as pet management commands.PET_CREATE_OFFSET = 100000. This ensures that dynamically generated Action IDs for pet creation remain well outside the range of static menu actions.2. Fixed Spell Retention & Database Integrity
[1062] Duplicate entrySQL errors in thecharacter_spelltable because old entries were not being properly cleared.ac-worldserverlogs.3. Corrected Script Hook Registration
OnLogin(Player* player). Because it lacked theoverridekeyword, it failed silently and was never actually executed by the AzerothCore engine.OnPlayerLoginsignature and properly registered thePLAYERHOOK_ON_LOGINhook. Added theoverridekeyword to prevent future regressions.Testing Performed
[1062]Duplicate entry SQL errors no longer appear in the server console during logout.Note to Maintainer
Included in this PR is a detailed chat transcript (
Beastmaster Mod Fix - Chat.md) documenting the AI-assisted debugging process used to identify the logic collisions and the modernization of thePlayerScripthooks.Beastmaster Mod Fix - Chat.md