StopMove.java 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 ddddd
  19. *
  20. * sample
  21. * 0000: 59 1a 95 20 48 44 17 02 00 03 f0 fc ff 98 f1 ff Y.. HD..........
  22. * 0010: ff c1 1a 00 00 .....
  23. *
  24. * @version $Revision: 1.3.2.1.2.3 $ $Date: 2005/03/27 15:29:57 $
  25. */
  26. public final class StopMove extends L2GameServerPacket
  27. {
  28. private static final String _S__59_STOPMOVE = "[S] 47 StopMove";
  29. private int _objectId;
  30. private int _x;
  31. private int _y;
  32. private int _z;
  33. private int _heading;
  34. public StopMove(L2Character cha)
  35. {
  36. this(cha.getObjectId(), cha.getX(), cha.getY(), cha.getZ(), cha.getHeading());
  37. }
  38. /**
  39. * @param _characters
  40. */
  41. public StopMove(int objectId, int x, int y, int z, int heading)
  42. {
  43. _objectId = objectId;
  44. _x = x;
  45. _y = y;
  46. _z = z;
  47. _heading = heading;
  48. }
  49. @Override
  50. protected final void writeImpl()
  51. {
  52. writeC(0x47);
  53. writeD(_objectId);
  54. writeD(_x);
  55. writeD(_y);
  56. writeD(_z);
  57. writeD(_heading);
  58. }
  59. /* (non-Javadoc)
  60. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
  61. */
  62. @Override
  63. public String getType()
  64. {
  65. return _S__59_STOPMOVE;
  66. }
  67. }