Removed deleteMe position reset task.
This commit is contained in:
parent
bb447c945f
commit
c2b6be2a40
@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
||||||
|
|
||||||
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
||||||
@ -361,7 +361,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1722,15 +1722,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
||||||
|
|
||||||
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
||||||
@ -361,7 +361,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1722,15 +1722,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
||||||
|
|
||||||
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
||||||
@ -361,7 +361,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1722,15 +1722,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
||||||
|
|
||||||
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
||||||
@ -361,7 +361,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1722,15 +1722,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
||||||
|
|
||||||
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
||||||
@ -361,7 +361,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1722,15 +1722,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
||||||
|
|
||||||
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
||||||
@ -361,7 +361,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1722,15 +1722,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
||||||
|
|
||||||
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
||||||
@ -361,7 +361,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1722,15 +1722,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
||||||
|
|
||||||
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
||||||
@ -361,7 +361,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1722,15 +1722,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -355,7 +355,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -539,9 +539,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2469,15 +2469,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
||||||
|
|
||||||
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
||||||
@ -361,7 +361,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1721,15 +1721,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
||||||
|
|
||||||
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
||||||
@ -361,7 +361,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1721,15 +1721,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
||||||
|
|
||||||
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
||||||
@ -361,7 +361,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1721,15 +1721,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
||||||
|
|
||||||
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
||||||
@ -361,7 +361,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1722,15 +1722,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
||||||
|
|
||||||
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
||||||
@ -361,7 +361,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1722,15 +1722,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
// Set the _template of the Spawn
|
// Set the _template of the Spawn
|
||||||
_template = template;
|
_template = template;
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
*/
|
*/
|
||||||
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
public Spawn(int npcId) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
|
||||||
{
|
{
|
||||||
super(0, 0, 0);
|
super(0, 0, -10000);
|
||||||
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
_template = Objects.requireNonNull(NpcData.getInstance().getTemplate(npcId), "NpcTemplate not found for NPC ID: " + npcId);
|
||||||
|
|
||||||
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
final String className = "org.l2jmobius.gameserver.model.actor.instance." + _template.getType() + "Instance";
|
||||||
@ -361,7 +361,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
|
|||||||
{
|
{
|
||||||
int newlocx = 0;
|
int newlocx = 0;
|
||||||
int newlocy = 0;
|
int newlocy = 0;
|
||||||
int newlocz = 0;
|
int newlocz = -10000;
|
||||||
|
|
||||||
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
// If Locx and Locy are not defined, the NpcInstance must be spawned in an area defined by location or spawn territory
|
||||||
// New method
|
// New method
|
||||||
|
@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
|
|||||||
return _worldRegion;
|
return _worldRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWorldRegion(WorldRegion value)
|
public void setWorldRegion(WorldRegion region)
|
||||||
{
|
{
|
||||||
_worldRegion = value;
|
if ((region == null) && (_worldRegion != null))
|
||||||
|
{
|
||||||
|
_worldRegion.removeVisibleObject(this);
|
||||||
|
}
|
||||||
|
_worldRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1722,15 +1722,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
// Set world region to null.
|
// Set world region to null.
|
||||||
setWorldRegion(null);
|
setWorldRegion(null);
|
||||||
|
|
||||||
// Reset initial monster position.
|
|
||||||
if (isMonster() && (((Npc) this).getSpawn() != null))
|
|
||||||
{
|
|
||||||
ThreadPool.schedule(() ->
|
|
||||||
{
|
|
||||||
setXYZ(0, 0, -10000);
|
|
||||||
}, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user