ExBrBuffEventState.java 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. * Eva's Inferno event packet. info params: <br>
  22. * type (1 - %, 2 - npcId), <br>
  23. * value (depending on type: for type 1 - % value; for type 2 - 20573-20575), <br>
  24. * state (0-1), endtime (only when type 2)
  25. */
  26. public class ExBrBuffEventState extends L2GameServerPacket
  27. {
  28. private final int _type; // 1 - %, 2 - npcId
  29. private final int _value; // depending on type: for type 1 - % value; for type 2 - 20573-20575
  30. private final int _state; // 0-1
  31. private final int _endtime; // only when type 2 as unix time in seconds from 1970
  32. public ExBrBuffEventState(int type, int value, int state, int endtime)
  33. {
  34. _type = type;
  35. _value = value;
  36. _state = state;
  37. _endtime = endtime;
  38. }
  39. @Override
  40. protected void writeImpl()
  41. {
  42. writeC(0xFE);
  43. writeH(0xDB);
  44. writeD(_type);
  45. writeD(_value);
  46. writeD(_state);
  47. writeD(_endtime);
  48. }
  49. }