ValidateLocation.java 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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: 76 7a 07 80 49 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.1.2.1.2.3 $ $Date: 2005/03/27 15:29:57 $
  27. */
  28. public class ValidateLocation extends L2GameServerPacket
  29. {
  30. private static final String _S__76_SETTOLOCATION = "[S] 79 ValidateLocation";
  31. private int _charObjId;
  32. private int _x, _y, _z, _heading;
  33. public ValidateLocation(L2Character cha)
  34. {
  35. _charObjId = cha.getObjectId();
  36. _x = cha.getX();
  37. _y = cha.getY();
  38. _z = cha.getZ();
  39. _heading = cha.getHeading();
  40. }
  41. @Override
  42. protected final void writeImpl()
  43. {
  44. writeC(0x79);
  45. writeD(_charObjId);
  46. writeD(_x);
  47. writeD(_y);
  48. writeD(_z);
  49. writeD(_heading);
  50. }
  51. /* (non-Javadoc)
  52. * @see com.l2jserver.gameserver.serverpackets.ServerBasePacket#getType()
  53. */
  54. @Override
  55. public String getType()
  56. {
  57. return _S__76_SETTOLOCATION;
  58. }
  59. }