ExMoveToLocationInAirShip.java 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. public class ExMoveToLocationInAirShip extends L2GameServerPacket
  19. {
  20. private int _charObjId;
  21. private int _airShipId;
  22. private Point3D _destination;
  23. private int _heading;
  24. /**
  25. * @param actor
  26. * @param destination
  27. * @param origin
  28. */
  29. public ExMoveToLocationInAirShip(L2PcInstance player)
  30. {
  31. _charObjId = player.getObjectId();
  32. _airShipId = player.getAirShip().getObjectId();
  33. _destination = player.getInVehiclePosition();
  34. _heading = player.getHeading();
  35. }
  36. /* (non-Javadoc)
  37. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#writeImpl()
  38. */
  39. @Override
  40. protected void writeImpl()
  41. {
  42. writeC(0xfe);
  43. writeH(0x6D);
  44. writeD(_charObjId);
  45. writeD(_airShipId);
  46. writeD(_destination.getX());
  47. writeD(_destination.getY());
  48. writeD(_destination.getZ());
  49. writeD(_heading);
  50. }
  51. /* (non-Javadoc)
  52. * @see com.l2jserver.gameserver.BasePacket#getType()
  53. */
  54. @Override
  55. public String getType()
  56. {
  57. return "[S] 6D MoveToLocationInAirShip";
  58. }
  59. }