ExFishingStart.java 1.9 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)ddddd
  19. * @author -Wooden-
  20. *
  21. */
  22. public class ExFishingStart extends L2GameServerPacket
  23. {
  24. private static final String _S__FE_13_EXFISHINGSTART = "[S] FE:1e ExFishingStart";
  25. private L2Character _activeChar;
  26. private int _x,_y,_z, _fishType;
  27. private boolean _isNightLure;
  28. public ExFishingStart(L2Character character, int fishType, int x, int y,int z, boolean isNightLure)
  29. {
  30. _activeChar = character;
  31. _fishType = fishType;
  32. _x = x;
  33. _y = y;
  34. _z = z;
  35. _isNightLure = isNightLure;
  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(0x1e);
  45. writeD(_activeChar.getObjectId());
  46. writeD(_fishType); // fish type
  47. writeD(_x); // x position
  48. writeD(_y); // y position
  49. writeD(_z); // z position
  50. writeC(_isNightLure ? 0x01 : 0x00); // night lure
  51. writeC(0x00); //show fish rank result button
  52. }
  53. /* (non-Javadoc)
  54. * @see com.l2jserver.gameserver.BasePacket#getType()
  55. */
  56. @Override
  57. public String getType()
  58. {
  59. return _S__FE_13_EXFISHINGSTART;
  60. }
  61. }