ExBrBroadcastEventState.java 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * Copyright (C) 2004-2015 L2J Server
  3. *
  4. * This file is part of L2J Server.
  5. *
  6. * L2J Server is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * L2J Server is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package com.l2jserver.gameserver.network.serverpackets;
  20. /**
  21. * Special event info packet.
  22. * @author Kerberos
  23. * @author mrTJO
  24. */
  25. public class ExBrBroadcastEventState extends L2GameServerPacket
  26. {
  27. private final int _eventId;
  28. private final int _eventState;
  29. private int _param0;
  30. private int _param1;
  31. private int _param2;
  32. private int _param3;
  33. private int _param4;
  34. private String _param5;
  35. private String _param6;
  36. public static final int APRIL_FOOLS = 20090401;
  37. public static final int EVAS_INFERNO = 20090801; // event state (0 - hide, 1 - show), day (1-14), percent (0-100)
  38. public static final int HALLOWEEN_EVENT = 20091031; // event state (0 - hide, 1 - show)
  39. public static final int RAISING_RUDOLPH = 20091225; // event state (0 - hide, 1 - show)
  40. public static final int LOVERS_JUBILEE = 20100214; // event state (0 - hide, 1 - show)
  41. public ExBrBroadcastEventState(int eventId, int eventState)
  42. {
  43. _eventId = eventId;
  44. _eventState = eventState;
  45. }
  46. public ExBrBroadcastEventState(int eventId, int eventState, int param0, int param1, int param2, int param3, int param4, String param5, String param6)
  47. {
  48. _eventId = eventId;
  49. _eventState = eventState;
  50. _param0 = param0;
  51. _param1 = param1;
  52. _param2 = param2;
  53. _param3 = param3;
  54. _param4 = param4;
  55. _param5 = param5;
  56. _param6 = param6;
  57. }
  58. @Override
  59. protected final void writeImpl()
  60. {
  61. writeC(0xFE);
  62. writeH(0xBC);
  63. writeD(_eventId);
  64. writeD(_eventState);
  65. writeD(_param0);
  66. writeD(_param1);
  67. writeD(_param2);
  68. writeD(_param3);
  69. writeD(_param4);
  70. writeS(_param5);
  71. writeS(_param6);
  72. }
  73. }