コード例 #1
0
ファイル: RequestFlyMove.java プロジェクト: namlehong/ertheia
  protected void runImpl() {
    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, 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);
  }
コード例 #2
0
 public void addTrack(JumpTrack track) {
   _jumpingTracks.put(track.getId(), track);
 }