mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user