GetOnVehicle.java 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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.util.Point3D;
  17. /**
  18. * @author Maktakien
  19. *
  20. */
  21. public class GetOnVehicle extends L2GameServerPacket
  22. {
  23. private int _charObjId;
  24. private int _boatObjId;
  25. private Point3D _pos;
  26. /**
  27. * @param activeChar
  28. * @param boat
  29. * @param x
  30. * @param y
  31. * @param z
  32. */
  33. public GetOnVehicle(int charObjId, int boatObjId, Point3D pos)
  34. {
  35. _charObjId = charObjId;
  36. _boatObjId = boatObjId;
  37. _pos = pos;
  38. }
  39. /* (non-Javadoc)
  40. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#writeImpl()
  41. */
  42. @Override
  43. protected void writeImpl()
  44. {
  45. writeC(0x6e);
  46. writeD(_charObjId);
  47. writeD(_boatObjId);
  48. writeD(_pos.getX());
  49. writeD(_pos.getY());
  50. writeD(_pos.getZ());
  51. }
  52. /* (non-Javadoc)
  53. * @see com.l2jserver.gameserver.BasePacket#getType()
  54. */
  55. @Override
  56. public String getType()
  57. {
  58. return "[S] 6e GetOnVehicle";
  59. }
  60. }