if ("table".equalsIgnoreCase(cd.getNodeName()))
{
attrs = cd.getAttributes();
String tableName = attrs.getNamedItem("name").getNodeValue();
StringTokenizer data = new StringTokenizer(cd.getFirstChild().getNodeValue());
TDoubleArrayList array = new TDoubleArrayList();
while (data.hasMoreTokens())
{
array.add(Double.parseDouble(data.nextToken()));
}
if (tableName.equalsIgnoreCase("#soloValues"))
{
soloValues = new double[array.size()];
int x = 0;
for (double value : array.toArray())
{
soloValues[x++] = value;
}
}
else
{
combinedValues = new double[array.size()];
int x = 0;
for (double value : array.toArray())
{
combinedValues[x++] = value;
}
}
}
}
((List<augmentationStat>) _augStats[i - 1]).add(new augmentationStat(Stats.valueOfXml(statName), soloValues, combinedValues));
}
}
}
}
}
catch (Exception e)
{
_log.error("Error parsing augmentation_stats" + i + ".xml.", e);
return;
}
try
{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
File file = new File(Config.DATAPACK_ROOT, "data/xml/stats/augmentation/augmentation_jewel_stats" + i + ".xml");
Document doc = factory.newDocumentBuilder().parse(file);
for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
{
if ("list".equalsIgnoreCase(n.getNodeName()))
{
for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
{
if ("stat".equalsIgnoreCase(d.getNodeName()))
{
NamedNodeMap attrs = d.getAttributes();
String statName = attrs.getNamedItem("name").getNodeValue();
double soloValues[] = null, combinedValues[] = null;
for (Node cd = d.getFirstChild(); cd != null; cd = cd.getNextSibling())
{
if ("table".equalsIgnoreCase(cd.getNodeName()))
{
attrs = cd.getAttributes();
String tableName = attrs.getNamedItem("name").getNodeValue();
StringTokenizer data = new StringTokenizer(cd.getFirstChild().getNodeValue());
TDoubleArrayList array = new TDoubleArrayList();
while (data.hasMoreTokens())
{
array.add(Double.parseDouble(data.nextToken()));
}
if (tableName.equalsIgnoreCase("#soloValues"))
{
soloValues = new double[array.size()];
int x = 0;
for (double value : array.toArray())
{
soloValues[x++] = value;
}
}
else
{
combinedValues = new double[array.size()];
int x = 0;
for (double value : array.toArray())
{
combinedValues[x++] = value;
}
}
}