VehicleDeparture.java 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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.L2BoatInstance;
  17. /**
  18. * @author Maktakien
  19. *
  20. */
  21. public class VehicleDeparture extends L2GameServerPacket
  22. {
  23. private L2BoatInstance _boat;
  24. private int _speed1;
  25. private int _speed2;//rotation
  26. private int _x;
  27. private int _y;
  28. private int _z;
  29. /**
  30. * @param _boat
  31. * @param speed1
  32. * @param speed2
  33. * @param x
  34. * @param y
  35. * @param z
  36. */
  37. public VehicleDeparture(L2BoatInstance boat, int speed1, int speed2, int x, int y, int z)
  38. {
  39. _boat = boat;
  40. _speed1 = speed1;
  41. _speed2 = speed2;
  42. _x = x;
  43. _y = y;
  44. _z = z;
  45. }
  46. @Override
  47. protected
  48. void writeImpl()
  49. {
  50. writeC(0x6c);
  51. writeD(_boat.getObjectId());
  52. writeD(_speed1);
  53. writeD(_speed2);
  54. writeD(_x);
  55. writeD(_y);
  56. writeD(_z);
  57. }
  58. @Override
  59. public String getType()
  60. {
  61. return "[S] 5A VehicleDeparture";
  62. }
  63. }