ExBrBuffEventState.java 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. * Eva's Inferno event packet.
  18. * Format: (ch)dddd // time info params: type (1 - %, 2 - npcId), value (depending on type: for type 1 - % value; for type 2 - 20573-20575), state (0-1), endtime (only when type 2)
  19. *
  20. */
  21. public class ExBrBuffEventState extends L2GameServerPacket
  22. {
  23. private int _type; // 1 - %, 2 - npcId
  24. private int _value; // depending on type: for type 1 - % value; for type 2 - 20573-20575
  25. private int _state; // 0-1
  26. private int _endtime; // only when type 2 as unix time in seconds from 1970
  27. public ExBrBuffEventState(int type, int value, int state, int endtime)
  28. {
  29. _type = type;
  30. _value = value;
  31. _state = state;
  32. _endtime = endtime;
  33. }
  34. /* (non-Javadoc)
  35. * @see com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket#getType()
  36. */
  37. @Override
  38. public String getType()
  39. {
  40. return "[S] FE:BF ExBrBuffEventState";
  41. }
  42. /* (non-Javadoc)
  43. * @see com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket#writeImpl()
  44. */
  45. @Override
  46. protected void writeImpl()
  47. {
  48. writeC(0xfe);
  49. writeH(0xbf);
  50. writeD(_type);
  51. writeD(_value);
  52. writeD(_state);
  53. writeD(_endtime);
  54. }
  55. }