mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-11 09:42:54 +00:00
DAO abstractions and updated 'npc' sql file
Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
@@ -21,7 +21,6 @@ import com.l2jserver.model.id.template.ActorTemplateID;
|
||||
import com.l2jserver.model.template.ActorTemplate;
|
||||
import com.l2jserver.model.world.actor.ActorEffects;
|
||||
import com.l2jserver.model.world.actor.ActorSkillContainer;
|
||||
import com.l2jserver.util.dimensional.Point;
|
||||
|
||||
/**
|
||||
* Abstract {@link Actor} class.
|
||||
@@ -108,9 +107,9 @@ public abstract class Actor extends PositionableObject {
|
||||
*/
|
||||
protected int hp;
|
||||
/**
|
||||
* The actor coordinate point
|
||||
* The actor MP
|
||||
*/
|
||||
protected Point point;
|
||||
protected int mp;
|
||||
/**
|
||||
* The currently effects active on the actor
|
||||
*/
|
||||
@@ -132,6 +131,21 @@ public abstract class Actor extends PositionableObject {
|
||||
this.hp = hp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the mp
|
||||
*/
|
||||
public int getMP() {
|
||||
return mp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mp
|
||||
* the mp to set
|
||||
*/
|
||||
public void setMP(int mp) {
|
||||
this.mp = mp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the race
|
||||
*/
|
||||
|
||||
@@ -30,6 +30,11 @@ import com.l2jserver.service.game.ai.AIScript;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class NPC extends Actor {
|
||||
public int oldId;
|
||||
public int tpl;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
|
||||
@@ -124,7 +124,9 @@ public class CharacterCalculatedAttributes implements ActorAttributes {
|
||||
|
||||
@Override
|
||||
public double getWalkSpeed() {
|
||||
return baseAttributes.getWalkSpeed();
|
||||
//FIXME this is a temporary work arround
|
||||
return getRunSpeed();
|
||||
//return baseAttributes.getWalkSpeed();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,8 +20,8 @@ import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jserver.model.game.CharacterFriend;
|
||||
import com.l2jserver.model.id.object.CharacterID;
|
||||
import com.l2jserver.model.id.object.iterator.WorldObjectIterator;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.util.factory.CollectionFactory;
|
||||
|
||||
@@ -30,7 +30,7 @@ import com.l2jserver.util.factory.CollectionFactory;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class CharacterFriendList implements Iterable<L2Character> {
|
||||
public class CharacterFriendList implements Iterable<CharacterFriend> {
|
||||
/**
|
||||
* The character
|
||||
*/
|
||||
@@ -39,8 +39,7 @@ public class CharacterFriendList implements Iterable<L2Character> {
|
||||
/**
|
||||
* The list of friends of this character
|
||||
*/
|
||||
private final Set<CharacterID> friends = CollectionFactory
|
||||
.newSet();
|
||||
private final Set<CharacterFriend> friends = CollectionFactory.newSet();
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
@@ -64,13 +63,15 @@ public class CharacterFriendList implements Iterable<L2Character> {
|
||||
*
|
||||
* @return an iterator with friend ids
|
||||
*/
|
||||
public Iterator<CharacterID> idIterator() {
|
||||
public Iterator<CharacterFriend> idIterator() {
|
||||
return friends.iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<L2Character> iterator() {
|
||||
return new WorldObjectIterator<L2Character>(friends.iterator());
|
||||
public Iterator<CharacterFriend> iterator() {
|
||||
// return new WorldObjectIterator<L2Character>(friends.iterator());
|
||||
// FIXME
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,7 +82,7 @@ public class CharacterFriendList implements Iterable<L2Character> {
|
||||
* @param list
|
||||
* the id list
|
||||
*/
|
||||
public void load(Collection<CharacterID> list) {
|
||||
public void load(Collection<CharacterFriend> list) {
|
||||
friends.addAll(list);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user