From cadbcbd447886e1f2361ec7de2a54c0067d2233c Mon Sep 17 00:00:00 2001 From: Nicolas Lebacq Date: Sat, 15 Nov 2025 09:27:33 +0000 Subject: [PATCH] fix: Resolved an issue where the open spell was being cast by bots on despawned game objects. (#1842) # Description This addresses the infamous "Possible hacking attempt" error when bots were furiously trying to interact with despawned game objects. The problem was that the game objects were not being as spawned when evaluating what the bot should do. It was only done when spells were being cast on entities. --- src/PlayerbotAI.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 44e601bf..23d073f5 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -14,6 +14,7 @@ #include "BudgetValues.h" #include "ChannelMgr.h" #include "CharacterPackets.h" +#include "ChatHelper.h" #include "Common.h" #include "CreatureAIImpl.h" #include "CreatureData.h" @@ -283,6 +284,15 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal) return; } + GameObject* goSpellTarget = currentSpell->m_targets.GetGOTarget(); + + if (goSpellTarget && !goSpellTarget->isSpawned()) + { + InterruptSpell(); + YieldThread(GetReactDelay()); + return; + } + bool isHeal = false; bool isSingleTarget = true;