ExMPCCPartyInfoUpdate.java 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 net.sf.l2j.gameserver.serverpackets;
  16. import net.sf.l2j.gameserver.model.L2Party;
  17. /**
  18. *
  19. * @author chris_00
  20. *
  21. * ch Sddd
  22. */
  23. public class ExMPCCPartyInfoUpdate extends L2GameServerPacket
  24. {
  25. private static final String _S__FE_5B_EXMPCCPARTYINFOUPDATE = "[S] FE:5B ExMPCCPartyInfoUpdate";
  26. private L2Party _party;
  27. private int _mode;
  28. /**
  29. *
  30. * @param party
  31. * @param mode 0 = Remove, 1 = Add
  32. */
  33. public ExMPCCPartyInfoUpdate(L2Party party, int mode)
  34. {
  35. _party = party;
  36. _mode = mode;
  37. }
  38. /**
  39. * @see net.sf.l2j.gameserver.serverpackets.L2GameServerPacket#writeImpl()
  40. */
  41. @Override
  42. protected void writeImpl()
  43. {
  44. writeC(0xfe);
  45. writeH(0x5b);
  46. writeS(_party.getLeader().getName());
  47. writeD(_party.getPartyLeaderOID());
  48. writeD(_party.getMemberCount());
  49. writeD(_mode); //mode 0 = Remove Party, 1 = AddParty, maybe more...
  50. }
  51. /**
  52. * @see net.sf.l2j.gameserver.serverpackets.L2GameServerPacket#getType()
  53. */
  54. @Override
  55. public String getType()
  56. {
  57. return _S__FE_5B_EXMPCCPARTYINFOUPDATE;
  58. }
  59. }