Sync with L2jServer HighFive Mar 25th 2015.

This commit is contained in:
MobiusDev
2015-03-25 06:48:51 +00:00
parent e0c66b1412
commit 82606870c0
194 changed files with 2619 additions and 2869 deletions

View File

@ -52,6 +52,7 @@ import com.l2jserver.gameserver.model.L2WorldRegion;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.StatsSet;
import com.l2jserver.gameserver.model.TeleportWhereType;
import com.l2jserver.gameserver.model.actor.L2Attackable;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
@ -99,7 +100,7 @@ public final class Instance
private final List<Integer> _exceptionList = new ArrayList<>();
protected ScheduledFuture<?> _checkTimeUpTask = null;
protected final Map<Integer, ScheduledFuture<?>> _ejectDeadTasks = new HashMap<>();
protected final Map<Integer, ScheduledFuture<?>> _ejectDeadTasks = new ConcurrentHashMap<>();
public Instance(int id)
{
@ -573,7 +574,7 @@ public final class Instance
List<L2Spawn> manualSpawn = new ArrayList<>();
for (Node d = group.getFirstChild(); d != null; d = d.getNextSibling())
{
int npcId = 0, x = 0, y = 0, z = 0, heading = 0, respawn = 0, respawnRandom = 0;
int npcId = 0, x = 0, y = 0, z = 0, heading = 0, respawn = 0, respawnRandom = 0, delay = -1;
Boolean allowRandomWalk = null;
if ("spawn".equalsIgnoreCase(d.getNodeName()))
{
@ -584,6 +585,10 @@ public final class Instance
z = Integer.parseInt(d.getAttributes().getNamedItem("z").getNodeValue());
heading = Integer.parseInt(d.getAttributes().getNamedItem("heading").getNodeValue());
respawn = Integer.parseInt(d.getAttributes().getNamedItem("respawn").getNodeValue());
if (d.getAttributes().getNamedItem("onKillDelay") != null)
{
delay = Integer.parseInt(d.getAttributes().getNamedItem("onKillDelay").getNodeValue());
}
if (d.getAttributes().getNamedItem("respawnRandom") != null)
{
respawnRandom = Integer.parseInt(d.getAttributes().getNamedItem("respawnRandom").getNodeValue());
@ -619,7 +624,11 @@ public final class Instance
}
if (spawnGroup.equals("general"))
{
spawnDat.doSpawn();
L2Npc spawned = spawnDat.doSpawn();
if ((delay >= 0) && (spawned instanceof L2Attackable))
{
((L2Attackable) spawned).setOnKillDelay(delay);
}
}
else
{