Monster aggression fix.
Contributed by Edoo.
This commit is contained in:
@@ -1481,9 +1481,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1427,9 +1427,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1427,9 +1427,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1427,9 +1427,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1416,9 +1416,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1416,9 +1416,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1416,9 +1416,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1424,9 +1424,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3083,19 +3083,26 @@ public class Attackable extends NpcInstance
|
|||||||
setWalking();
|
setWalking();
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// Check the region where this mob is, do not activate the AI if region is inactive.
|
||||||
if (hasAI() && !isInActiveRegion())
|
if (hasAI())
|
||||||
{
|
{
|
||||||
if (this instanceof SiegeGuardInstance)
|
// 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())
|
||||||
{
|
{
|
||||||
((SiegeGuardAI) getAI()).stopAITask();
|
if (this instanceof SiegeGuardInstance)
|
||||||
}
|
{
|
||||||
else if (this instanceof FortSiegeGuardInstance)
|
((SiegeGuardAI) getAI()).stopAITask();
|
||||||
{
|
}
|
||||||
((FortSiegeGuardAI) getAI()).stopAITask();
|
else if (this instanceof FortSiegeGuardInstance)
|
||||||
}
|
{
|
||||||
else
|
((FortSiegeGuardAI) getAI()).stopAITask();
|
||||||
{
|
}
|
||||||
((AttackableAI) getAI()).stopAITask();
|
else
|
||||||
|
{
|
||||||
|
((AttackableAI) getAI()).stopAITask();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1444,9 +1444,16 @@ public class Attackable extends Npc
|
|||||||
setWalking();
|
setWalking();
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1444,9 +1444,16 @@ public class Attackable extends Npc
|
|||||||
setWalking();
|
setWalking();
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1417,9 +1417,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1417,9 +1417,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1417,9 +1417,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1439,9 +1439,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1439,9 +1439,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1439,9 +1439,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1417,9 +1417,16 @@ public class Attackable extends Npc
|
|||||||
_seederObjId = 0;
|
_seederObjId = 0;
|
||||||
|
|
||||||
// Check the region where this mob is, do not activate the AI if region is inactive.
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user