MoveToPawn.java 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. *
  19. * 0000: 75 7a 07 80 49 63 27 00 4a ea 01 00 00 c1 37 fe uz..Ic'.J.....7. <p>
  20. * 0010: ff 9e c3 03 00 8f f3 ff ff .........<p>
  21. * <p>
  22. *
  23. * format dddddd (player id, target id, distance, startx, starty, startz)<p>
  24. *
  25. *
  26. * @version $Revision: 1.3.2.1.2.5 $ $Date: 2005/04/06 16:13:46 $
  27. */
  28. public class MoveToPawn extends L2GameServerPacket
  29. {
  30. private static final String _S__75_MOVETOPAWN = "[S] 72 MoveToPawn";
  31. private int _charObjId;
  32. private int _targetId;
  33. private int _distance;
  34. private int _x, _y, _z,_tx,_ty,_tz;
  35. public MoveToPawn(L2Character cha, L2Character target, int distance)
  36. {
  37. _charObjId = cha.getObjectId();
  38. _targetId = target.getObjectId();
  39. _distance = distance;
  40. _x = cha.getX();
  41. _y = cha.getY();
  42. _z = cha.getZ();
  43. _tx = target.getX();
  44. _ty = target.getY();
  45. _tz = target.getZ();
  46. }
  47. @Override
  48. protected final void writeImpl()
  49. {
  50. writeC(0x72);
  51. writeD(_charObjId);
  52. writeD(_targetId);
  53. writeD(_distance);
  54. writeD(_x);
  55. writeD(_y);
  56. writeD(_z);
  57. writeD(_tx);
  58. writeD(_ty);
  59. writeD(_tz);
  60. }
  61. /* (non-Javadoc)
  62. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
  63. */
  64. @Override
  65. public String getType()
  66. {
  67. return _S__75_MOVETOPAWN;
  68. }
  69. }