HennaItemInfo.java 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * $Header$
  3. *
  4. *
  5. * This program is free software: you can redistribute it and/or modify it under
  6. * the terms of the GNU General Public License as published by the Free Software
  7. * Foundation, either version 3 of the License, or (at your option) any later
  8. * version.
  9. *
  10. * This program is distributed in the hope that it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  12. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  13. * details.
  14. *
  15. * You should have received a copy of the GNU General Public License along with
  16. * this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. package net.sf.l2j.gameserver.serverpackets;
  19. import net.sf.l2j.gameserver.model.L2HennaInstance;
  20. import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  21. public class HennaItemInfo extends L2GameServerPacket
  22. {
  23. private static final String _S__E3_HennaItemInfo = "[S] e4 HennaItemInfo";
  24. private L2PcInstance _activeChar;
  25. private L2HennaInstance _henna;
  26. public HennaItemInfo(L2HennaInstance henna, L2PcInstance player)
  27. {
  28. _henna = henna;
  29. _activeChar = player;
  30. }
  31. @Override
  32. protected final void writeImpl()
  33. {
  34. writeC(0xe4);
  35. writeD(_henna.getSymbolId()); //symbol Id
  36. writeD(_henna.getItemIdDye()); //item id of dye
  37. writeD(_henna.getAmountDyeRequire()); // total amount of dye require
  38. writeD(_henna.getPrice()); //total amount of aden require to draw symbol
  39. writeD(1); //able to draw or not 0 is false and 1 is true
  40. writeD(_activeChar.getAdena());
  41. writeD(_activeChar.getINT()); //current INT
  42. writeC(_activeChar.getINT()+ _henna.getStatINT()); //equip INT
  43. writeD(_activeChar.getSTR()); //current STR
  44. writeC(_activeChar.getSTR()+ _henna.getStatSTR()); //equip STR
  45. writeD(_activeChar.getCON()); //current CON
  46. writeC(_activeChar.getCON()+ _henna.getStatCON()); //equip CON
  47. writeD(_activeChar.getMEN()); //current MEM
  48. writeC(_activeChar.getMEN()+ _henna.getStatMEM()); //equip MEM
  49. writeD(_activeChar.getDEX()); //current DEX
  50. writeC(_activeChar.getDEX()+ _henna.getStatDEX()); //equip DEX
  51. writeD(_activeChar.getWIT()); //current WIT
  52. writeC(_activeChar.getWIT()+ _henna.getStatWIT()); //equip WIT
  53. }
  54. /* (non-Javadoc)
  55. * @see net.sf.l2j.gameserver.serverpackets.ServerBasePacket#getType()
  56. */
  57. @Override
  58. public String getType()
  59. {
  60. return _S__E3_HennaItemInfo;
  61. }
  62. }