ExMPCCPartyInfoUpdate.java 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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.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, _LeaderOID, _memberCount;
  28. private String _name;
  29. /**
  30. *
  31. * @param party
  32. * @param mode 0 = Remove, 1 = Add
  33. */
  34. public ExMPCCPartyInfoUpdate(L2Party party, int mode)
  35. {
  36. _party = party;
  37. _name = _party.getLeader().getName();
  38. _LeaderOID = _party.getPartyLeaderOID();
  39. _memberCount = _party.getMemberCount();
  40. _mode = mode;
  41. }
  42. /**
  43. * @see com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket#writeImpl()
  44. */
  45. @Override
  46. protected void writeImpl()
  47. {
  48. writeC(0xfe);
  49. writeH(0x5b);
  50. writeS(_name);
  51. writeD(_LeaderOID);
  52. writeD(_memberCount);
  53. writeD(_mode); //mode 0 = Remove Party, 1 = AddParty, maybe more...
  54. }
  55. /**
  56. * @see com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket#getType()
  57. */
  58. @Override
  59. public String getType()
  60. {
  61. return _S__FE_5B_EXMPCCPARTYINFOUPDATE;
  62. }
  63. }