Skip to content

fix(AuctionHouse): Add missing buyer name parameter in LOG_INFO#25484

Open
mpfans wants to merge 24 commits intoazerothcore:masterfrom
mpfans:master
Open

fix(AuctionHouse): Add missing buyer name parameter in LOG_INFO#25484
mpfans wants to merge 24 commits intoazerothcore:masterfrom
mpfans:master

Conversation

@mpfans
Copy link
Copy Markdown
Contributor

@mpfans mpfans commented Apr 16, 2026

Changes Proposed:

This PR proposes changes to:

  • Core (units, players, creatures, game systems).
  • Scripts (bosses, spell scripts, creature scripts).
  • Database (SAI, creatures, etc).

AI-assisted Pull Requests

Important

While the use of AI tools when preparing pull requests is not prohibited, contributors must clearly disclose when such tools have been used and specify the model involved.

Contributors are also expected to fully understand the changes they are submitting and must be able to explain and justify those changes when requested by maintainers.

  • AI tools (e.g. ChatGPT, Claude, or similar) were used entirely or partially in preparing this pull request. Please specify which tools were used, if any.

Tools used: Claude (via OpenClaw AI assistant) - for bug analysis, root cause identification, and code fix implementation.

Issues Addressed:

Closes

Bug: AuctionHouseMgr::SendAuctionSuccessfulMail has two issues:

  1. LOG_INFO format mismatch: The format string has placeholders that do not match the provided arguments, causing runtime warnings in server logs:
[ERROR] Wrong format occurred (argument not found) for LOG_INFO "entities.player.auctionhouse" - AuctionHouse: Auction #{} sold: Seller {} (GUID: {}), Buyer: {} (GUID: {}), Item (Entry: {}) x{}, Sale Price: {} copper, Profit: {} copper (cut: {} copper)
  1. Missing AccountID tracking: The log only records player GUID, not the account ID. When CharDelete.Method = 0 (immediate deletion, no keep days), both buyer and seller characters can be permanently deleted from the database. Once deleted, the GUID becomes meaningless and there is no way to trace which account was involved in the transaction. Recording the AccountID at the time of sale ensures server operators can always trace auction transactions back to the owning account, even after character deletion.

Fix:

  • Add sellerCache lookup for the seller's account info (name + AccountID)
  • Add bidderCache AccountID for the buyer
  • Update log format to include AccountID for both parties: Seller {} (AccountID: {}, GUID: {}) / Buyer {} (AccountID: {}, GUID: {})

SOURCE:

The changes have been validated through:

  • Live research (checked on live servers, e.g Classic WotLK, Retail, etc)
  • Sniffs (remember to share them with the open source community!)
  • Video evidence, knowledge databases or other public sources (e.g forums, Wowhead, etc)
  • The changes promoted by this pull request come partially or entirely from another project (cherry-pick). Cherry-picks must be committed using the proper --author tag in order to be accepted, thus crediting the original authors, unless otherwise unable to be found

Tests Performed:

This PR has been:

  • Tested in-game by the author.
  • Tested in-game by other community members/someone else other than the author/has been live on production servers.
  • This pull request requires further testing and may have edge cases to be tested.

How to Test the Changes:

  1. Start the worldserver with this change applied
  2. List an item on the Auction House
  3. Wait for another player to purchase the item
  4. Check the server log - there should be no "Wrong format occurred" warning
  5. Verify the log line shows both seller and buyer with AccountID correctly:
AuctionHouse: Auction #1 sold: Seller SellerName (AccountID: 1, GUID: 1), Buyer: BuyerName (AccountID: 2, GUID: 2), Item (Entry: 25) x1, Sale Price: 10000 copper, Profit: 8500 copper (cut: 1500 copper)

Known Issues and TODO List:

  • [ ]
  • [ ]

How to Test AzerothCore PRs

When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].

You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:

http://www.azerothcore.org/wiki/How-to-test-a-PR

REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).

mpfans and others added 22 commits August 31, 2021 19:15
…tch format string

AUCTION_SUCCESSFUL log format string has 10 placeholders but only 9
parameters were provided, causing 'Wrong format occurred (argument not
found)' warnings. The buyer name was missing - it was replaced with
auction->item_template by mistake.

Fix: Insert gpd->Name (buyer name from CharacterCache) at the correct
position in the LOG_INFO parameter list.
@github-actions github-actions Bot added CORE Related to the core file-cpp Used to trigger the matrix build labels Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE Related to the core file-cpp Used to trigger the matrix build Ready to be Reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants