ExGetBookMarkInfoPacket.java 1.7 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.gameserver.model.actor.instance.L2PcInstance.TeleportBookmark;
  18. /**
  19. *
  20. * @author ShanSoft
  21. * @Structure d dd (ddddSdS)
  22. */
  23. public class ExGetBookMarkInfoPacket extends L2GameServerPacket
  24. {
  25. private static final String _S__FE_84_EXGETBOOKMARKINFOPACKET = "[S] FE:84 ExGetBookMarkInfoPacket";
  26. private L2PcInstance player;
  27. public ExGetBookMarkInfoPacket(L2PcInstance cha)
  28. {
  29. player = cha;
  30. }
  31. @Override
  32. protected final void writeImpl()
  33. {
  34. writeC(0xFE);
  35. writeH(0x84);
  36. writeD(0x00); // Dummy
  37. writeD(player._bookmarkslot);
  38. writeD(player.tpbookmark.size());
  39. for (TeleportBookmark tpbm : player.tpbookmark)
  40. {
  41. writeD(tpbm._id);
  42. writeD(tpbm._x);
  43. writeD(tpbm._y);
  44. writeD(tpbm._z);
  45. writeS(tpbm._name);
  46. writeD(tpbm._icon);
  47. writeS(tpbm._tag);
  48. }
  49. }
  50. @Override
  51. public String getType()
  52. {
  53. return _S__FE_84_EXGETBOOKMARKINFOPACKET;
  54. }
  55. }