Skip to content

Improve auto collection reliability and add vendor-sell fallback#226

Open
Aldori15 wants to merge 1 commit into
azerothcore:masterfrom
Aldori15:auto-collection-fixes
Open

Improve auto collection reliability and add vendor-sell fallback#226
Aldori15 wants to merge 1 commit into
azerothcore:masterfrom
Aldori15:auto-collection-fixes

Conversation

@Aldori15
Copy link
Copy Markdown
Contributor

@Aldori15 Aldori15 commented Mar 7, 2026

Summary

This PR improves appearance auto collection reliability across normal gameplay.

Includes

  • More consistent auto collection when obtaining items outside of quest completion (buying from vendor, looting a creature, etc.).
  • A vendor-sell fallback that learns an appearance if it was not learned earlier.

Behavior

  • Tradeable items (BIND_WHEN_EQUIPPED / BIND_WHEN_USE) are not learned immediately on pickup.
  • Those tradeable items can still be learned by equipping or vendor-selling.
  • BOP/soulbound and NO_BIND items are learned when they enter inventory.

Refactor appearance collection flow to rely on AddToDatabase item gating.

- Centralize binding/trade/refund checks in AddToDatabase().
- Keep BOE/BIND_WHEN_USE items from being learned on bag acquire.
- Allow NO_BIND items to be learned on acquire.
- Update loot/create/store hooks to call AddToDatabase consistently.
- Add vendor-sell safety net via OnPlayerCanSellItem (fromVendorSell=true).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant