Examples of JumpTrack


Examples of lineage2.gameserver.templates.jump.JumpTrack

      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.JumpTrack

    Zone zone = activeChar.getZone(ZoneType.JUMPING);
    if (zone == null)
    {
      return;
    }
    JumpTrack track = JumpTracksHolder.getInstance().getTrack(zone.getTemplate().getJumpTrackId());
    if (track == null)
    {
      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.JumpTrack

    for (Iterator<Element> iterator = rootElement.elementIterator(); iterator.hasNext();)
    {
      Element trackElement = iterator.next();
      int trackId = Integer.parseInt(trackElement.attributeValue("id"));
      Location startLoc = Location.parse(trackElement);
      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.