aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2016-05-05 11:56:25 +0200
committerTreeston <treeston.mmoc@gmail.com>2016-05-05 11:56:25 +0200
commit35a66a33fc089b2fbafec3528ecc39d03b896f2c (patch)
treec96ef91c9dff75a47f6ef2395473bf34f0ec7ebc /src/server/game/AI/SmartScripts
parent769b7ff7fd2cb86f5b9978d15ea20c398273ec48 (diff)
parent26b084a90ff3e4f0601e72c283bd3296d4640585 (diff)
Merge pull request #16020 from Treeston/3.3.5-CharmAiFix
CreatureAI: Adjust AI behavior when a charm ends
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 8e9bd7cdff7..2bf97086957 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -653,8 +653,8 @@ void SmartAI::OnCharmed(bool apply)
{
GetScript()->ProcessEventsFor(SMART_EVENT_CHARMED, NULL, 0, 0, apply);
- if (!apply && !me->IsInEvadeMode() && me->GetCharmerGUID())
- if (Unit* charmer = ObjectAccessor::GetUnit(*me, me->GetCharmerGUID()))
+ if (!apply && !me->IsInEvadeMode())
+ if (Unit* charmer = me->GetCharmer())
AttackStart(charmer);
}