RequestExCubeGameReadyAnswer.java 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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.clientpackets;
  16. import java.util.logging.Logger;
  17. /**
  18. * @author mrTJO
  19. * Format: chddd
  20. *
  21. * d: Arena
  22. * d: Answer
  23. */
  24. public final class RequestExCubeGameReadyAnswer extends L2GameClientPacket
  25. {
  26. private static final String _C__D0_5C_REQUESTEXCUBEGAMEREADYANSWER = "[C] D0:5C RequestExCubeGameReadyAnswer";
  27. private static Logger _log = Logger.getLogger(RequestExCubeGameReadyAnswer.class.getName());
  28. int _arena;
  29. int _answer;
  30. @Override
  31. protected void readImpl()
  32. {
  33. _arena = readD();
  34. _answer = readD();
  35. }
  36. @Override
  37. public void runImpl()
  38. {
  39. switch (_answer)
  40. {
  41. case 0:
  42. // Cancel
  43. break;
  44. case 1:
  45. // OK or Time Over
  46. break;
  47. default:
  48. _log.warning("Unknown Cube Game Answer ID: "+_answer);
  49. break;
  50. }
  51. }
  52. @Override
  53. public String getType()
  54. {
  55. return _C__D0_5C_REQUESTEXCUBEGAMEREADYANSWER;
  56. }
  57. }