MoveToLocationInVehicle.java 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * This program is free software: you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation, either version 3 of the License, or (at your option) any later
  5. * version.
  6. *
  7. * This program is distributed in the hope that it will be useful, but WITHOUT
  8. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. * details.
  11. *
  12. * You should have received a copy of the GNU General Public License along with
  13. * this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. package com.l2jserver.gameserver.network.serverpackets;
  16. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  17. import com.l2jserver.util.Point3D;
  18. /**
  19. * @author Maktakien
  20. *
  21. */
  22. public class MoveToLocationInVehicle extends L2GameServerPacket
  23. {
  24. private int _charObjId;
  25. private int _boatId;
  26. private Point3D _destination;
  27. private Point3D _origin;
  28. /**
  29. * @param actor
  30. * @param destination
  31. * @param origin
  32. */
  33. public MoveToLocationInVehicle(L2PcInstance player, Point3D destination, Point3D origin)
  34. {
  35. _charObjId = player.getObjectId();
  36. _boatId = player.getBoat().getObjectId();
  37. _destination = destination;
  38. _origin = origin;
  39. }
  40. /* (non-Javadoc)
  41. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#writeImpl()
  42. */
  43. @Override
  44. protected void writeImpl()
  45. {
  46. writeC(0x7e);
  47. writeD(_charObjId);
  48. writeD(_boatId);
  49. writeD(_destination.getX());
  50. writeD(_destination.getY());
  51. writeD(_destination.getZ());
  52. writeD(_origin.getX());
  53. writeD(_origin.getY());
  54. writeD(_origin.getZ());
  55. }
  56. /* (non-Javadoc)
  57. * @see com.l2jserver.gameserver.BasePacket#getType()
  58. */
  59. @Override
  60. public String getType()
  61. {
  62. return "[S] 7e MoveToLocationInVehicle";
  63. }
  64. }