Sync with L2jServer HighFive Mar 3rd 2016.

This commit is contained in:
MobiusDev
2016-03-05 15:16:23 +00:00
parent 36448c168e
commit 7a9de77047
20 changed files with 269 additions and 237 deletions

View File

@@ -51,10 +51,12 @@ import com.l2jmobius.util.data.xml.IXmlReader;
public final class WalkingManager implements IXmlReader
{
// Repeat style:
// -1 - no repeat
// 0 - go back
// 1 - go to first point (circle style)
// 2 - teleport to first point (conveyor style)
// 3 - random walking between points.
public static final byte NO_REPEAT = -1;
public static final byte REPEAT_GO_BACK = 0;
public static final byte REPEAT_GO_FIRST = 1;
public static final byte REPEAT_TELE_FIRST = 2;
@@ -86,27 +88,36 @@ public final class WalkingManager implements IXmlReader
{
final String routeName = parseString(d.getAttributes(), "name");
final boolean repeat = parseBoolean(d.getAttributes(), "repeat");
final String repeatStyle = d.getAttributes().getNamedItem("repeatStyle").getNodeValue();
byte repeatType;
if (repeatStyle.equalsIgnoreCase("back"))
final String repeatStyle = d.getAttributes().getNamedItem("repeatStyle").getNodeValue().toLowerCase();
final byte repeatType;
switch (repeatStyle)
{
repeatType = REPEAT_GO_BACK;
}
else if (repeatStyle.equalsIgnoreCase("cycle"))
{
repeatType = REPEAT_GO_FIRST;
}
else if (repeatStyle.equalsIgnoreCase("conveyor"))
{
repeatType = REPEAT_TELE_FIRST;
}
else if (repeatStyle.equalsIgnoreCase("random"))
{
repeatType = REPEAT_RANDOM;
}
else
{
repeatType = -1;
case "back":
{
repeatType = REPEAT_GO_BACK;
break;
}
case "cycle":
{
repeatType = REPEAT_GO_FIRST;
break;
}
case "conveyor":
{
repeatType = REPEAT_TELE_FIRST;
break;
}
case "random":
{
repeatType = REPEAT_RANDOM;
break;
}
default:
{
repeatType = NO_REPEAT;
break;
}
}
final List<L2NpcWalkerNode> list = new ArrayList<>();