Sync with L2jServer HighFive Mar 3rd 2016.
This commit is contained in:
@@ -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<>();
|
||||
|
Reference in New Issue
Block a user