Last active
April 9, 2024 08:21
-
-
Save vahzxz/5cf24c07356494810eb9fb9418552de0 to your computer and use it in GitHub Desktop.
Fixed auto attacks in the Passive rack caused by SmartAI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp | |
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp | |
@@ -302,7 +302,17 @@ void SmartAI::UpdateAI(uint32 diff) | |
UpdateDespawn(diff); | |
if (!IsAIControlled()) | |
+ { | |
+ if (CharmInfo* charmInfo = me->GetCharmInfo()) | |
+ { | |
+ if (charmInfo->IsCommandAttack() && _canAutoAttack) | |
+ { | |
+ DoMeleeAttackIfReady(); | |
+ } | |
+ } | |
+ | |
return; | |
+ } | |
if (!hasVictim) | |
return; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment