From 063eabc16e48f2288d1a1a3fa37dec22c0e033e3 Mon Sep 17 00:00:00 2001 From: kadeshar Date: Sat, 2 May 2026 21:19:51 +0200 Subject: [PATCH] Spam guild fix (#2341) ## Pull Request Description Removed messages in failed attempts of buying tabard. Related with: #1885 ## How to Test the Changes Invite bot with guild strategy. Spam should not appear. ## Impact Assessment - Does this change increase per-bot/per-tick processing or risk scaling poorly with thousands of bots? - - [x] No, not at all - - [ ] Minimal impact (**explain below**) - - [ ] Moderate impact (**explain below**) - Does this change modify default bot behavior? - - [x] No - - [ ] Yes (**explain why**) - Does this change add new decision branches or increase maintenance complexity? - - [x] No - - [ ] Yes (**explain below**) ## AI Assistance Was AI assistance used while working on this change? - - [x] No - - [ ] Yes (**explain below**) ## Final Checklist - - [x] Stability is not compromised. - - [x] Performance impact is understood, tested, and acceptable. - - [x] Added logic complexity is justified and explained. - - [x] Any new bot dialogue lines are translated. - - [x] Documentation updated if needed (Conf comments, WiKi commands). ## Notes for Reviewers --- src/Ai/Base/Actions/BuyAction.cpp | 8 +------- src/Ai/Base/Actions/GuildCreateActions.cpp | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Ai/Base/Actions/BuyAction.cpp b/src/Ai/Base/Actions/BuyAction.cpp index f0729f251..e3d454dd9 100644 --- a/src/Ai/Base/Actions/BuyAction.cpp +++ b/src/Ai/Base/Actions/BuyAction.cpp @@ -213,13 +213,7 @@ bool BuyAction::Execute(Event event) } } - if (!vendored) - { - botAI->TellError("There are no vendors nearby"); - return false; - } - - return true; + return vendored; } bool BuyAction::BuyItem(VendorItemData const* tItems, ObjectGuid vendorguid, ItemTemplate const* proto) diff --git a/src/Ai/Base/Actions/GuildCreateActions.cpp b/src/Ai/Base/Actions/GuildCreateActions.cpp index c536475f1..59696ecea 100644 --- a/src/Ai/Base/Actions/GuildCreateActions.cpp +++ b/src/Ai/Base/Actions/GuildCreateActions.cpp @@ -296,7 +296,7 @@ bool PetitionTurnInAction::isUseful() bool BuyTabardAction::Execute(Event /*event*/) { - bool canBuy = botAI->DoSpecificAction("buy", Event("buy tabard", "Hitem:5976:")); + bool canBuy = botAI->DoSpecificAction("buy", Event("buy tabard", "Hitem:5976:"), true); if (canBuy && AI_VALUE2(uint32, "item count", chat->FormatQItem(5976))) return true;