Core/AI: Clean up charm AI handling.
Port From (https://github.com/TrinityCore/TrinityCore/commit/e4e8c1c59c8b37216814526b4d2551f23934f465)
This commit is contained in:
@@ -1549,7 +1549,7 @@ namespace Scripts.Spells.Generic
|
||||
GetUnitOwner().GetAllMinionsByEntry(minionList, CreatureIds.EtherealSoulTrader);
|
||||
foreach (Creature minion in minionList)
|
||||
{
|
||||
if (minion.IsAIEnabled)
|
||||
if (minion.IsAIEnabled())
|
||||
{
|
||||
minion.GetAI().Talk(TextIds.SayStealEssence);
|
||||
minion.CastSpell(eventInfo.GetProcTarget(), SpellIds.StealEssenceVisual);
|
||||
|
||||
@@ -327,8 +327,8 @@ namespace Scripts.Spells.Quest
|
||||
if (!creatureTarget.IsPet() && creatureTarget.GetEntry() == _originalEntry)
|
||||
{
|
||||
creatureTarget.UpdateEntry(_newEntry);
|
||||
if (_shouldAttack && creatureTarget.IsAIEnabled)
|
||||
creatureTarget.GetAI().AttackStart(GetCaster());
|
||||
if (_shouldAttack)
|
||||
creatureTarget.EngageWithTarget(GetCaster());
|
||||
|
||||
if (_despawnTime != 0)
|
||||
creatureTarget.DespawnOrUnsummon(_despawnTime);
|
||||
|
||||
Reference in New Issue
Block a user