Enable use of spawnPoints instance template parameter.

This commit is contained in:
MobiusDev 2018-08-08 20:09:50 +00:00
parent ce505a7166
commit 16e1cfc371
2 changed files with 9 additions and 2 deletions

View File

@ -60,6 +60,10 @@ public abstract class AbstractInstance extends AbstractNpcAI
{
handleRemoveBuffs(player, world);
}
if (!inst.getEnterLocs().isEmpty())
{
teleportPlayer(player, inst.getEnterLocs().get(getRandom(inst.getEnterLocs().size())), world.getInstanceId(), false);
}
return;
}
player.sendPacket(SystemMessageId.YOU_HAVE_ENTERED_ANOTHER_INSTANCE_ZONE_THEREFORE_YOU_CANNOT_ENTER_CORRESPONDING_DUNGEON);
@ -78,11 +82,14 @@ public abstract class AbstractInstance extends AbstractNpcAI
{
handleReenterTime(instance);
}
if (inst.isRemoveBuffEnabled())
{
handleRemoveBuffs(instance);
}
if (!inst.getEnterLocs().isEmpty())
{
teleportPlayer(player, inst.getEnterLocs().get(getRandom(inst.getEnterLocs().size())), instance.getInstanceId(), false);
}
}
}

View File

@ -77,7 +77,7 @@ public final class Instance
private final List<StatsSet> _doorTemplates = new CopyOnWriteArrayList<>();
private final Map<Integer, L2DoorInstance> _doors = new ConcurrentHashMap<>();
private final List<StatsSet> _spawnTemplates = new CopyOnWriteArrayList<>();
private List<Location> _enterLocations = null;
private List<Location> _enterLocations = new CopyOnWriteArrayList<>();
private Location _exitLocation = null;
private boolean _allowSummon = true;
private long _emptyDestroyTime = -1;