GeoNodeLoc.java 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 net.sf.l2j.gameserver.pathfinding.geonodes;
  16. import net.sf.l2j.gameserver.model.L2World;
  17. import net.sf.l2j.gameserver.pathfinding.AbstractNodeLoc;
  18. /**
  19. *
  20. * @author -Nemesiss-
  21. */
  22. public class GeoNodeLoc extends AbstractNodeLoc
  23. {
  24. private final short _x;
  25. private final short _y;
  26. private final short _z;
  27. public GeoNodeLoc(short x, short y, short z)
  28. {
  29. _x = x;
  30. _y = y;
  31. _z = z;
  32. }
  33. /**
  34. * @see net.sf.l2j.gameserver.pathfinding.AbstractNodeLoc#getX()
  35. */
  36. @Override
  37. public int getX()
  38. {
  39. return L2World.MAP_MIN_X + _x * 128 + 48 ;
  40. }
  41. /**
  42. * @see net.sf.l2j.gameserver.pathfinding.AbstractNodeLoc#getY()
  43. */
  44. @Override
  45. public int getY()
  46. {
  47. return L2World.MAP_MIN_Y + _y * 128 + 48 ;
  48. }
  49. /**
  50. * @see net.sf.l2j.gameserver.pathfinding.AbstractNodeLoc#getZ()
  51. */
  52. @Override
  53. public short getZ()
  54. {
  55. return _z;
  56. }
  57. @Override
  58. public void setZ(short z)
  59. {
  60. //
  61. }
  62. @Override
  63. public int getNodeX()
  64. {
  65. return _x;
  66. }
  67. @Override
  68. public int getNodeY()
  69. {
  70. return _y;
  71. }
  72. }