diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/commons/util/Point3D.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/commons/util/Point3D.java deleted file mode 100644 index e3488165d6..0000000000 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/commons/util/Point3D.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.l2jmobius.commons.util; - -import java.io.Serializable; - -/** - * @version $Revision: 1.2 $ $Date: 2004/06/27 08:12:59 $ - */ -public class Point3D implements Serializable -{ - private volatile int _x; - private volatile int _y; - private volatile int _z; - - public Point3D(int pX, int pY, int pZ) - { - _x = pX; - _y = pY; - _z = pZ; - } - - public Point3D(int pX, int pY) - { - _x = pX; - _y = pY; - _z = 0; - } - - /** - * @param worldPosition - */ - public Point3D(Point3D worldPosition) - { - synchronized (worldPosition) - { - _x = worldPosition._x; - _y = worldPosition._y; - _z = worldPosition._z; - } - } - - public synchronized void setTo(Point3D point) - { - synchronized (point) - { - _x = point._x; - _y = point._y; - _z = point._z; - } - } - - @Override - public String toString() - { - return "(" + _x + ", " + _y + ", " + _z + ")"; - } - - @Override - public int hashCode() - { - return _x ^ _y ^ _z; - } - - @Override - public synchronized boolean equals(Object o) - { - if (o instanceof Point3D) - { - final Point3D point3D = (Point3D) o; - boolean ret; - synchronized (point3D) - { - ret = (point3D._x == _x) && (point3D._y == _y) && (point3D._z == _z); - } - return ret; - } - return false; - } - - public synchronized boolean equals(int pX, int pY, int pZ) - { - return (_x == pX) && (_y == pY) && (_z == pZ); - } - - public synchronized long distanceSquaredTo(Point3D point) - { - long dx; - long dy; - synchronized (point) - { - dx = _x - point._x; - dy = _y - point._y; - } - return (dx * dx) + (dy * dy); - } - - public static long distanceSquared(Point3D point1, Point3D point2) - { - long dx; - long dy; - synchronized (point1) - { - synchronized (point2) - { - dx = point1._x - point2._x; - dy = point1._y - point2._y; - } - } - return (dx * dx) + (dy * dy); - } - - public static boolean distanceLessThan(Point3D point1, Point3D point2, double distance) - { - return distanceSquared(point1, point2) < (distance * distance); - } - - public synchronized int getX() - { - return _x; - } - - public synchronized void setX(int pX) - { - _x = pX; - } - - public synchronized int getY() - { - return _y; - } - - public synchronized void setY(int pY) - { - _y = pY; - } - - public synchronized int getZ() - { - return _z; - } - - public synchronized void setZ(int pZ) - { - _z = pZ; - } - - public synchronized void setXYZ(int pX, int pY, int pZ) - { - _x = pX; - _y = pY; - _z = pZ; - } -} diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/datatables/xml/FenceData.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/datatables/xml/FenceData.java index 67455eacd6..3cfdb97a4e 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/datatables/xml/FenceData.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/datatables/xml/FenceData.java @@ -32,11 +32,11 @@ import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.l2jmobius.Config; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.gameserver.enums.FenceState; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldRegion; import org.l2jmobius.gameserver.model.actor.instance.FenceInstance; +import org.l2jmobius.gameserver.model.actor.position.Location; /** * @author HoridoJoho / FBIagent @@ -127,8 +127,7 @@ public final class FenceData private void addFence(FenceInstance fence) { - final Point3D point = new Point3D(fence.getX(), fence.getY(), fence.getZ()); - + final Location point = new Location(fence.getX(), fence.getY(), fence.getZ()); _fences.put(fence.getObjectId(), fence); _regions.computeIfAbsent(World.getInstance().getRegion(point), key -> new ArrayList<>()).add(fence); } @@ -137,7 +136,7 @@ public final class FenceData { _fences.remove(fence.getObjectId()); - final Point3D point = new Point3D(fence.getX(), fence.getY(), fence.getZ()); + final Location point = new Location(fence.getX(), fence.getY(), fence.getZ()); final List fencesInRegion = _regions.get(World.getInstance().getRegion(point)); if (fencesInRegion != null) { @@ -204,8 +203,7 @@ public final class FenceData return false; }; - final Point3D point = new Point3D(x, y, z); - return _regions.getOrDefault(World.getInstance().getRegion(point), Collections.emptyList()).stream().anyMatch(filter); + return _regions.getOrDefault(World.getInstance().getRegion(new Location(x, y, z)), Collections.emptyList()).stream().anyMatch(filter); } private boolean crossLinePart(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double xMin, double yMin, double xMax, double yMax) diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/CursedWeapon.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/CursedWeapon.java index 26901f6d49..a975b1e9d9 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/CursedWeapon.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/CursedWeapon.java @@ -25,7 +25,6 @@ import java.util.logging.Logger; import org.l2jmobius.Config; import org.l2jmobius.commons.concurrent.ThreadPool; import org.l2jmobius.commons.database.DatabaseFactory; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.commons.util.Rnd; import org.l2jmobius.gameserver.datatables.SkillTable; import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager; @@ -33,6 +32,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.actor.instance.ItemInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.position.Location; import org.l2jmobius.gameserver.model.entity.event.CTF; import org.l2jmobius.gameserver.model.entity.event.DM; import org.l2jmobius.gameserver.model.entity.event.TvT; @@ -680,7 +680,7 @@ public class CursedWeapon } } - public Point3D getWorldPosition() + public Location getWorldPosition() { if (_isActivated && (_player != null)) { diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/World.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/World.java index c131a79e50..3a244ccdff 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/World.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/World.java @@ -24,7 +24,6 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.commons.util.object.L2ObjectMap; import org.l2jmobius.commons.util.object.L2ObjectSet; import org.l2jmobius.gameserver.datatables.GmListTable; @@ -33,6 +32,7 @@ import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.actor.Playable; import org.l2jmobius.gameserver.model.actor.instance.PetInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.position.Location; /** * @version $Revision: 1.21.2.5.2.7 $ $Date: 2005/03/27 15:29:32 $ @@ -862,12 +862,12 @@ public final class World *
*
  • Set position of a new WorldObject (drop, spawn...)
  • *
  • Update position of a WorldObject after a mouvement

  • - * @param point the point + * @param location the point * @return the region */ - public WorldRegion getRegion(Point3D point) + public WorldRegion getRegion(Location location) { - return _worldRegions[(point.getX() >> SHIFT_BY) + OFFSET_X][(point.getY() >> SHIFT_BY) + OFFSET_Y]; + return _worldRegions[(location.getX() >> SHIFT_BY) + OFFSET_X][(location.getY() >> SHIFT_BY) + OFFSET_Y]; } /** diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java index e2ff826f3a..ad4a85ee8c 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -30,7 +30,6 @@ import java.util.logging.Logger; import org.l2jmobius.Config; import org.l2jmobius.commons.concurrent.ThreadPool; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.commons.util.Rnd; import org.l2jmobius.gameserver.GameTimeController; import org.l2jmobius.gameserver.ai.AttackableAI; @@ -1613,7 +1612,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder boolean canCast = true; if ((skill.getTargetType() == SkillTargetType.TARGET_GROUND) && (this instanceof PlayerInstance)) { - final Point3D wp = ((PlayerInstance) this).getCurrentSkillWorldPosition(); + final Location wp = ((PlayerInstance) this).getCurrentSkillWorldPosition(); if (!region.checkEffectRangeInsidePeaceZone(skill, wp.getX(), wp.getY(), wp.getZ())) { canCast = false; diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 69643a2d6f..dcbc542e74 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -41,7 +41,6 @@ import org.l2jmobius.Config; import org.l2jmobius.commons.concurrent.ThreadPool; import org.l2jmobius.commons.crypt.nProtect; import org.l2jmobius.commons.database.DatabaseFactory; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.commons.util.Rnd; import org.l2jmobius.gameserver.GameTimeController; import org.l2jmobius.gameserver.RecipeController; @@ -370,7 +369,7 @@ public final class PlayerInstance extends Playable private SystemMessageId _noDuelReason = SystemMessageId.THERE_IS_NO_OPPONENT_TO_RECEIVE_YOUR_CHALLENGE_FOR_A_DUEL; private boolean _inBoat; private BoatInstance _boat; - private Point3D _inBoatPosition; + private Location _inBoatPosition; private int _mountType; private int _mountObjectID = 0; public int _telemode = 0; @@ -486,7 +485,7 @@ public final class PlayerInstance extends Playable private SkillDat _currentPetSkill; private SkillDat _queuedSkill; private boolean _IsWearingFormalWear = false; - private Point3D _currentSkillWorldPosition; + private Location _currentSkillWorldPosition; private int _cursedWeaponEquipedId = 0; private int _reviveRequested = 0; private double _revivePower = 0; @@ -543,7 +542,7 @@ public final class PlayerInstance extends Playable private long _fallingTimestamp = 0; private volatile int _fallingDamage = 0; private Future _fallingDamageTask = null; - private final Point3D _lastPartyPosition = new Point3D(0, 0, 0); + private final Location _lastPartyPosition = new Location(0, 0, 0); private PunishLevel _punishLevel = PunishLevel.NONE; private long _punishTimer = 0; private ScheduledFuture _punishTask; @@ -11540,9 +11539,7 @@ public final class PlayerInstance extends Playable } } - final Point3D worldPosition = getCurrentSkillWorldPosition(); - - if ((sklTargetType == SkillTargetType.TARGET_GROUND) && (worldPosition == null)) + if ((sklTargetType == SkillTargetType.TARGET_GROUND) && (getCurrentSkillWorldPosition() == null)) { LOGGER.info("WorldPosition is null for skill: " + skill.getName() + ", player: " + getName() + "."); sendPacket(ActionFailed.STATIC_PACKET); @@ -15030,18 +15027,18 @@ public final class PlayerInstance extends Playable * Gets the in boat position. * @return the in boat position */ - public Point3D getInBoatPosition() + public Location getInBoatPosition() { return _inBoatPosition; } /** * Sets the in boat position. - * @param pt the new in boat position + * @param location the new in boat location */ - public void setInBoatPosition(Point3D pt) + public void setInBoatPosition(Location location) { - _inBoatPosition = pt; + _inBoatPosition = location; } /** @@ -16583,18 +16580,18 @@ public final class PlayerInstance extends Playable * Gets the current skill world position. * @return the current skill world position */ - public Point3D getCurrentSkillWorldPosition() + public Location getCurrentSkillWorldPosition() { return _currentSkillWorldPosition; } /** * Sets the current skill world position. - * @param worldPosition the new current skill world position + * @param location the new current skill world position */ - public void setCurrentSkillWorldPosition(Point3D worldPosition) + public void setCurrentSkillWorldPosition(Location location) { - _currentSkillWorldPosition = worldPosition; + _currentSkillWorldPosition = location; } /** diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/TamedBeastInstance.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/TamedBeastInstance.java index ea05fbaa9d..e6284e6eb8 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/TamedBeastInstance.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/TamedBeastInstance.java @@ -21,13 +21,13 @@ import static org.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_IDLE; import java.util.concurrent.Future; import org.l2jmobius.commons.concurrent.ThreadPool; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.commons.util.Rnd; import org.l2jmobius.gameserver.ai.CtrlIntention; import org.l2jmobius.gameserver.datatables.SkillTable; import org.l2jmobius.gameserver.model.Skill; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.actor.position.Location; import org.l2jmobius.gameserver.network.serverpackets.NpcInfo; import org.l2jmobius.gameserver.network.serverpackets.StopMove; import org.l2jmobius.gameserver.templates.creatures.NpcTemplate; @@ -104,9 +104,9 @@ public final class TamedBeastInstance extends FeedableBeastInstance * Gets the home. * @return the home */ - public Point3D getHome() + public Location getHome() { - return new Point3D(_homeX, _homeY, _homeZ); + return new Location(_homeX, _homeY, _homeZ); } /** diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/position/ObjectPosition.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/position/ObjectPosition.java index 256bf64217..7b5dcd73d3 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/position/ObjectPosition.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/position/ObjectPosition.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.model.actor.position; import java.util.logging.Logger; import org.l2jmobius.Config; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.WorldRegion; @@ -32,7 +31,7 @@ public class ObjectPosition private final WorldObject _activeObject; private int _heading = 0; - private Point3D _worldPosition; + private Location _worldPosition; private WorldRegion _worldRegion; // Object localization : Used for items/chars that are seen in the world private Boolean _changingRegion = false; @@ -249,11 +248,11 @@ public class ObjectPosition * Gets the world position. * @return the world position */ - public final Point3D getWorldPosition() + public final Location getWorldPosition() { if (_worldPosition == null) { - _worldPosition = new Point3D(0, 0, 0); + _worldPosition = new Location(0, 0, 0); } return _worldPosition; @@ -272,11 +271,11 @@ public class ObjectPosition /** * Sets the world position. - * @param newPosition the new world position + * @param location the new world position */ - public final void setWorldPosition(Point3D newPosition) + public final void setWorldPosition(Location location) { - setWorldPosition(newPosition.getX(), newPosition.getY(), newPosition.getZ()); + setWorldPosition(location.getX(), location.getY(), location.getZ()); } /** diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/waypoint/WayPointNode.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/waypoint/WayPointNode.java index f709956498..95ccfae033 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/waypoint/WayPointNode.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/waypoint/WayPointNode.java @@ -23,11 +23,11 @@ import java.util.Map; import java.util.WeakHashMap; import org.l2jmobius.Config; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.gameserver.idfactory.IdFactory; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.position.Location; import org.l2jmobius.gameserver.network.serverpackets.MyTargetSelected; public class WayPointNode extends WorldObject @@ -68,12 +68,12 @@ public class WayPointNode extends WorldObject return spawn(isItemId ? "item" : "npc", id, player.getX(), player.getY(), player.getZ()); } - public static WayPointNode spawn(boolean isItemId, int id, Point3D point) + public static WayPointNode spawn(boolean isItemId, int id, Location point) { return spawn(isItemId ? "item" : "npc", id, point.getX(), point.getY(), point.getZ()); } - public static WayPointNode spawn(Point3D point) + public static WayPointNode spawn(Location point) { return spawn(Config.NEW_NODE_TYPE, Config.NEW_NODE_ID, point.getX(), point.getY(), point.getZ()); } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/CannotMoveAnymoreInVehicle.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/CannotMoveAnymoreInVehicle.java index 90d02f91c9..1a29b72391 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/CannotMoveAnymoreInVehicle.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/CannotMoveAnymoreInVehicle.java @@ -16,8 +16,8 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.position.Location; import org.l2jmobius.gameserver.network.serverpackets.StopMoveInVehicle; /** @@ -55,7 +55,7 @@ public final class CannotMoveAnymoreInVehicle extends GameClientPacket { if (player.getBoat().getObjectId() == _boatId) { - player.setInBoatPosition(new Point3D(_x, _y, _z)); + player.setInBoatPosition(new Location(_x, _y, _z)); player.getPosition().setHeading(_heading); player.broadcastPacket(new StopMoveInVehicle(player, _boatId)); } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestCursedWeaponLocation.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestCursedWeaponLocation.java index 160d45bf51..f77d5dfab9 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestCursedWeaponLocation.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestCursedWeaponLocation.java @@ -19,10 +19,10 @@ package org.l2jmobius.gameserver.network.clientpackets; import java.util.ArrayList; import java.util.List; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager; import org.l2jmobius.gameserver.model.CursedWeapon; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.position.Location; import org.l2jmobius.gameserver.network.serverpackets.ExCursedWeaponLocation; import org.l2jmobius.gameserver.network.serverpackets.ExCursedWeaponLocation.CursedWeaponInfo; @@ -55,11 +55,10 @@ public final class RequestCursedWeaponLocation extends GameClientPacket continue; } - final Point3D pos = cw.getWorldPosition(); - - if (pos != null) + final Location location = cw.getWorldPosition(); + if (location != null) { - list.add(new CursedWeaponInfo(pos, cw.getItemId(), cw.isActivated() ? 1 : 0)); + list.add(new CursedWeaponInfo(location, cw.getItemId(), cw.isActivated() ? 1 : 0)); } } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestExMagicSkillUseGround.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestExMagicSkillUseGround.java index a262d7ce56..18b95634e5 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestExMagicSkillUseGround.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestExMagicSkillUseGround.java @@ -16,10 +16,10 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.gameserver.datatables.SkillTable; import org.l2jmobius.gameserver.model.Skill; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.position.Location; import org.l2jmobius.gameserver.network.serverpackets.ActionFailed; import org.l2jmobius.gameserver.util.Util; @@ -68,7 +68,7 @@ public final class RequestExMagicSkillUseGround extends GameClientPacket if (skill != null) { - player.setCurrentSkillWorldPosition(new Point3D(_x, _y, _z)); + player.setCurrentSkillWorldPosition(new Location(_x, _y, _z)); // normally magicskilluse packet turns char client side but for these skills, it doesn't (even with correct target) player.setHeading(Util.calculateHeadingFrom(player.getX(), player.getY(), _x, _y)); diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestGetOnVehicle.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestGetOnVehicle.java index e0ddf68b21..50220f7536 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestGetOnVehicle.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestGetOnVehicle.java @@ -16,10 +16,10 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.gameserver.instancemanager.BoatManager; import org.l2jmobius.gameserver.model.actor.instance.BoatInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.position.Location; import org.l2jmobius.gameserver.network.serverpackets.GetOnVehicle; public final class RequestGetOnVehicle extends GameClientPacket @@ -55,7 +55,7 @@ public final class RequestGetOnVehicle extends GameClientPacket } final GetOnVehicle Gon = new GetOnVehicle(player, boat, _x, _y, _z); - player.setInBoatPosition(new Point3D(_x, _y, _z)); + player.setInBoatPosition(new Location(_x, _y, _z)); player.getPosition().setXYZ(boat.getPosition().getX(), boat.getPosition().getY(), boat.getPosition().getZ()); player.broadcastPacket(Gon); player.revalidateZone(true); diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestMoveToLocationInVehicle.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestMoveToLocationInVehicle.java index 35a86b14c6..6fbf3f2fdb 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestMoveToLocationInVehicle.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestMoveToLocationInVehicle.java @@ -16,7 +16,6 @@ */ package org.l2jmobius.gameserver.network.clientpackets; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.gameserver.ai.CtrlIntention; import org.l2jmobius.gameserver.instancemanager.BoatManager; import org.l2jmobius.gameserver.model.actor.instance.BoatInstance; @@ -28,8 +27,8 @@ import org.l2jmobius.gameserver.thread.TaskPriority; public final class RequestMoveToLocationInVehicle extends GameClientPacket { - private final Point3D _pos = new Point3D(0, 0, 0); - private final Point3D _origin_pos = new Point3D(0, 0, 0); + private final Location _pos = new Location(0, 0, 0); + private final Location _origin_pos = new Location(0, 0, 0); private int _boatId; public TaskPriority getPriority() diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ExCursedWeaponLocation.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ExCursedWeaponLocation.java index 795f1e556f..4348079ed3 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ExCursedWeaponLocation.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/ExCursedWeaponLocation.java @@ -18,7 +18,7 @@ package org.l2jmobius.gameserver.network.serverpackets; import java.util.List; -import org.l2jmobius.commons.util.Point3D; +import org.l2jmobius.gameserver.model.actor.position.Location; /** * Format: (ch) d[ddddd]. @@ -52,9 +52,9 @@ public class ExCursedWeaponLocation extends GameServerPacket writeD(w.id); writeD(w.activated); - writeD(w.pos.getX()); - writeD(w.pos.getY()); - writeD(w.pos.getZ()); + writeD(w.loc.getX()); + writeD(w.loc.getY()); + writeD(w.loc.getZ()); } } else @@ -69,8 +69,8 @@ public class ExCursedWeaponLocation extends GameServerPacket */ public static class CursedWeaponInfo { - /** The pos. */ - public Point3D pos; + /** The location. */ + public Location loc; /** The id. */ public int id; @@ -80,13 +80,13 @@ public class ExCursedWeaponLocation extends GameServerPacket /** * Instantiates a new cursed weapon info. - * @param p the p + * @param location the Location * @param ID the iD * @param status the status */ - public CursedWeaponInfo(Point3D p, int ID, int status) + public CursedWeaponInfo(Location location, int ID, int status) { - pos = p; + loc = location; id = ID; activated = status; } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/skills/effects/EffectSignetMDam.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/skills/effects/EffectSignetMDam.java index 131a02ec5e..0a942d883f 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/skills/effects/EffectSignetMDam.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/skills/effects/EffectSignetMDam.java @@ -19,7 +19,6 @@ package org.l2jmobius.gameserver.skills.effects; import java.util.ArrayList; import java.util.List; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.gameserver.ai.CtrlEvent; import org.l2jmobius.gameserver.datatables.sql.NpcTable; import org.l2jmobius.gameserver.idfactory.IdFactory; @@ -32,6 +31,7 @@ import org.l2jmobius.gameserver.model.actor.Playable; import org.l2jmobius.gameserver.model.actor.Summon; import org.l2jmobius.gameserver.model.actor.instance.EffectPointInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.position.Location; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillLaunched; import org.l2jmobius.gameserver.skills.Env; @@ -84,8 +84,7 @@ public final class EffectSignetMDam extends Effect if ((getEffector() instanceof PlayerInstance) && (getSkill().getTargetType() == Skill.SkillTargetType.TARGET_GROUND)) { - final Point3D wordPosition = ((PlayerInstance) getEffector()).getCurrentSkillWorldPosition(); - + final Location wordPosition = ((PlayerInstance) getEffector()).getCurrentSkillWorldPosition(); if (wordPosition != null) { x = wordPosition.getX(); diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/skills/handlers/SkillSignet.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/skills/handlers/SkillSignet.java index bf28764b76..65f47fdad6 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/skills/handlers/SkillSignet.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/skills/handlers/SkillSignet.java @@ -16,7 +16,6 @@ */ package org.l2jmobius.gameserver.skills.handlers; -import org.l2jmobius.commons.util.Point3D; import org.l2jmobius.gameserver.datatables.sql.NpcTable; import org.l2jmobius.gameserver.idfactory.IdFactory; import org.l2jmobius.gameserver.model.Skill; @@ -25,6 +24,7 @@ import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Creature; import org.l2jmobius.gameserver.model.actor.instance.EffectPointInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.position.Location; import org.l2jmobius.gameserver.templates.StatsSet; import org.l2jmobius.gameserver.templates.creatures.NpcTemplate; @@ -60,8 +60,7 @@ public final class SkillSignet extends Skill if ((caster instanceof PlayerInstance) && (getTargetType() == Skill.SkillTargetType.TARGET_GROUND)) { - final Point3D wordPosition = ((PlayerInstance) caster).getCurrentSkillWorldPosition(); - + final Location wordPosition = ((PlayerInstance) caster).getCurrentSkillWorldPosition(); if (wordPosition != null) { x = wordPosition.getX();