ExFishingStartCombat.java 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. import com.l2jserver.gameserver.model.actor.L2Character;
  17. /**
  18. * Format (ch)dddcc
  19. * @author -Wooden-
  20. *
  21. */
  22. public class ExFishingStartCombat extends L2GameServerPacket
  23. {
  24. private static final String _S__FE_15_EXFISHINGSTARTCOMBAT = "[S] FE:27 ExFishingStartCombat";
  25. private L2Character _activeChar;
  26. private int _time,_hp;
  27. private int _lureType, _deceptiveMode, _mode;
  28. public ExFishingStartCombat(L2Character character, int time, int hp, int mode, int lureType, int deceptiveMode)
  29. {
  30. _activeChar = character;
  31. _time = time;
  32. _hp = hp;
  33. _mode = mode;
  34. _lureType = lureType;
  35. _deceptiveMode = deceptiveMode;
  36. }
  37. /* (non-Javadoc)
  38. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#writeImpl()
  39. */
  40. @Override
  41. protected void writeImpl()
  42. {
  43. writeC(0xfe);
  44. writeH(0x27);
  45. writeD(_activeChar.getObjectId());
  46. writeD(_time);
  47. writeD(_hp);
  48. writeC(_mode); // mode: 0 = resting, 1 = fighting
  49. writeC(_lureType); // 0 = newbie lure, 1 = normal lure, 2 = night lure
  50. writeC(_deceptiveMode); // Fish Deceptive Mode: 0 = no, 1 = yes
  51. }
  52. /* (non-Javadoc)
  53. * @see com.l2jserver.gameserver.BasePacket#getType()
  54. */
  55. @Override
  56. public String getType()
  57. {
  58. return _S__FE_15_EXFISHINGSTARTCOMBAT;
  59. }
  60. }