fix(WG): credit Victory in Wintergrasp for crossfaction players - #181
Merged
Nyeriah merged 1 commit intoJul 19, 2026
Merged
Conversation
Core's BattlefieldWG::OnBattleEnd credits the winners with a single quest id derived from the defending (winning) team: 13181 for Alliance, 13183 for Horde. A crossfaction player fighting as the opposite side still holds their own faction's copy of the quest, so that call does nothing for them and the turn-in stays unavailable. Grant the other faction's victory quest to everyone in the winning war set from OnBattlefieldWarEnd, which runs before OnBattleEnd while PlayersInWar is still populated. AreaExploredOrEventHappens is a no-op on a quest the player does not hold, so native players are unaffected and there is no double credit. Same approach as the PvP-kill credit fix in OnBattlefieldPlayerKill. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughWintergrasp war-end processing now triggers the appropriate victory quest event for winners across both participant sets and clears fake players during cleanup. ChangesWintergrasp war-end handling
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Problem
Core's
BattlefieldWG::OnBattleEndcredits the winning side with a single quest id derived from the defending (winning) team:player->AreaExploredOrEventHappens(GetDefenderTeam() ? 13183 : 13181);13181is the Alliance "Victory in Wintergrasp" (turned in to Tactical Officer Ahbramis),13183the Horde one (Tactical Officer Kilrath). A crossfaction player fighting as the opposite side still holds their own faction's copy, so that call does nothing for them and the turn-in never becomes available.Fix
Grant the other faction's victory quest to everyone in the winning war set from
OnBattlefieldWarEnd, which runs beforeOnBattleEndwhilePlayersInWaris still populated andGetDefenderTeam()already reflects the winner.AreaExploredOrEventHappensis a no-op on a quest the player does not hold, so native players are unaffected and there is no double credit. This mirrors the existing PvP-kill credit handling inOnBattlefieldPlayerKill.Only runs when both
CFBG.Enableand the WG crossfaction system are on.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes