Monster aggression fix.
Contributed by Edoo.
This commit is contained in:
@@ -1481,11 +1481,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
@@ -1427,11 +1427,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
@@ -1427,11 +1427,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
@@ -1427,11 +1427,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
@@ -1416,11 +1416,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
@@ -1416,11 +1416,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
@@ -1416,11 +1416,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
@@ -1424,11 +1424,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
@@ -3083,7 +3083,13 @@ public class Attackable extends NpcInstance
|
||||
setWalking();
|
||||
|
||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
||||
if (hasAI() && !isInActiveRegion())
|
||||
if (hasAI())
|
||||
{
|
||||
// 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())
|
||||
{
|
||||
if (this instanceof SiegeGuardInstance)
|
||||
{
|
||||
@@ -3099,6 +3105,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets state of the mob to seeded. Paramets needed to be set before.
|
||||
|
@@ -1444,11 +1444,18 @@ public class Attackable extends Npc
|
||||
setWalking();
|
||||
|
||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
||||
if (hasAI() && !isInActiveRegion())
|
||||
if (hasAI())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if its spoiled.
|
||||
|
@@ -1444,11 +1444,18 @@ public class Attackable extends Npc
|
||||
setWalking();
|
||||
|
||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
||||
if (hasAI() && !isInActiveRegion())
|
||||
if (hasAI())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if its spoiled.
|
||||
|
@@ -1417,11 +1417,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
@@ -1417,11 +1417,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
@@ -1417,11 +1417,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
@@ -1439,11 +1439,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
@@ -1439,11 +1439,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
@@ -1439,11 +1439,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
@@ -1417,11 +1417,18 @@ 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())
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRespawn()
|
||||
|
Reference in New Issue
Block a user