ExBrBroadcastEventState.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. * Special event info packet.
  18. * @author Kerberos
  19. * @author mrTJO
  20. * Format: (ch)dddddddSS
  21. */
  22. public class ExBrBroadcastEventState extends L2GameServerPacket
  23. {
  24. private int _eventId;
  25. private int _eventState;
  26. private int _param0;
  27. private int _param1;
  28. private int _param2;
  29. private int _param3;
  30. private int _param4;
  31. private String _param5;
  32. private String _param6;
  33. public static final int APRIL_FOOLS = 20090401;
  34. public static final int EVAS_INFERNO = 20090801; // event state (0 - hide, 1 - show), day (1-14), percent (0-100)
  35. public static final int HALLOWEEN_EVENT = 20091031; // event state (0 - hide, 1 - show)
  36. public static final int RAISING_RUDOLPH = 20091225; // event state (0 - hide, 1 - show)
  37. public static final int LOVERS_JUBILEE = 20100214; // event state (0 - hide, 1 - show)
  38. public ExBrBroadcastEventState(int eventId, int eventState)
  39. {
  40. _eventId = eventId;
  41. _eventState = eventState;
  42. }
  43. public ExBrBroadcastEventState(int eventId, int eventState, int param0, int param1, int param2, int param3, int param4, String param5, String param6)
  44. {
  45. _eventId = eventId;
  46. _eventState = eventState;
  47. _param0 = param0;
  48. _param1 = param1;
  49. _param2 = param2;
  50. _param3 = param3;
  51. _param4 = param4;
  52. _param5 = param5;
  53. _param6 = param6;
  54. }
  55. @Override
  56. protected final void writeImpl()
  57. {
  58. writeC(0xfe);
  59. writeH(0xbd);
  60. writeD(_eventId);
  61. writeD(_eventState);
  62. writeD(_param0);
  63. writeD(_param1);
  64. writeD(_param2);
  65. writeD(_param3);
  66. writeD(_param4);
  67. writeS(_param5);
  68. writeS(_param6);
  69. }
  70. /* (non-Javadoc)
  71. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
  72. */
  73. @Override
  74. public String getType()
  75. {
  76. return "[S] FE:BD ExBrBroadcastEventState";
  77. }
  78. }