Removed unusable accessory augment chances.
This commit is contained in:
@ -112,7 +112,8 @@ public class AugmentationData
|
||||
else
|
||||
{
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded: " + _augmentationChances.size() + " augmentations.");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded: " + _augmentationChancesAcc.size() + " accessory augmentations.");
|
||||
// Accessories disabled for Classic.
|
||||
// LOGGER.info(getClass().getSimpleName() + ": Loaded: " + _augmentationChancesAcc.size() + " accessory augmentations.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -417,98 +418,18 @@ public class AugmentationData
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Config.RETAIL_LIKE_AUGMENTATION_ACCESSORY)
|
||||
{
|
||||
final DocumentBuilderFactory factory3 = DocumentBuilderFactory.newInstance();
|
||||
factory3.setValidating(false);
|
||||
factory3.setIgnoringComments(true);
|
||||
|
||||
final File aFile3 = new File(Config.DATAPACK_ROOT + "/data/stats/augmentation/retailchances_accessory.xml");
|
||||
if (aFile3.exists())
|
||||
{
|
||||
Document aDoc = null;
|
||||
|
||||
try
|
||||
{
|
||||
aDoc = factory3.newDocumentBuilder().parse(aFile3);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
String aWeaponType = null;
|
||||
int aStoneId = 0;
|
||||
int aVariationId = 0;
|
||||
int aCategoryChance = 0;
|
||||
int aAugmentId = 0;
|
||||
float aAugmentChance = 0;
|
||||
|
||||
for (Node l = aDoc.getFirstChild(); l != null; l = l.getNextSibling())
|
||||
{
|
||||
if (l.getNodeName().equals("list"))
|
||||
{
|
||||
NamedNodeMap aNodeAttributes = null;
|
||||
for (Node n = l.getFirstChild(); n != null; n = n.getNextSibling())
|
||||
{
|
||||
if (n.getNodeName().equals("weapon"))
|
||||
{
|
||||
aNodeAttributes = n.getAttributes();
|
||||
|
||||
aWeaponType = aNodeAttributes.getNamedItem("type").getNodeValue();
|
||||
|
||||
for (Node c = n.getFirstChild(); c != null; c = c.getNextSibling())
|
||||
{
|
||||
if (c.getNodeName().equals("stone"))
|
||||
{
|
||||
aNodeAttributes = c.getAttributes();
|
||||
|
||||
aStoneId = Integer.parseInt(aNodeAttributes.getNamedItem("id").getNodeValue());
|
||||
|
||||
for (Node v = c.getFirstChild(); v != null; v = v.getNextSibling())
|
||||
{
|
||||
if (v.getNodeName().equals("variation"))
|
||||
{
|
||||
aNodeAttributes = v.getAttributes();
|
||||
|
||||
aVariationId = Integer.parseInt(aNodeAttributes.getNamedItem("id").getNodeValue());
|
||||
|
||||
for (Node j = v.getFirstChild(); j != null; j = j.getNextSibling())
|
||||
{
|
||||
if (j.getNodeName().equals("category"))
|
||||
{
|
||||
aNodeAttributes = j.getAttributes();
|
||||
|
||||
aCategoryChance = Integer.parseInt(aNodeAttributes.getNamedItem("probability").getNodeValue());
|
||||
|
||||
for (Node e = j.getFirstChild(); e != null; e = e.getNextSibling())
|
||||
{
|
||||
if (e.getNodeName().equals("augment"))
|
||||
{
|
||||
aNodeAttributes = e.getAttributes();
|
||||
|
||||
aAugmentId = Integer.parseInt(aNodeAttributes.getNamedItem("id").getNodeValue());
|
||||
aAugmentChance = Float.parseFloat(aNodeAttributes.getNamedItem("chance").getNodeValue());
|
||||
|
||||
_augmentationChancesAcc.add(new augmentationChanceAcc(aWeaponType, aStoneId, aVariationId, aCategoryChance, aAugmentId, aAugmentChance));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.warning(getClass().getSimpleName() + ": ERROR The retailchances_accessory.xml data file is missing.");
|
||||
}
|
||||
}
|
||||
// Accessories disabled for Classic.
|
||||
/*
|
||||
* if (Config.RETAIL_LIKE_AUGMENTATION_ACCESSORY) { final DocumentBuilderFactory factory3 = DocumentBuilderFactory.newInstance(); factory3.setValidating(false); factory3.setIgnoringComments(true); final File aFile3 = new File(Config.DATAPACK_ROOT +
|
||||
* "/data/stats/augmentation/retailchances_accessory.xml"); if (aFile3.exists()) { Document aDoc = null; try { aDoc = factory3.newDocumentBuilder().parse(aFile3); } catch (Exception e) { e.printStackTrace(); return; } String aWeaponType = null; int aStoneId = 0; int aVariationId = 0; int
|
||||
* aCategoryChance = 0; int aAugmentId = 0; float aAugmentChance = 0; for (Node l = aDoc.getFirstChild(); l != null; l = l.getNextSibling()) { if (l.getNodeName().equals("list")) { NamedNodeMap aNodeAttributes = null; for (Node n = l.getFirstChild(); n != null; n = n.getNextSibling()) { if
|
||||
* (n.getNodeName().equals("weapon")) { aNodeAttributes = n.getAttributes(); aWeaponType = aNodeAttributes.getNamedItem("type").getNodeValue(); for (Node c = n.getFirstChild(); c != null; c = c.getNextSibling()) { if (c.getNodeName().equals("stone")) { aNodeAttributes = c.getAttributes();
|
||||
* aStoneId = Integer.parseInt(aNodeAttributes.getNamedItem("id").getNodeValue()); for (Node v = c.getFirstChild(); v != null; v = v.getNextSibling()) { if (v.getNodeName().equals("variation")) { aNodeAttributes = v.getAttributes(); aVariationId =
|
||||
* Integer.parseInt(aNodeAttributes.getNamedItem("id").getNodeValue()); for (Node j = v.getFirstChild(); j != null; j = j.getNextSibling()) { if (j.getNodeName().equals("category")) { aNodeAttributes = j.getAttributes(); aCategoryChance =
|
||||
* Integer.parseInt(aNodeAttributes.getNamedItem("probability").getNodeValue()); for (Node e = j.getFirstChild(); e != null; e = e.getNextSibling()) { if (e.getNodeName().equals("augment")) { aNodeAttributes = e.getAttributes(); aAugmentId =
|
||||
* Integer.parseInt(aNodeAttributes.getNamedItem("id").getNodeValue()); aAugmentChance = Float.parseFloat(aNodeAttributes.getNamedItem("chance").getNodeValue()); _augmentationChancesAcc.add(new augmentationChanceAcc(aWeaponType, aStoneId, aVariationId, aCategoryChance, aAugmentId,
|
||||
* aAugmentChance)); } } } } } } } } } } } } } else { LOGGER.warning(getClass().getSimpleName() + ": ERROR The retailchances_accessory.xml data file is missing."); } }
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user