CreatureAI: Adjust AI behavior when a charm ends. OnCharmed will be invoked on the creature's base (non-charmed) AI, allowing the AI to react to the creature no longer being charmed.
This commit is contained in:
1 parent
73fd689c1e
commit
5671f50933
7 files changed
+27
-6
No files matched your search
@@ -12166,6 +12166,9 @@ void Unit::UpdateCharmAI()
|
||||
delete i_AI;
|
||||
i_AI = i_disabledAI;
|
||||
i_disabledAI = nullptr;
|
||||
|
||||
if (GetTypeId() == TYPEID_UNIT)
|
||||
ToCreature()->AI()->OnCharmed(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user