Replaced obsolete Point3D class with Location.
This commit is contained in:
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
@@ -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<FenceInstance> 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)
|
||||
|
@@ -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))
|
||||
{
|
||||
|
@@ -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
|
||||
* <BR>
|
||||
* <li>Set position of a new WorldObject (drop, spawn...)</li>
|
||||
* <li>Update position of a WorldObject after a mouvement</li><BR>
|
||||
* @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];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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());
|
||||
}
|
||||
|
@@ -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));
|
||||
}
|
||||
|
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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));
|
||||
|
@@ -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);
|
||||
|
@@ -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()
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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();
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user