SpawnTable should initialize multiple spawns separately.
This commit is contained in:
@@ -306,6 +306,11 @@ public class SpawnTable implements IXmlReader
|
||||
continue;
|
||||
}
|
||||
|
||||
final Node countNode = attrs.getNamedItem("count");
|
||||
final int count = countNode == null ? 1 : parseInteger(attrs, "count");
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
final StatSet spawnInfo = new StatSet();
|
||||
spawnInfo.set("npcTemplateid", templateId);
|
||||
spawnInfo.set("x", x);
|
||||
@@ -320,11 +325,6 @@ public class SpawnTable implements IXmlReader
|
||||
spawnInfo.set("heading", parseInteger(attrs, "heading"));
|
||||
}
|
||||
|
||||
if (attrs.getNamedItem("count") != null)
|
||||
{
|
||||
spawnInfo.set("count", parseInteger(attrs, "count"));
|
||||
}
|
||||
|
||||
if (attrs.getNamedItem("respawnDelay") != null)
|
||||
{
|
||||
spawnInfo.set("respawnDelay", parseInteger(attrs, "respawnDelay"));
|
||||
@@ -358,6 +358,7 @@ public class SpawnTable implements IXmlReader
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates NPC spawn
|
||||
|
||||
@@ -306,6 +306,11 @@ public class SpawnTable implements IXmlReader
|
||||
continue;
|
||||
}
|
||||
|
||||
final Node countNode = attrs.getNamedItem("count");
|
||||
final int count = countNode == null ? 1 : parseInteger(attrs, "count");
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
final StatSet spawnInfo = new StatSet();
|
||||
spawnInfo.set("npcTemplateid", templateId);
|
||||
spawnInfo.set("x", x);
|
||||
@@ -320,11 +325,6 @@ public class SpawnTable implements IXmlReader
|
||||
spawnInfo.set("heading", parseInteger(attrs, "heading"));
|
||||
}
|
||||
|
||||
if (attrs.getNamedItem("count") != null)
|
||||
{
|
||||
spawnInfo.set("count", parseInteger(attrs, "count"));
|
||||
}
|
||||
|
||||
if (attrs.getNamedItem("respawnDelay") != null)
|
||||
{
|
||||
spawnInfo.set("respawnDelay", parseInteger(attrs, "respawnDelay"));
|
||||
@@ -358,6 +358,7 @@ public class SpawnTable implements IXmlReader
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates NPC spawn
|
||||
|
||||
@@ -306,6 +306,11 @@ public class SpawnTable implements IXmlReader
|
||||
continue;
|
||||
}
|
||||
|
||||
final Node countNode = attrs.getNamedItem("count");
|
||||
final int count = countNode == null ? 1 : parseInteger(attrs, "count");
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
final StatSet spawnInfo = new StatSet();
|
||||
spawnInfo.set("npcTemplateid", templateId);
|
||||
spawnInfo.set("x", x);
|
||||
@@ -320,11 +325,6 @@ public class SpawnTable implements IXmlReader
|
||||
spawnInfo.set("heading", parseInteger(attrs, "heading"));
|
||||
}
|
||||
|
||||
if (attrs.getNamedItem("count") != null)
|
||||
{
|
||||
spawnInfo.set("count", parseInteger(attrs, "count"));
|
||||
}
|
||||
|
||||
if (attrs.getNamedItem("respawnDelay") != null)
|
||||
{
|
||||
spawnInfo.set("respawnDelay", parseInteger(attrs, "respawnDelay"));
|
||||
@@ -358,6 +358,7 @@ public class SpawnTable implements IXmlReader
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates NPC spawn
|
||||
|
||||
Reference in New Issue
Block a user