VehicleDeparture.java 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. /* (non-Javadoc)
  47. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#writeImpl()
  48. */
  49. @Override
  50. protected
  51. void writeImpl()
  52. {
  53. writeC(0x6c);
  54. writeD(_boat.getObjectId());
  55. writeD(_speed1);
  56. writeD(_speed2);
  57. writeD(_x);
  58. writeD(_y);
  59. writeD(_z);
  60. }
  61. /* (non-Javadoc)
  62. * @see com.l2jserver.gameserver.BasePacket#getType()
  63. */
  64. @Override
  65. public String getType()
  66. {
  67. // TODO Auto-generated method stub
  68. return "[S] 5A VehicleDeparture";
  69. }
  70. }