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:
treeston authored and Aokromes committed 2016-05-12 09:16:31 +02:00
1 parent 73fd689c1e
commit 5671f50933
7 files changed
+27 -6

No files matched your search

+3
View File
@@ -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