Monster aggression fix.

Contributed by Edoo.
This commit is contained in:
MobiusDevelopment
2019-12-04 18:20:45 +00:00
parent 8db95b85f4
commit 6bdc9eaa0b
18 changed files with 171 additions and 45 deletions

View File

@ -1417,9 +1417,16 @@ public class Attackable extends Npc
_seederObjId = 0;
// Check the region where this mob is, do not activate the AI if region is inactive.
if (hasAI() && !isInActiveRegion())
if (hasAI())
{
getAI().stopAITask();
// Set the intention of the Attackable to AI_INTENTION_ACTIVE
getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
// Check the region where this mob is, do not activate the AI if region is inactive.
if (!isInActiveRegion())
{
getAI().stopAITask();
}
}
}