{
doors = new HashIntObjectMap<>();
}
boolean opened = (e.attributeValue("opened") != null) && Boolean.parseBoolean(e.attributeValue("opened"));
boolean invul = (e.attributeValue("invul") == null) || Boolean.parseBoolean(e.attributeValue("invul"));
DoorTemplate template = DoorHolder.getInstance().getTemplate(Integer.parseInt(e.attributeValue("id")));
doors.put(template.getNpcId(), new InstantZone.DoorInfo(template, opened, invul));
}
}
else if ("zones".equalsIgnoreCase(subElement.getName()))
{
for (Element e : subElement.elements())
{
if (zones.isEmpty())
{
zones = new HashMap<>();
}
boolean active = (e.attributeValue("active") != null) && Boolean.parseBoolean(e.attributeValue("active"));
ZoneTemplate template = ZoneHolder.getInstance().getTemplate(e.attributeValue("name"));
if (template == null)
{
error("Zone: " + e.attributeValue("name") + " not found; file: " + getCurrentFileName());
continue;
}
zones.put(template.getName(), new InstantZone.ZoneInfo(template, active));
}
}
else if ("add_parameters".equalsIgnoreCase(subElement.getName()))
{
for (Element e : subElement.elements())