ExVoteSystemInfo.java 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. import com.l2jserver.gameserver.model.entity.RecoBonus;
  18. /**
  19. ** @author Gnacik
  20. **
  21. */
  22. public class ExVoteSystemInfo extends L2GameServerPacket
  23. {
  24. private int _recomLeft;
  25. private int _recomHave;
  26. private int _bonusTime;
  27. private int _bonusVal;
  28. private int _bonusType;
  29. public ExVoteSystemInfo(L2PcInstance player)
  30. {
  31. _recomLeft = player.getRecomLeft();
  32. _recomHave = player.getRecomHave();
  33. _bonusTime = player.getRecomBonusTime();
  34. _bonusVal = RecoBonus.getRecoBonus(player);
  35. _bonusType = player.getRecomBonusType();
  36. }
  37. @Override
  38. protected void writeImpl()
  39. {
  40. writeC(0xFE);
  41. writeH(0xC8);
  42. writeD(_recomLeft);
  43. writeD(_recomHave);
  44. writeD(_bonusTime);
  45. writeD(_bonusVal);
  46. writeD(_bonusType);
  47. }
  48. @Override
  49. public String getType()
  50. {
  51. return "[S] FE:C8 ExVoteSystemInfo";
  52. }
  53. }