Examples of JumpWay


Examples of lineage2.gameserver.templates.jump.JumpWay

    Player activeChar = getClient().getActiveChar();
    if (activeChar == null)
    {
      return;
    }
    JumpWay way = activeChar.getCurrentJumpWay();
    if (way == null)
    {
      activeChar.onJumpingBreak();
      return;
    }
    JumpPoint point = way.getJumpPoint(_nextWayId);
    if (point == null)
    {
      activeChar.onJumpingBreak();
      return;
    }
    Location destLoc = point.getLocation();
    activeChar.broadcastPacketToOthers(new ExFlyMoveBroadcast(activeChar, 2, destLoc));
    activeChar.setLoc(destLoc);
    JumpTrack track = activeChar.getCurrentJumpTrack();
    if (track == null)
    {
      activeChar.onJumpingBreak();
      return;
    }
    JumpWay nextWay = track.getWay(_nextWayId);
    if (nextWay == null)
    {
      activeChar.onJumpingBreak();
      return;
    }
    activeChar.sendPacket(new ExFlyMove(activeChar.getObjectId(), nextWay.getPoints(), track.getId()));
    activeChar.setCurrentJumpWay(nextWay);
  }
View Full Code Here

Examples of lineage2.gameserver.templates.jump.JumpWay

    {
      return;
    }
    Location destLoc = track.getStartLocation();
    activeChar.sendPacket(new FlyToLocation(activeChar, destLoc, FlyToLocation.FlyType.DUMMY, 0));
    JumpWay way = track.getWay(0);
    if (way == null)
    {
      return;
    }
    activeChar.sendPacket(new ExFlyMove(activeChar.getObjectId(), way.getPoints(), track.getId()));
    activeChar.broadcastPacketToOthers(new ExFlyMoveBroadcast(activeChar, 2, destLoc));
    activeChar.setVar("@safe_jump_loc", activeChar.getLoc().toXYZString(), -1);
    activeChar.setCurrentJumpTrack(track);
    activeChar.setCurrentJumpWay(way);
  }
View Full Code Here

Examples of lineage2.gameserver.templates.jump.JumpWay

      JumpTrack jumpTrack = new JumpTrack(trackId, startLoc);
      for (Iterator<?> wayIterator = trackElement.elementIterator("way"); wayIterator.hasNext();)
      {
        Element wayElement = (Element) wayIterator.next();
        int wayId = Integer.parseInt(wayElement.attributeValue("id"));
        JumpWay jumpWay = new JumpWay(wayId);
        for (Iterator<?> pointIterator = wayElement.elementIterator("point"); pointIterator.hasNext();)
        {
          Element pointElement = (Element) pointIterator.next();
          Location pointLoc = Location.parse(pointElement);
          int nextWayId = Integer.parseInt(pointElement.attributeValue("next_way_id"));
          jumpWay.addPoint(new JumpPoint(pointLoc, nextWayId));
        }
        jumpTrack.addWay(jumpWay);
      }
      getHolder().addTrack(jumpTrack);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.