UnitAI updates
Port From (https://github.com/TrinityCore/TrinityCore/commit/ed884354944009979b828d21ee3498e830050af8)
This commit is contained in:
@@ -79,14 +79,17 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
Cypher.Assert(newAI != null);
|
||||
i_AI = newAI;
|
||||
SetAI(newAI);
|
||||
newAI.OnCharmed(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
RestoreDisabledAI();
|
||||
if (i_AI != null)
|
||||
i_AI.OnCharmed(true);
|
||||
// Hack: this is required because we want to call OnCharmed(true) on the restored AI
|
||||
RefreshAI();
|
||||
UnitAI ai = GetAI();
|
||||
if (ai != null)
|
||||
ai.OnCharmed(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user