AllyCrest.java 1.8 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. /**
  17. * <code>
  18. * sample
  19. * 0000: c7 6d 06 00 00 36 05 00 00 42 4d 36 05 00 00 00 .m...6...BM6....
  20. * 0010: 00 00 00 36 04 00 00 28 00 00 00 10 00 00 00 10 ...6...(........
  21. * 0020: 00 00 00 01 00 08 00 00 00 00 00 00 01 00 00 c4 ................
  22. * 0030: ...
  23. * 0530: 10 91 00 00 00 60 9b d1 01 e4 6e ee 52 97 dd .....`....n.R..
  24. * </code>
  25. *
  26. *
  27. * format dd x...x
  28. *
  29. * @version $Revision: 1.3.2.1.2.4 $ $Date: 2005/03/27 15:29:39 $
  30. */
  31. public class AllyCrest extends L2GameServerPacket
  32. {
  33. private static final String _S__AF_ALLYCREST = "[S] af AllyCrest";
  34. private int _crestId;
  35. private int _crestSize;
  36. private byte[] _data;
  37. public AllyCrest(int crestId,byte[] data)
  38. {
  39. _crestId = crestId;
  40. _data = data;
  41. _crestSize = _data.length;
  42. }
  43. @Override
  44. protected final void writeImpl()
  45. {
  46. writeC(0xaf);
  47. writeD(_crestId);
  48. writeD(_crestSize);
  49. writeB(_data);
  50. }
  51. /* (non-Javadoc)
  52. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
  53. */
  54. @Override
  55. public String getType()
  56. {
  57. return _S__AF_ALLYCREST;
  58. }
  59. }