1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-16 12:02:47 +00:00

Refactored Filters

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-16 15:08:30 -03:00
parent 242616d384
commit df36f9bb32
38 changed files with 322 additions and 80 deletions

View File

@@ -18,6 +18,7 @@ package com.l2jserver.model.world;
import com.l2jserver.model.id.object.CharacterID;
import com.l2jserver.model.id.template.ItemTemplateID;
import com.l2jserver.model.template.ItemTemplate;
import com.l2jserver.model.world.capability.Dropable;
import com.l2jserver.model.world.capability.Listenable;
import com.l2jserver.model.world.capability.Playable;
@@ -50,7 +51,13 @@ import com.l2jserver.util.dimensional.Coordinate;
*/
public class Item extends AbstractObject implements Playable, Spawnable,
Listenable<ItemListener, ItemEvent>, Dropable {
/**
* The {@link ItemTemplate} ID
*/
private final ItemTemplateID templateID;
/**
* The {@link L2Character} ID owner of this object
*/
private CharacterID ownerID;
/**
@@ -65,7 +72,10 @@ public class Item extends AbstractObject implements Playable, Spawnable,
* Drop coordinate of this item
*/
private Coordinate coordinate;
/**
* Count of items
*/
private int count = 1;
public Item(ItemTemplateID templateID) {
@@ -75,6 +85,8 @@ public class Item extends AbstractObject implements Playable, Spawnable,
@Override
public void drop(Coordinate position) {
this.coordinate = position;
this.location = null;
this.paperdoll = null;
}
@Override
@@ -84,8 +96,7 @@ public class Item extends AbstractObject implements Playable, Spawnable,
@Override
public boolean isSpawned() {
// TODO Auto-generated method stub
return false;
return (location != null);
}
@Override
@@ -98,6 +109,21 @@ public class Item extends AbstractObject implements Playable, Spawnable,
this.coordinate = coord;
}
/**
* @return the count
*/
public int getCount() {
return count;
}
/**
* @param count
* the count to set
*/
public void setCount(int count) {
this.count = count;
}
/**
* @return the location
*/