Prevent setting region to null from within L2Object.
This commit is contained in:
@@ -153,7 +153,6 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab
|
||||
_isSpawned = false;
|
||||
L2World.getInstance().removeVisibleObject(this, _worldRegion);
|
||||
L2World.getInstance().removeObject(this);
|
||||
setWorldRegion(null);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -231,16 +230,12 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab
|
||||
|
||||
public final boolean isSpawned()
|
||||
{
|
||||
return _worldRegion != null;
|
||||
return _isSpawned;
|
||||
}
|
||||
|
||||
public final void setSpawned(boolean value)
|
||||
{
|
||||
_isSpawned = value;
|
||||
if (!_isSpawned)
|
||||
{
|
||||
setWorldRegion(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -2419,6 +2419,10 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
{
|
||||
getAI().stopAITask();
|
||||
}
|
||||
|
||||
// Set world region to null.
|
||||
setWorldRegion(null);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user