fix(WG): Grant quest credit for non-lieutenant WG kills in CFBG#144
Merged
Nyeriah merged 1 commit intoMay 17, 2026
Merged
Conversation
In CFBG Wintergrasp, quest credit for "No Mercy for the Merciless" / "Slay Them All" was silently lost for kills where the victim had not yet earned SPELL_LIEUTENANT (requiring 10 WG kills in the current session). Uses the new OnBattlefieldPlayerKill hook to grant KilledMonsterCredit to all nearby war-teammates of the killer for every player kill, bypassing the lieutenant gate. Double-credit on lieutenant kills is avoided by returning early when the victim already has SPELL_LIEUTENANT (the core's existing loop handles those). Credit NPC selection mirrors the core logic and correctly uses the killer's GetTeamId(), which reflects the CFBG-assigned fake team. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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:
In CFBG Wintergrasp, "No Mercy for the Merciless" / "Slay Them All" quest credit was silently lost whenever the victim had not yet earned
SPELL_LIEUTENANT(which requires 10 WG kills in the current session). In short or low-population sessions nobody ever reaches that rank, so the quests effectively never progress.This PR proposes changes to:
Implementation
Uses the new
OnBattlefieldPlayerKillhook (added in the companion core PR) to grantKilledMonsterCreditto all nearby war-teammates of the killer for every player kill, bypassing the lieutenant gate. Double-credit on lieutenant kills is avoided by returning early when the victim already hasSPELL_LIEUTENANT— the core's existing loop handles those.Credit NPC selection mirrors the core logic and uses
killer->GetTeamId(), which correctly reflects the CFBG-assigned fake team, so the right NPC (31086 for Alliance kills, 39019 for Horde kills) is always chosen.Depends on: azerothcore/azerothcore-wotlk#25871
AI-assisted Pull Requests
Issues Addressed:
SOURCE:
The changes have been validated through:
Tests Performed:
This PR has been:
How to Test the Changes:
CFBG.Battlefield.Enable = 1in the CFBG config.SPELL_LIEUTENANTand confirm the counter advances exactly once (no double-credit).Known Issues and TODO List: