mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
feat(Core/Scripting): Implement SetAutoAttackAllowed() to disable aut… (#20805)
* feat(Core/Scripting): Implement SetAutoAttackAllowed() to disable autoattacks * Update ScriptedCreature.cpp
This commit is contained in:
@@ -442,10 +442,15 @@ struct ScriptedAI : public CreatureAI
|
||||
void SetInvincibility(bool apply) { _invincible = apply; };
|
||||
[[nodiscard]] bool IsInvincible() const { return _invincible; };
|
||||
|
||||
// Disables creature auto attacks.
|
||||
void SetAutoAttackAllowed(bool allow) { _canAutoAttack = allow; };
|
||||
[[nodiscard]] bool IsAutoAttackAllowed() const { return _canAutoAttack; };
|
||||
|
||||
private:
|
||||
Difficulty _difficulty;
|
||||
bool _isHeroic;
|
||||
bool _invincible;
|
||||
bool _canAutoAttack;
|
||||
std::unordered_set<uint32> _uniqueTimedEvents;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user