Removed deleteMe position reset task.
This commit is contained in:
		@@ -97,7 +97,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
 | 
			
		||||
	 */
 | 
			
		||||
	public Spawn(NpcTemplate template) throws SecurityException, ClassNotFoundException, NoSuchMethodException, ClassCastException
 | 
			
		||||
	{
 | 
			
		||||
		super(0, 0, 0);
 | 
			
		||||
		super(0, 0, -10000);
 | 
			
		||||
		// Set the _template of the Spawn
 | 
			
		||||
		_template = template;
 | 
			
		||||
		
 | 
			
		||||
@@ -122,7 +122,7 @@ public class Spawn extends Location implements IIdentifiable, INamable
 | 
			
		||||
	 */
 | 
			
		||||
	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);
 | 
			
		||||
		
 | 
			
		||||
		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 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
 | 
			
		||||
		// New method
 | 
			
		||||
 
 | 
			
		||||
@@ -526,9 +526,13 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
 | 
			
		||||
		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.
 | 
			
		||||
		setWorldRegion(null);
 | 
			
		||||
		
 | 
			
		||||
		// Reset initial monster position.
 | 
			
		||||
		if (isMonster() && (((Npc) this).getSpawn() != null))
 | 
			
		||||
		{
 | 
			
		||||
			ThreadPool.schedule(() ->
 | 
			
		||||
			{
 | 
			
		||||
				setXYZ(0, 0, -10000);
 | 
			
		||||
			}, 5000);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		return true;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user