ExAirShipInfo.java 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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.L2AirShipInstance;
  17. public class ExAirShipInfo extends L2GameServerPacket
  18. {
  19. private static final String _S__FE_60_EXAIRSHIPINFO = "[S] FE:60 ExAirShipInfo";
  20. private final int _x, _y, _z, _heading, _objectId, _speed1, _speed2;
  21. public ExAirShipInfo(L2AirShipInstance ship)
  22. {
  23. _x = ship.getX();
  24. _y = ship.getY();
  25. _z = ship.getZ();
  26. _heading = ship.getPosition().getHeading();
  27. _objectId = ship.getObjectId();
  28. _speed1 = ship.getSpeed1();
  29. _speed2 = ship.getSpeed2();
  30. }
  31. @Override
  32. protected void writeImpl()
  33. {
  34. writeC(0xfe);
  35. writeH(0x60);
  36. writeD(_objectId);
  37. writeD(_x);
  38. writeD(_y);
  39. writeD(_z);
  40. writeD(_heading);
  41. writeD(0x00); // object id of player who control ship
  42. writeD(_speed1);
  43. writeD(_speed2);
  44. // clan airship related info
  45. writeD(0x00); // owner object id?
  46. writeD(0x00); // 366?
  47. writeD(0x00); // 0
  48. writeD(0x00); // 107:
  49. writeD(0x00); // 348?
  50. writeD(0x00); // 0?
  51. writeD(0x00); // 105?
  52. writeD(0x00); // current fuel
  53. writeD(0x00); // max fuel
  54. }
  55. @Override
  56. public String getType()
  57. {
  58. return _S__FE_60_EXAIRSHIPINFO;
  59. }
  60. }