fix(PlayerMethods): SendListInventory not respecting vendorId override#384
Merged
iThorgrim merged 2 commits intoMay 22, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes Eluna’s PlayerMethods::SendListInventory behavior when a vendorId override is provided for a creature that is not flagged as a vendor, preventing the vendor window from silently failing due to the core interaction checks.
Changes:
- Documented the optional
vendorIdparameter forSendListInventory. - When
vendorIdis provided and the sender is aCreaturemissingUNIT_NPC_FLAG_VENDOR, temporarily sets the vendor NPC flag before callingWorldSession::SendListInventory, then removes it immediately after.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
iThorgrim
approved these changes
May 22, 2026
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.
Fixes #383
When calling
player:SendListInventory(creature, vendorId)with a creature that doesn't haveUNIT_NPC_FLAG_VENDORset, the core'sGetNPCIfCanInteractWithcheck would return null, causing the vendor window to silently fail even though a valid vendorId was provided.The fix will temporarily add the flag to the creature if it is missing and a vendorId override is specified. The flag is then removed immediately after, leaving the creature's state unchanged.