ExCubeGameChangePoints.java 1.8 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. /**
  17. * Format: (chd) ddd
  18. * d: Time Left
  19. * d: Blue Points
  20. * d: Red Points
  21. *
  22. * @author mrTJO
  23. */
  24. public class ExCubeGameChangePoints extends L2GameServerPacket
  25. {
  26. private static final String _S__FE_98_02_EXCUBEGAMECHANGEPOINTS = "[S] FE:98:02 ExCubeGameChangePoints";
  27. int _timeLeft;
  28. int _bluePoints;
  29. int _redPoints;
  30. /**
  31. * Change Client Point Counter
  32. *
  33. * @param timeLeft Time Left before Minigame's End
  34. * @param bluePoints Current Blue Team Points
  35. * @param redPoints Current Red Team Points
  36. */
  37. public ExCubeGameChangePoints(int timeLeft, int bluePoints, int redPoints)
  38. {
  39. _timeLeft = timeLeft;
  40. _bluePoints = bluePoints;
  41. _redPoints = redPoints;
  42. }
  43. /* (non-Javadoc)
  44. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#writeImpl()
  45. */
  46. @Override
  47. protected void writeImpl()
  48. {
  49. writeC(0xfe);
  50. writeH(0x98);
  51. writeD(0x02);
  52. writeD(_timeLeft);
  53. writeD(_bluePoints);
  54. writeD(_redPoints);
  55. }
  56. /* (non-Javadoc)
  57. * @see com.l2jserver.gameserver.BasePacket#getType()
  58. */
  59. @Override
  60. public String getType()
  61. {
  62. return _S__FE_98_02_EXCUBEGAMECHANGEPOINTS;
  63. }
  64. }