2
0

ExCubeGameExtendedChangePoints.java 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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: (chd) dddddd
  19. * d: time left
  20. * d: blue points
  21. * d: red points
  22. * d: team
  23. * d: player object id
  24. * d: player points
  25. * @author mrTJO
  26. *
  27. */
  28. public class ExCubeGameExtendedChangePoints extends L2GameServerPacket
  29. {
  30. private static final String _S__FE_98_00_EXCUBEGAMEEXTENDEDCHANGEPOINTS = "[S] FE:98:00 ExCubeGameExtendedChangePoints";
  31. int _timeLeft;
  32. int _bluePoints;
  33. int _redPoints;
  34. boolean _isRedTeam;
  35. L2PcInstance _player;
  36. int _playerPoints;
  37. public ExCubeGameExtendedChangePoints(int timeLeft, int bluePoints, int redPoints,
  38. boolean isRedTeam, L2PcInstance player, int playerPoints)
  39. {
  40. _timeLeft = timeLeft;
  41. _bluePoints = bluePoints;
  42. _redPoints = redPoints;
  43. _isRedTeam = isRedTeam;
  44. _player = player;
  45. _playerPoints = playerPoints;
  46. }
  47. /* (non-Javadoc)
  48. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#writeImpl()
  49. */
  50. @Override
  51. protected void writeImpl()
  52. {
  53. writeC(0xfe);
  54. writeH(0x98);
  55. writeD(0x00);
  56. writeD(_timeLeft);
  57. writeD(_bluePoints);
  58. writeD(_redPoints);
  59. writeD(_isRedTeam ? 0x01 : 0x00);
  60. writeD(_player.getObjectId());
  61. writeD(_playerPoints);
  62. }
  63. /* (non-Javadoc)
  64. * @see com.l2jserver.gameserver.BasePacket#getType()
  65. */
  66. @Override
  67. public String getType()
  68. {
  69. return _S__FE_98_00_EXCUBEGAMEEXTENDEDCHANGEPOINTS;
  70. }
  71. }