Location.java 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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.model;
  16. import com.l2jserver.gameserver.model.actor.L2Character;
  17. /**
  18. * This class ...
  19. *
  20. * @version $Revision: 1.1.4.1 $ $Date: 2005/03/27 15:29:33 $
  21. */
  22. public final class Location
  23. {
  24. private int _x;
  25. private int _y;
  26. private int _z;
  27. private int _heading;
  28. public Location(int x, int y, int z)
  29. {
  30. _x = x;
  31. _y = y;
  32. _z = z;
  33. }
  34. public Location(L2Object obj)
  35. {
  36. _x = obj.getX();
  37. _y = obj.getY();
  38. _z = obj.getZ();
  39. }
  40. public Location(L2Character obj)
  41. {
  42. _x = obj.getX();
  43. _y = obj.getY();
  44. _z = obj.getZ();
  45. _heading = obj.getHeading();
  46. }
  47. public Location(int x, int y, int z, int heading)
  48. {
  49. _x = x;
  50. _y = y;
  51. _z = z;
  52. _heading = heading;
  53. }
  54. public int getX()
  55. {
  56. return _x;
  57. }
  58. public int getY()
  59. {
  60. return _y;
  61. }
  62. public int getZ()
  63. {
  64. return _z;
  65. }
  66. public int getHeading()
  67. {
  68. return _heading;
  69. }
  70. }