Prevent moving to nonexistent regions.
This commit is contained in:
@@ -5145,6 +5145,13 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
final ZoneRegion oldZoneRegion = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion oldZoneRegion = ZoneManager.getInstance().getRegion(this);
|
||||||
final ZoneRegion newZoneRegion = ZoneManager.getInstance().getRegion(newX, newY);
|
final ZoneRegion newZoneRegion = ZoneManager.getInstance().getRegion(newX, newY);
|
||||||
|
|
||||||
|
// Mobius: Prevent moving to nonexistent regions.
|
||||||
|
if (newZoneRegion == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (oldZoneRegion != newZoneRegion)
|
if (oldZoneRegion != newZoneRegion)
|
||||||
{
|
{
|
||||||
oldZoneRegion.removeFromZones(this);
|
oldZoneRegion.removeFromZones(this);
|
||||||
|
@@ -5145,6 +5145,13 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
final ZoneRegion oldZoneRegion = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion oldZoneRegion = ZoneManager.getInstance().getRegion(this);
|
||||||
final ZoneRegion newZoneRegion = ZoneManager.getInstance().getRegion(newX, newY);
|
final ZoneRegion newZoneRegion = ZoneManager.getInstance().getRegion(newX, newY);
|
||||||
|
|
||||||
|
// Mobius: Prevent moving to nonexistent regions.
|
||||||
|
if (newZoneRegion == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (oldZoneRegion != newZoneRegion)
|
if (oldZoneRegion != newZoneRegion)
|
||||||
{
|
{
|
||||||
oldZoneRegion.removeFromZones(this);
|
oldZoneRegion.removeFromZones(this);
|
||||||
|
@@ -5145,6 +5145,13 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
final ZoneRegion oldZoneRegion = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion oldZoneRegion = ZoneManager.getInstance().getRegion(this);
|
||||||
final ZoneRegion newZoneRegion = ZoneManager.getInstance().getRegion(newX, newY);
|
final ZoneRegion newZoneRegion = ZoneManager.getInstance().getRegion(newX, newY);
|
||||||
|
|
||||||
|
// Mobius: Prevent moving to nonexistent regions.
|
||||||
|
if (newZoneRegion == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (oldZoneRegion != newZoneRegion)
|
if (oldZoneRegion != newZoneRegion)
|
||||||
{
|
{
|
||||||
oldZoneRegion.removeFromZones(this);
|
oldZoneRegion.removeFromZones(this);
|
||||||
|
@@ -5145,6 +5145,13 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
final ZoneRegion oldZoneRegion = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion oldZoneRegion = ZoneManager.getInstance().getRegion(this);
|
||||||
final ZoneRegion newZoneRegion = ZoneManager.getInstance().getRegion(newX, newY);
|
final ZoneRegion newZoneRegion = ZoneManager.getInstance().getRegion(newX, newY);
|
||||||
|
|
||||||
|
// Mobius: Prevent moving to nonexistent regions.
|
||||||
|
if (newZoneRegion == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (oldZoneRegion != newZoneRegion)
|
if (oldZoneRegion != newZoneRegion)
|
||||||
{
|
{
|
||||||
oldZoneRegion.removeFromZones(this);
|
oldZoneRegion.removeFromZones(this);
|
||||||
|
@@ -6803,6 +6803,13 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
final ZoneRegion oldZoneRegion = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion oldZoneRegion = ZoneManager.getInstance().getRegion(this);
|
||||||
final ZoneRegion newZoneRegion = ZoneManager.getInstance().getRegion(newX, newY);
|
final ZoneRegion newZoneRegion = ZoneManager.getInstance().getRegion(newX, newY);
|
||||||
|
|
||||||
|
// Mobius: Prevent moving to nonexistent regions.
|
||||||
|
if (newZoneRegion == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (oldZoneRegion != newZoneRegion)
|
if (oldZoneRegion != newZoneRegion)
|
||||||
{
|
{
|
||||||
oldZoneRegion.removeFromZones(this);
|
oldZoneRegion.removeFromZones(this);
|
||||||
|
@@ -5145,6 +5145,13 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
final ZoneRegion oldZoneRegion = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion oldZoneRegion = ZoneManager.getInstance().getRegion(this);
|
||||||
final ZoneRegion newZoneRegion = ZoneManager.getInstance().getRegion(newX, newY);
|
final ZoneRegion newZoneRegion = ZoneManager.getInstance().getRegion(newX, newY);
|
||||||
|
|
||||||
|
// Mobius: Prevent moving to nonexistent regions.
|
||||||
|
if (newZoneRegion == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (oldZoneRegion != newZoneRegion)
|
if (oldZoneRegion != newZoneRegion)
|
||||||
{
|
{
|
||||||
oldZoneRegion.removeFromZones(this);
|
oldZoneRegion.removeFromZones(this);
|
||||||
|
@@ -5145,6 +5145,13 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
final ZoneRegion oldZoneRegion = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion oldZoneRegion = ZoneManager.getInstance().getRegion(this);
|
||||||
final ZoneRegion newZoneRegion = ZoneManager.getInstance().getRegion(newX, newY);
|
final ZoneRegion newZoneRegion = ZoneManager.getInstance().getRegion(newX, newY);
|
||||||
|
|
||||||
|
// Mobius: Prevent moving to nonexistent regions.
|
||||||
|
if (newZoneRegion == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (oldZoneRegion != newZoneRegion)
|
if (oldZoneRegion != newZoneRegion)
|
||||||
{
|
{
|
||||||
oldZoneRegion.removeFromZones(this);
|
oldZoneRegion.removeFromZones(this);
|
||||||
|
Reference in New Issue
Block a user