PartySmallWindowAdd.java 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  18. /**
  19. * This class ...
  20. *
  21. * @version $Revision: 1.4.2.1.2.5 $ $Date: 2005/03/27 15:29:57 $
  22. */
  23. public final class PartySmallWindowAdd extends L2GameServerPacket
  24. {
  25. private static final String _S__64_PARTYSMALLWINDOWADD = "[S] 4f PartySmallWindowAdd";
  26. private final L2PcInstance _member;
  27. private final int _leaderId;
  28. private final int _distribution;
  29. public PartySmallWindowAdd(L2PcInstance member, L2Party party)
  30. {
  31. _member = member;
  32. _leaderId = party.getPartyLeaderOID();
  33. _distribution = party.getLootDistribution();
  34. }
  35. @Override
  36. protected final void writeImpl()
  37. {
  38. writeC(0x4f);
  39. writeD(_leaderId); // c3
  40. writeD(_distribution);//writeD(0x04); ?? //c3
  41. writeD(_member.getObjectId());
  42. writeS(_member.getName());
  43. writeD((int) _member.getCurrentCp()); //c4
  44. writeD(_member.getMaxCp()); //c4
  45. writeD((int) _member.getCurrentHp());
  46. writeD(_member.getMaxVisibleHp());
  47. writeD((int) _member.getCurrentMp());
  48. writeD(_member.getMaxMp());
  49. writeD(_member.getLevel());
  50. writeD(_member.getClassId().getId());
  51. writeD(0);//writeD(0x01); ??
  52. writeD(0);
  53. }
  54. /* (non-Javadoc)
  55. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
  56. */
  57. @Override
  58. public String getType()
  59. {
  60. return _S__64_PARTYSMALLWINDOWADD;
  61. }
  62. }