PartyMatchDetail.java 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. /**
  18. *
  19. *
  20. * sample
  21. * b0
  22. * d8 a8 10 48 objectId
  23. * 00 00 00 00
  24. * 00 00 00 00
  25. * 00 00
  26. *
  27. * format ddddS
  28. *
  29. * @version $Revision: 1.1.2.1.2.3 $ $Date: 2005/03/27 15:29:39 $
  30. */
  31. public class PartyMatchDetail extends L2GameServerPacket
  32. {
  33. private static final String _S__B0_PARTYMATCHDETAIL = "[S] 9d PartyMatchDetail";
  34. private L2PcInstance _activeChar;
  35. /**
  36. * @param allPlayers
  37. */
  38. public PartyMatchDetail(L2PcInstance player)
  39. {
  40. _activeChar = player;
  41. }
  42. @Override
  43. protected final void writeImpl()
  44. {
  45. writeC(0x9d);
  46. writeD(_activeChar.getObjectId());
  47. if (_activeChar.isPartyMatchingShowLevel())
  48. {
  49. writeD(1); // show level
  50. }
  51. else
  52. {
  53. writeD(0); // hide level
  54. }
  55. if (_activeChar.isPartyMatchingShowClass())
  56. {
  57. writeD(1); // show class
  58. }
  59. else
  60. {
  61. writeD(0); // hide class
  62. }
  63. writeD(0); //c2
  64. writeS(" " + _activeChar.getPartyMatchingMemo()); // seems to be bugged.. first 2 chars get stripped away
  65. }
  66. /* (non-Javadoc)
  67. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
  68. */
  69. @Override
  70. public String getType()
  71. {
  72. return _S__B0_PARTYMATCHDETAIL;
  73. }
  74. }