MoveToLocation.java 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. * 0000: 01 7a 73 10 4c b2 0b 00 00 a3 fc 00 00 e8 f1 ff .zs.L...........
  19. * 0010: ff bd 0b 00 00 b3 fc 00 00 e8 f1 ff ff .............
  20. *
  21. * ddddddd
  22. *
  23. * @version $Revision: 1.3.4.3 $ $Date: 2005/03/27 15:29:57 $
  24. */
  25. public final class MoveToLocation extends L2GameServerPacket
  26. {
  27. private static final String _S__01_CHARMOVETOLOCATION = "[S] 2f MoveToLocation";
  28. private int _charObjId, _x, _y, _z, _xDst, _yDst, _zDst;
  29. public MoveToLocation(L2Character cha)
  30. {
  31. _charObjId = cha.getObjectId();
  32. _x = cha.getX();
  33. _y = cha.getY();
  34. _z = cha.getZ();
  35. _xDst = cha.getXdestination();
  36. _yDst = cha.getYdestination();
  37. _zDst = cha.getZdestination();
  38. }
  39. @Override
  40. protected final void writeImpl()
  41. {
  42. writeC(0x2f);
  43. writeD(_charObjId);
  44. writeD(_xDst);
  45. writeD(_yDst);
  46. writeD(_zDst);
  47. writeD(_x);
  48. writeD(_y);
  49. writeD(_z);
  50. }
  51. /* (non-Javadoc)
  52. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
  53. */
  54. @Override
  55. public String getType()
  56. {
  57. return _S__01_CHARMOVETOLOCATION;
  58. }
  59. }