2
0

SetupGauge.java 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. *
  18. *
  19. * sample
  20. * 0000: 85 00 00 00 00 f0 1a 00 00
  21. *
  22. * @version $Revision: 1.4.2.1.2.3 $ $Date: 2005/03/27 15:29:39 $
  23. */
  24. public final class SetupGauge extends L2GameServerPacket
  25. {
  26. private static final String _S__85_SETUPGAUGE = "[S] 6b SetupGauge";
  27. public static final int BLUE = 0;
  28. public static final int RED = 1;
  29. public static final int CYAN = 2;
  30. private int _dat1;
  31. private int _time;
  32. private int _time2;
  33. public SetupGauge(int dat1, int time)
  34. {
  35. _dat1 = dat1;// color 0-blue 1-red 2-cyan 3-green
  36. _time = time;
  37. _time2 = time;
  38. }
  39. public SetupGauge (int color, int currentTime, int maxTime)
  40. {
  41. _dat1 = color;// color 0-blue 1-red 2-cyan 3-green
  42. _time = currentTime;
  43. _time2 = maxTime;
  44. }
  45. @Override
  46. protected final void writeImpl()
  47. {
  48. writeC(0x6b);
  49. writeD(_dat1);
  50. writeD(_time);
  51. writeD(_time2);
  52. }
  53. /* (non-Javadoc)
  54. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
  55. */
  56. @Override
  57. public String getType()
  58. {
  59. return _S__85_SETUPGAUGE;
  60. }
  61. }