Dropped L2Spawn spawnOne method.
This commit is contained in:
@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import com.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
@ -73,7 +72,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
private Constructor<? extends L2Npc> _constructor;
|
||||
/** If True a L2NpcInstance is respawned each time that another is killed */
|
||||
private boolean _doRespawn = true;
|
||||
/** If true then spawn is custom */
|
||||
private final Deque<L2Npc> _spawnedNpcs = new ConcurrentLinkedDeque<>();
|
||||
private boolean _randomWalk = false; // Is no random walk
|
||||
private NpcSpawnTemplate _spawnTemplate;
|
||||
@ -182,7 +180,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Identifier of the location area where L2NpcInstance can be spwaned.
|
||||
* @return the Identifier of the location area where L2NpcInstance can be spawned.
|
||||
*/
|
||||
public int getLocationId()
|
||||
{
|
||||
@ -274,7 +272,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
public void setXYZ(ILocational loc)
|
||||
{
|
||||
setXYZ(loc.getX(), loc.getY(), loc.getZ());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -416,16 +413,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
return _currentCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a {@link L2NpcInstance} in this L2Spawn.
|
||||
* @param val
|
||||
* @return
|
||||
*/
|
||||
public L2Npc spawnOne(boolean val)
|
||||
{
|
||||
return doSpawn(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if respawn enabled
|
||||
*/
|
||||
@ -589,6 +576,8 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
_spawnedNpcs.add(npc);
|
||||
|
||||
// Increase the current number of L2NpcInstance managed by this L2Spawn
|
||||
_currentCount++;
|
||||
|
||||
// Minions
|
||||
|
@ -2244,7 +2244,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
||||
spawn.setZ(z);
|
||||
spawn.stopRespawn();
|
||||
|
||||
final L2Npc npc = spawn.spawnOne(isSummonSpawn);
|
||||
final L2Npc npc = spawn.doSpawn(isSummonSpawn);
|
||||
if (despawnDelay > 0)
|
||||
{
|
||||
npc.scheduleDespawn(despawnDelay);
|
||||
|
@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import com.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
@ -73,7 +72,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
private Constructor<? extends L2Npc> _constructor;
|
||||
/** If True a L2NpcInstance is respawned each time that another is killed */
|
||||
private boolean _doRespawn = true;
|
||||
/** If true then spawn is custom */
|
||||
private final Deque<L2Npc> _spawnedNpcs = new ConcurrentLinkedDeque<>();
|
||||
private boolean _randomWalk = false; // Is no random walk
|
||||
private NpcSpawnTemplate _spawnTemplate;
|
||||
@ -182,7 +180,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Identifier of the location area where L2NpcInstance can be spwaned.
|
||||
* @return the Identifier of the location area where L2NpcInstance can be spawned.
|
||||
*/
|
||||
public int getLocationId()
|
||||
{
|
||||
@ -274,7 +272,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
public void setXYZ(ILocational loc)
|
||||
{
|
||||
setXYZ(loc.getX(), loc.getY(), loc.getZ());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -416,16 +413,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
return _currentCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a {@link L2NpcInstance} in this L2Spawn.
|
||||
* @param val
|
||||
* @return
|
||||
*/
|
||||
public L2Npc spawnOne(boolean val)
|
||||
{
|
||||
return doSpawn(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if respawn enabled
|
||||
*/
|
||||
@ -589,6 +576,8 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
_spawnedNpcs.add(npc);
|
||||
|
||||
// Increase the current number of L2NpcInstance managed by this L2Spawn
|
||||
_currentCount++;
|
||||
|
||||
// Minions
|
||||
|
@ -2244,7 +2244,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
||||
spawn.setZ(z);
|
||||
spawn.stopRespawn();
|
||||
|
||||
final L2Npc npc = spawn.spawnOne(isSummonSpawn);
|
||||
final L2Npc npc = spawn.doSpawn(isSummonSpawn);
|
||||
if (despawnDelay > 0)
|
||||
{
|
||||
npc.scheduleDespawn(despawnDelay);
|
||||
|
@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import com.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
@ -73,7 +72,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
private Constructor<? extends L2Npc> _constructor;
|
||||
/** If True a L2NpcInstance is respawned each time that another is killed */
|
||||
private boolean _doRespawn = true;
|
||||
/** If true then spawn is custom */
|
||||
private final Deque<L2Npc> _spawnedNpcs = new ConcurrentLinkedDeque<>();
|
||||
private boolean _randomWalk = false; // Is no random walk
|
||||
private NpcSpawnTemplate _spawnTemplate;
|
||||
@ -182,7 +180,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Identifier of the location area where L2NpcInstance can be spwaned.
|
||||
* @return the Identifier of the location area where L2NpcInstance can be spawned.
|
||||
*/
|
||||
public int getLocationId()
|
||||
{
|
||||
@ -274,7 +272,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
public void setXYZ(ILocational loc)
|
||||
{
|
||||
setXYZ(loc.getX(), loc.getY(), loc.getZ());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -416,16 +413,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
return _currentCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a {@link L2NpcInstance} in this L2Spawn.
|
||||
* @param val
|
||||
* @return
|
||||
*/
|
||||
public L2Npc spawnOne(boolean val)
|
||||
{
|
||||
return doSpawn(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if respawn enabled
|
||||
*/
|
||||
@ -589,6 +576,8 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
_spawnedNpcs.add(npc);
|
||||
|
||||
// Increase the current number of L2NpcInstance managed by this L2Spawn
|
||||
_currentCount++;
|
||||
|
||||
// Minions
|
||||
|
@ -2245,7 +2245,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
||||
spawn.setZ(z);
|
||||
spawn.stopRespawn();
|
||||
|
||||
final L2Npc npc = spawn.spawnOne(isSummonSpawn);
|
||||
final L2Npc npc = spawn.doSpawn(isSummonSpawn);
|
||||
if (despawnDelay > 0)
|
||||
{
|
||||
npc.scheduleDespawn(despawnDelay);
|
||||
|
@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import com.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
@ -73,7 +72,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
private Constructor<? extends L2Npc> _constructor;
|
||||
/** If True a L2NpcInstance is respawned each time that another is killed */
|
||||
private boolean _doRespawn = true;
|
||||
/** If true then spawn is custom */
|
||||
private final Deque<L2Npc> _spawnedNpcs = new ConcurrentLinkedDeque<>();
|
||||
private boolean _randomWalk = false; // Is no random walk
|
||||
private NpcSpawnTemplate _spawnTemplate;
|
||||
@ -182,7 +180,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Identifier of the location area where L2NpcInstance can be spwaned.
|
||||
* @return the Identifier of the location area where L2NpcInstance can be spawned.
|
||||
*/
|
||||
public int getLocationId()
|
||||
{
|
||||
@ -274,7 +272,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
public void setXYZ(ILocational loc)
|
||||
{
|
||||
setXYZ(loc.getX(), loc.getY(), loc.getZ());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -416,16 +413,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
return _currentCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a {@link L2NpcInstance} in this L2Spawn.
|
||||
* @param val
|
||||
* @return
|
||||
*/
|
||||
public L2Npc spawnOne(boolean val)
|
||||
{
|
||||
return doSpawn(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if respawn enabled
|
||||
*/
|
||||
@ -589,6 +576,8 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
_spawnedNpcs.add(npc);
|
||||
|
||||
// Increase the current number of L2NpcInstance managed by this L2Spawn
|
||||
_currentCount++;
|
||||
|
||||
// Minions
|
||||
|
@ -2245,7 +2245,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
||||
spawn.setZ(z);
|
||||
spawn.stopRespawn();
|
||||
|
||||
final L2Npc npc = spawn.spawnOne(isSummonSpawn);
|
||||
final L2Npc npc = spawn.doSpawn(isSummonSpawn);
|
||||
if (despawnDelay > 0)
|
||||
{
|
||||
npc.scheduleDespawn(despawnDelay);
|
||||
|
@ -64,7 +64,7 @@ public final class AltarsOfSacrifice extends AbstractNpcAI
|
||||
|
||||
spawn.setXYZ(spawnX, spawnY, GeoEngine.getInstance().getHeight(spawnX, spawnY, _middlePoint.getZ()));
|
||||
spawn.stopRespawn();
|
||||
_spawnedBoss = spawn.spawnOne(false);
|
||||
_spawnedBoss = spawn.doSpawn(false);
|
||||
}
|
||||
|
||||
protected void despawnBoss()
|
||||
|
@ -739,7 +739,7 @@ public final class TerritoryWarManager implements Siegable
|
||||
spawnDat.setZ(loc.getZ());
|
||||
spawnDat.setHeading(loc.getHeading());
|
||||
spawnDat.stopRespawn();
|
||||
return spawnDat.spawnOne(false);
|
||||
return spawnDat.doSpawn(false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
/** The identifier of the location area where L2NpcInstance can be spawned */
|
||||
private int _locationId;
|
||||
/** The Location of this NPC spawn. */
|
||||
private Location _location = new Location(0, 0, 0, 0, 0);
|
||||
private static Location _location = new Location(0, 0, 0, 0, 0);
|
||||
/** Link to NPC spawn territory */
|
||||
private NpcSpawnTerritory _spawnTerritory = null;
|
||||
/** Minimum respawn delay */
|
||||
@ -410,16 +410,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
return _currentCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a L2NpcInstance in this L2Spawn.
|
||||
* @param val
|
||||
* @return
|
||||
*/
|
||||
public L2Npc spawnOne(boolean val)
|
||||
{
|
||||
return doSpawn(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if respawn enabled
|
||||
*/
|
||||
@ -478,7 +468,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
if (_template.isType("L2Pet") || _template.isType("L2Decoy") || _template.isType("L2Trap"))
|
||||
{
|
||||
_currentCount++;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -519,10 +508,11 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
// New method
|
||||
if (_spawnTerritory != null)
|
||||
{
|
||||
final Location p = _spawnTerritory.getRandomPoint();
|
||||
newlocx = p.getX();
|
||||
newlocy = p.getY();
|
||||
newlocz = p.getZ();
|
||||
final Location loc = _spawnTerritory.getRandomPoint();
|
||||
newlocx = loc.getX();
|
||||
newlocy = loc.getY();
|
||||
newlocz = loc.getZ();
|
||||
setLocation(loc);
|
||||
}
|
||||
else if ((getX() == 0) && (getY() == 0))
|
||||
{
|
||||
|
@ -1879,7 +1879,7 @@ public abstract class AbstractScript extends ManagedScript
|
||||
spawn.setZ(z);
|
||||
spawn.stopRespawn();
|
||||
|
||||
final L2Npc npc = spawn.spawnOne(isSummonSpawn);
|
||||
final L2Npc npc = spawn.doSpawn(isSummonSpawn);
|
||||
if (despawnDelay > 0)
|
||||
{
|
||||
npc.scheduleDespawn(despawnDelay);
|
||||
|
@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import com.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
@ -73,7 +72,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
private Constructor<? extends L2Npc> _constructor;
|
||||
/** If True a L2NpcInstance is respawned each time that another is killed */
|
||||
private boolean _doRespawn = true;
|
||||
/** If true then spawn is custom */
|
||||
private final Deque<L2Npc> _spawnedNpcs = new ConcurrentLinkedDeque<>();
|
||||
private boolean _randomWalk = false; // Is no random walk
|
||||
private NpcSpawnTemplate _spawnTemplate;
|
||||
@ -182,7 +180,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Identifier of the location area where L2NpcInstance can be spwaned.
|
||||
* @return the Identifier of the location area where L2NpcInstance can be spawned.
|
||||
*/
|
||||
public int getLocationId()
|
||||
{
|
||||
@ -274,7 +272,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
public void setXYZ(ILocational loc)
|
||||
{
|
||||
setXYZ(loc.getX(), loc.getY(), loc.getZ());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -416,16 +413,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
return _currentCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a {@link L2NpcInstance} in this L2Spawn.
|
||||
* @param val
|
||||
* @return
|
||||
*/
|
||||
public L2Npc spawnOne(boolean val)
|
||||
{
|
||||
return doSpawn(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if respawn enabled
|
||||
*/
|
||||
@ -589,6 +576,8 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
_spawnedNpcs.add(npc);
|
||||
|
||||
// Increase the current number of L2NpcInstance managed by this L2Spawn
|
||||
_currentCount++;
|
||||
|
||||
// Minions
|
||||
|
@ -2244,7 +2244,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
||||
spawn.setZ(z);
|
||||
spawn.stopRespawn();
|
||||
|
||||
final L2Npc npc = spawn.spawnOne(isSummonSpawn);
|
||||
final L2Npc npc = spawn.doSpawn(isSummonSpawn);
|
||||
if (despawnDelay > 0)
|
||||
{
|
||||
npc.scheduleDespawn(despawnDelay);
|
||||
|
@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import com.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
@ -73,7 +72,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
private Constructor<? extends L2Npc> _constructor;
|
||||
/** If True a L2NpcInstance is respawned each time that another is killed */
|
||||
private boolean _doRespawn = true;
|
||||
/** If true then spawn is custom */
|
||||
private final Deque<L2Npc> _spawnedNpcs = new ConcurrentLinkedDeque<>();
|
||||
private boolean _randomWalk = false; // Is no random walk
|
||||
private NpcSpawnTemplate _spawnTemplate;
|
||||
@ -182,7 +180,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Identifier of the location area where L2NpcInstance can be spwaned.
|
||||
* @return the Identifier of the location area where L2NpcInstance can be spawned.
|
||||
*/
|
||||
public int getLocationId()
|
||||
{
|
||||
@ -274,7 +272,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
public void setXYZ(ILocational loc)
|
||||
{
|
||||
setXYZ(loc.getX(), loc.getY(), loc.getZ());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -416,16 +413,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
return _currentCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a {@link L2NpcInstance} in this L2Spawn.
|
||||
* @param val
|
||||
* @return
|
||||
*/
|
||||
public L2Npc spawnOne(boolean val)
|
||||
{
|
||||
return doSpawn(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if respawn enabled
|
||||
*/
|
||||
@ -589,6 +576,8 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
_spawnedNpcs.add(npc);
|
||||
|
||||
// Increase the current number of L2NpcInstance managed by this L2Spawn
|
||||
_currentCount++;
|
||||
|
||||
// Minions
|
||||
|
@ -2244,7 +2244,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
||||
spawn.setZ(z);
|
||||
spawn.stopRespawn();
|
||||
|
||||
final L2Npc npc = spawn.spawnOne(isSummonSpawn);
|
||||
final L2Npc npc = spawn.doSpawn(isSummonSpawn);
|
||||
if (despawnDelay > 0)
|
||||
{
|
||||
npc.scheduleDespawn(despawnDelay);
|
||||
|
@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2MonsterInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2NpcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate;
|
||||
import com.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import com.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
@ -73,7 +72,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
private Constructor<? extends L2Npc> _constructor;
|
||||
/** If True a L2NpcInstance is respawned each time that another is killed */
|
||||
private boolean _doRespawn = true;
|
||||
/** If true then spawn is custom */
|
||||
private final Deque<L2Npc> _spawnedNpcs = new ConcurrentLinkedDeque<>();
|
||||
private boolean _randomWalk = false; // Is no random walk
|
||||
private NpcSpawnTemplate _spawnTemplate;
|
||||
@ -182,7 +180,7 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Identifier of the location area where L2NpcInstance can be spwaned.
|
||||
* @return the Identifier of the location area where L2NpcInstance can be spawned.
|
||||
*/
|
||||
public int getLocationId()
|
||||
{
|
||||
@ -274,7 +272,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
public void setXYZ(ILocational loc)
|
||||
{
|
||||
setXYZ(loc.getX(), loc.getY(), loc.getZ());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -416,16 +413,6 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
return _currentCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a {@link L2NpcInstance} in this L2Spawn.
|
||||
* @param val
|
||||
* @return
|
||||
*/
|
||||
public L2Npc spawnOne(boolean val)
|
||||
{
|
||||
return doSpawn(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if respawn enabled
|
||||
*/
|
||||
@ -589,6 +576,8 @@ public class L2Spawn implements IPositionable, IIdentifiable, INamable
|
||||
}
|
||||
|
||||
_spawnedNpcs.add(npc);
|
||||
|
||||
// Increase the current number of L2NpcInstance managed by this L2Spawn
|
||||
_currentCount++;
|
||||
|
||||
// Minions
|
||||
|
@ -2244,7 +2244,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
||||
spawn.setZ(z);
|
||||
spawn.stopRespawn();
|
||||
|
||||
final L2Npc npc = spawn.spawnOne(isSummonSpawn);
|
||||
final L2Npc npc = spawn.doSpawn(isSummonSpawn);
|
||||
if (despawnDelay > 0)
|
||||
{
|
||||
npc.scheduleDespawn(despawnDelay);
|
||||
|
Reference in New Issue
Block a user