Check destination when L2AttackableAI thinkAttack moves L2Character.
This commit is contained in:
parent
a9da02ce4e
commit
2c2b31dee5
@ -776,10 +776,9 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
if (!npc.isInsideRadius(newX, newY, 0, collision, false, false))
|
||||
{
|
||||
final int newZ = npc.getZ() + 30;
|
||||
if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceWorld()))
|
||||
{
|
||||
moveTo(newX, newY, newZ);
|
||||
}
|
||||
|
||||
// Mobius: Verify destination. Prevents wall collision issues and fixes monsters not avoiding obstacles.
|
||||
moveTo(GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceWorld()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -776,10 +776,9 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
if (!npc.isInsideRadius(newX, newY, 0, collision, false, false))
|
||||
{
|
||||
final int newZ = npc.getZ() + 30;
|
||||
if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceWorld()))
|
||||
{
|
||||
moveTo(newX, newY, newZ);
|
||||
}
|
||||
|
||||
// Mobius: Verify destination. Prevents wall collision issues and fixes monsters not avoiding obstacles.
|
||||
moveTo(GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceWorld()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -776,10 +776,9 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
if (!npc.isInsideRadius(newX, newY, 0, collision, false, false))
|
||||
{
|
||||
final int newZ = npc.getZ() + 30;
|
||||
if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceWorld()))
|
||||
{
|
||||
moveTo(newX, newY, newZ);
|
||||
}
|
||||
|
||||
// Mobius: Verify destination. Prevents wall collision issues and fixes monsters not avoiding obstacles.
|
||||
moveTo(GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceWorld()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -776,10 +776,9 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
if (!npc.isInsideRadius(newX, newY, 0, collision, false, false))
|
||||
{
|
||||
final int newZ = npc.getZ() + 30;
|
||||
if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceWorld()))
|
||||
{
|
||||
moveTo(newX, newY, newZ);
|
||||
}
|
||||
|
||||
// Mobius: Verify destination. Prevents wall collision issues and fixes monsters not avoiding obstacles.
|
||||
moveTo(GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceWorld()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -902,11 +902,8 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
{
|
||||
final int newZ = npc.getZ() + 30;
|
||||
|
||||
// fixes monsters not avoiding obstacles
|
||||
// if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceId()))
|
||||
// {
|
||||
moveTo(newX, newY, newZ);
|
||||
// }
|
||||
// Mobius: Verify destination. Prevents wall collision issues and fixes monsters not avoiding obstacles.
|
||||
moveTo(GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceId()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -776,10 +776,9 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
if (!npc.isInsideRadius(newX, newY, 0, collision, false, false))
|
||||
{
|
||||
final int newZ = npc.getZ() + 30;
|
||||
if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceWorld()))
|
||||
{
|
||||
moveTo(newX, newY, newZ);
|
||||
}
|
||||
|
||||
// Mobius: Verify destination. Prevents wall collision issues and fixes monsters not avoiding obstacles.
|
||||
moveTo(GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceWorld()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -776,10 +776,9 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
if (!npc.isInsideRadius(newX, newY, 0, collision, false, false))
|
||||
{
|
||||
final int newZ = npc.getZ() + 30;
|
||||
if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceWorld()))
|
||||
{
|
||||
moveTo(newX, newY, newZ);
|
||||
}
|
||||
|
||||
// Mobius: Verify destination. Prevents wall collision issues and fixes monsters not avoiding obstacles.
|
||||
moveTo(GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceWorld()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -776,10 +776,9 @@ public class L2AttackableAI extends L2CharacterAI
|
||||
if (!npc.isInsideRadius(newX, newY, 0, collision, false, false))
|
||||
{
|
||||
final int newZ = npc.getZ() + 30;
|
||||
if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceWorld()))
|
||||
{
|
||||
moveTo(newX, newY, newZ);
|
||||
}
|
||||
|
||||
// Mobius: Verify destination. Prevents wall collision issues and fixes monsters not avoiding obstacles.
|
||||
moveTo(GeoEngine.getInstance().canMoveToTargetLoc(npc.getX(), npc.getY(), npc.getZ(), newX, newY, newZ, npc.getInstanceWorld()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user