Core/SmartAI: SmartAI creatures no longer process health-based hooks after death.
Port From (https://github.com/TrinityCore/TrinityCore/commit/3db58c4d96c446b736b84d4954f8fd9c9e309e33)
This commit is contained in:
@@ -322,6 +322,13 @@ namespace Game.AI
|
|||||||
|
|
||||||
public override void UpdateAI(uint diff)
|
public override void UpdateAI(uint diff)
|
||||||
{
|
{
|
||||||
|
if (!me.IsAlive())
|
||||||
|
{
|
||||||
|
if (IsEngaged())
|
||||||
|
EngagementOver();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CheckConditions(diff);
|
CheckConditions(diff);
|
||||||
|
|
||||||
GetScript().OnUpdate(diff);
|
GetScript().OnUpdate(diff);
|
||||||
|
|||||||
@@ -2176,7 +2176,7 @@ namespace Game.Entities
|
|||||||
|
|
||||||
public void CallForHelp(float radius)
|
public void CallForHelp(float radius)
|
||||||
{
|
{
|
||||||
if (radius <= 0.0f || !IsEngaged() || IsPet() || IsCharmed())
|
if (radius <= 0.0f || !IsEngaged() || !IsAlive() || IsPet() || IsCharmed())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Unit target = GetThreatManager().GetCurrentVictim();
|
Unit target = GetThreatManager().GetCurrentVictim();
|
||||||
@@ -2187,7 +2187,7 @@ namespace Game.Entities
|
|||||||
|
|
||||||
if (target == null)
|
if (target == null)
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Unit, $"Creature {GetEntry()} ({GetName()}) is engaged without threat list");
|
Log.outError(LogFilter.Unit, $"Creature {GetEntry()} ({GetName()}) trying to call for help without being in combat.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user