aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI
diff options
context:
space:
mode:
authorGiacomo Pozzoni <giacomopoz@gmail.com>2020-08-29 13:02:42 +0200
committerGitHub <noreply@github.com>2020-08-29 13:02:42 +0200
commitcfc8f7b442a9dba07b198fcebe2c02ab89cf0a8b (patch)
tree5be40db3a3a7292dab955335aec2ec24760ed6da /src/server/game/AI
parentf8a5783327f5ef5606453bcb9c906ba1297538ff (diff)
Core/Misc: Fix issues reported by static analysis (#25351)
* Core/Misc: Fix issues reported by static analysis * Core/Vmaps: Code cleanup after e77716188861d4aa83b227a90e04a66b63baeb1f
Diffstat (limited to 'src/server/game/AI')
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp
index 0036e2e48be..1a873e8a34d 100644
--- a/src/server/game/AI/CoreAI/UnitAI.cpp
+++ b/src/server/game/AI/CoreAI/UnitAI.cpp
@@ -207,9 +207,7 @@ void UnitAI::FillAISpellInfo()
if (AIInfo->cooldown < spellInfo->RecoveryTime)
AIInfo->cooldown = spellInfo->RecoveryTime;
- if (!spellInfo->GetMaxRange(false))
- UPDATE_TARGET(AITARGET_SELF)
- else
+ if (spellInfo->GetMaxRange(false))
{
for (SpellEffectInfo const& Effect : spellInfo->Effects)
{