2
0

ExDuelUpdateUserInfo.java 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. * Format: ch Sddddddddd
  19. * @author KenM
  20. */
  21. public class ExDuelUpdateUserInfo extends L2GameServerPacket
  22. {
  23. private static final String _S__FE_4F_EXDUELUPDATEUSERINFO = "[S] FE:50 ExDuelUpdateUserInfo";
  24. private L2PcInstance _activeChar;
  25. public ExDuelUpdateUserInfo(L2PcInstance cha)
  26. {
  27. _activeChar = cha;
  28. }
  29. /**
  30. * @see com.l2jserver.util.network.BaseSendablePacket.ServerBasePacket#writeImpl()
  31. */
  32. @Override
  33. protected void writeImpl()
  34. {
  35. writeC(0xfe);
  36. writeH(0x50);
  37. writeS(_activeChar.getName());
  38. writeD(_activeChar.getObjectId());
  39. writeD(_activeChar.getClassId().getId());
  40. writeD(_activeChar.getLevel());
  41. writeD((int)_activeChar.getCurrentHp());
  42. writeD(_activeChar.getMaxHp());
  43. writeD((int)_activeChar.getCurrentMp());
  44. writeD(_activeChar.getMaxMp());
  45. writeD((int)_activeChar.getCurrentCp());
  46. writeD(_activeChar.getMaxCp());
  47. }
  48. /**
  49. * @see com.l2jserver.gameserver.BasePacket#getType()
  50. */
  51. @Override
  52. public String getType()
  53. {
  54. return _S__FE_4F_EXDUELUPDATEUSERINFO;
  55. }
  56. }