1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-09 08:52:51 +00:00

Base AI, new Cache system, DAO changes and better geometry handling

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-27 02:49:15 -03:00
parent aabe375b49
commit 73f51e53c0
95 changed files with 3079 additions and 1884 deletions

View File

@@ -28,7 +28,7 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import com.l2jserver.model.id.template.ItemTemplateID;
import com.l2jserver.model.id.template.TeleportationTemplateID;
import com.l2jserver.util.dimensional.Coordinate;
import com.l2jserver.util.geometry.Coordinate;
import com.l2jserver.util.jaxb.CoordinateAdapter;
import com.l2jserver.util.jaxb.ItemTemplateIDAdapter;
import com.l2jserver.util.jaxb.TeleportationTemplateIDAdapter;

View File

@@ -31,7 +31,7 @@ import com.l2jserver.model.world.character.CharacterFriendList;
import com.l2jserver.model.world.character.CharacterInventory;
import com.l2jserver.model.world.character.CharacterShortcutContainer;
import com.l2jserver.model.world.character.CharacterStats;
import com.l2jserver.util.dimensional.Point;
import com.l2jserver.util.geometry.Point3D;
/**
* This class represents a playable character in Lineage II world.
@@ -179,7 +179,7 @@ public class L2Character extends Player {
/**
* The point the player is moving, teleporting etc...
*/
private transient Point targetLocation;
private transient Point3D targetLocation;
/**
* Creates a new instance
@@ -502,7 +502,7 @@ public class L2Character extends Player {
/**
* @return the targetLocation
*/
public Point getTargetLocation() {
public Point3D getTargetLocation() {
return targetLocation;
}
@@ -510,7 +510,7 @@ public class L2Character extends Player {
* @param targetLocation
* the targetLocation to set
*/
public void setTargetLocation(Point targetLocation) {
public void setTargetLocation(Point3D targetLocation) {
this.targetLocation = targetLocation;
}

View File

@@ -16,8 +16,8 @@
*/
package com.l2jserver.model.world;
import com.l2jserver.util.dimensional.Coordinate;
import com.l2jserver.util.dimensional.Point;
import com.l2jserver.util.geometry.Coordinate;
import com.l2jserver.util.geometry.Point3D;
/**
* This is an abstract object that objects that can be placed in world should
@@ -29,12 +29,12 @@ public abstract class PositionableObject extends AbstractObject {
/**
* The point this object is currently in
*/
private Point point;
private Point3D point;
/**
* @return the coordinate point
*/
public Point getPoint() {
public Point3D getPoint() {
return point;
}
@@ -42,7 +42,7 @@ public abstract class PositionableObject extends AbstractObject {
* @param point
* the coordinate point to set
*/
public void setPoint(Point point) {
public void setPoint(Point3D point) {
this.point = point;
}
@@ -51,6 +51,6 @@ public abstract class PositionableObject extends AbstractObject {
}
public void setPosition(Coordinate coord) {
this.point = new Point(coord, (point != null ? point.getAngle() : 0));
this.point = new Point3D(coord, (point != null ? point.getAngle() : 0));
}
}

View File

@@ -20,7 +20,7 @@ import com.l2jserver.model.id.ObjectID;
import com.l2jserver.model.world.Actor;
import com.l2jserver.model.world.WorldObject;
import com.l2jserver.model.world.event.SpawnEvent;
import com.l2jserver.util.dimensional.Point;
import com.l2jserver.util.geometry.Point3D;
/**
* Event dispatcher once an actor has spawned in the world
@@ -35,7 +35,7 @@ public class ActorSpawnEvent implements ActorEvent, SpawnEvent {
/**
* The spawning point
*/
private final Point point;
private final Point3D point;
/**
* Creates a new instance
@@ -45,7 +45,7 @@ public class ActorSpawnEvent implements ActorEvent, SpawnEvent {
* @param point
* the spawn point
*/
public ActorSpawnEvent(Actor actor, Point point) {
public ActorSpawnEvent(Actor actor, Point3D point) {
this.actor = actor;
this.point = point;
}
@@ -61,7 +61,7 @@ public class ActorSpawnEvent implements ActorEvent, SpawnEvent {
}
@Override
public Point getPoint() {
public Point3D getPoint() {
return point;
}

View File

@@ -21,7 +21,7 @@ import com.l2jserver.model.world.Actor;
import com.l2jserver.model.world.L2Character;
import com.l2jserver.model.world.Player;
import com.l2jserver.model.world.WorldObject;
import com.l2jserver.util.dimensional.Point;
import com.l2jserver.util.geometry.Point3D;
/**
* Event triggered once a character moves
@@ -36,7 +36,7 @@ public class CharacterMoveEvent implements CharacterEvent {
/**
* The old point of the character
*/
private final Point point;
private final Point3D point;
/**
* Creates a new instance
@@ -46,7 +46,7 @@ public class CharacterMoveEvent implements CharacterEvent {
* @param point
* the character point before moving
*/
public CharacterMoveEvent(L2Character character, Point point) {
public CharacterMoveEvent(L2Character character, Point3D point) {
this.character = character;
this.point = point;
}
@@ -54,7 +54,7 @@ public class CharacterMoveEvent implements CharacterEvent {
/**
* @return the old point
*/
public Point getPoint() {
public Point3D getPoint() {
return point;
}

View File

@@ -21,7 +21,7 @@ import com.l2jserver.model.world.Actor;
import com.l2jserver.model.world.L2Character;
import com.l2jserver.model.world.Player;
import com.l2jserver.model.world.WorldObject;
import com.l2jserver.util.dimensional.Point;
import com.l2jserver.util.geometry.Point3D;
/**
* Event triggered once a character moves
@@ -36,7 +36,7 @@ public class CharacterStopMoveEvent implements CharacterEvent {
/**
* The new point of the character
*/
private final Point point;
private final Point3D point;
/**
* Creates a new instance
@@ -46,7 +46,7 @@ public class CharacterStopMoveEvent implements CharacterEvent {
* @param point
* the character point
*/
public CharacterStopMoveEvent(L2Character character, Point point) {
public CharacterStopMoveEvent(L2Character character, Point3D point) {
this.character = character;
this.point = point;
}
@@ -54,7 +54,7 @@ public class CharacterStopMoveEvent implements CharacterEvent {
/**
* @return the point
*/
public Point getPoint() {
public Point3D getPoint() {
return point;
}

View File

@@ -17,7 +17,7 @@
package com.l2jserver.model.world.event;
import com.l2jserver.service.game.world.event.WorldEvent;
import com.l2jserver.util.dimensional.Point;
import com.l2jserver.util.geometry.Point3D;
/**
* Event for objects spawning
@@ -28,5 +28,5 @@ public interface SpawnEvent extends WorldEvent {
/**
* @return the spawning point
*/
Point getPoint();
Point3D getPoint();
}

View File

@@ -18,7 +18,7 @@ package com.l2jserver.model.world.npc.event;
import com.l2jserver.model.world.NPC;
import com.l2jserver.model.world.actor.event.ActorSpawnEvent;
import com.l2jserver.util.dimensional.Point;
import com.l2jserver.util.geometry.Point3D;
/**
* Event dispatched once a {@link NPC} has spawned in the world.
@@ -32,7 +32,7 @@ public class NPCSpawnEvent extends ActorSpawnEvent implements NPCEvent {
* @param point
* the spawn point
*/
public NPCSpawnEvent(NPC npc, Point point) {
public NPCSpawnEvent(NPC npc, Point3D point) {
super(npc, point);
}

View File

@@ -18,7 +18,7 @@ package com.l2jserver.model.world.player.event;
import com.l2jserver.model.world.Player;
import com.l2jserver.model.world.actor.event.ActorSpawnEvent;
import com.l2jserver.util.dimensional.Point;
import com.l2jserver.util.geometry.Point3D;
/**
* Event dispatcher once an player has spawned in the world
@@ -32,7 +32,7 @@ public class PlayerSpawnEvent extends ActorSpawnEvent implements PlayerEvent {
* @param point
* the spawn point
*/
public PlayerSpawnEvent(Player player, Point point) {
public PlayerSpawnEvent(Player player, Point3D point) {
super(player, point);
}

View File

@@ -17,7 +17,7 @@
package com.l2jserver.model.world.player.event;
import com.l2jserver.model.world.Player;
import com.l2jserver.util.dimensional.Point;
import com.l2jserver.util.geometry.Point3D;
/**
* Event dispatched once an player has completed its teleportation to another
@@ -34,7 +34,7 @@ public class PlayerTeleportedEvent extends PlayerSpawnEvent {
* @param point
* the teleport point
*/
public PlayerTeleportedEvent(Player player, Point point) {
public PlayerTeleportedEvent(Player player, Point3D point) {
super(player, point);
}
}

View File

@@ -20,7 +20,7 @@ import com.l2jserver.model.id.ObjectID;
import com.l2jserver.model.world.Actor;
import com.l2jserver.model.world.Player;
import com.l2jserver.model.world.WorldObject;
import com.l2jserver.util.dimensional.Point;
import com.l2jserver.util.geometry.Point3D;
/**
* Event dispatched once an player has started his teleported to another
@@ -30,7 +30,7 @@ import com.l2jserver.util.dimensional.Point;
*/
public class PlayerTeleportingEvent implements PlayerEvent {
private final Player player;
private final Point point;
private final Point3D point;
/**
* Creates a new instance
@@ -40,7 +40,7 @@ public class PlayerTeleportingEvent implements PlayerEvent {
* @param point
* the teleport point
*/
public PlayerTeleportingEvent(Player player, Point point) {
public PlayerTeleportingEvent(Player player, Point3D point) {
this.player = player;
this.point = point;
}
@@ -65,7 +65,7 @@ public class PlayerTeleportingEvent implements PlayerEvent {
*
* @return the teleported point
*/
public Point getPoint() {
public Point3D getPoint() {
return point;
}