1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-17 04:22:47 +00:00

Change-Id: I3d4cd283cff0f3ea0202c4fe9b60ec5ed0b42ebd

This commit is contained in:
rogiel
2011-04-29 02:04:54 -03:00
parent 2749539f87
commit 4b9252c98f
30 changed files with 351 additions and 64 deletions

View File

@@ -9,5 +9,6 @@ import com.l2jserver.model.world.AbstractObject;
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface Attackable extends ObjectCapability {
void receiveAttack(Attacker attacker);
void receiveAttack(Attacker attacker,
com.l2jserver.model.template.capability.Attackable weapon);
}

View File

@@ -8,5 +8,6 @@ import com.l2jserver.model.world.AbstractObject;
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface Attacker extends ObjectCapability {
void attack(Attackable target);
void attack(Attackable target,
com.l2jserver.model.template.capability.Attackable weapon);
}

View File

@@ -0,0 +1,16 @@
package com.l2jserver.model.world.capability;
import com.l2jserver.model.world.AbstractObject;
/**
* Defines an {@link AbstractObject} that can be damaged (HP)
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface Damagable extends ObjectCapability {
void receiveDamage(int damage);
int getHP();
void setHP(int hp);
}

View File

@@ -8,7 +8,18 @@ import com.l2jserver.model.world.AbstractObject;
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface Enchantable extends ObjectCapability {
public int getEnchantLevel();
/**
* Get the current enchant level in the object
*
* @return the enchant level
*/
int getEnchantLevel();
public int setEnchantLevel();
/**
* Set the new enchant level in the object
*
* @param level
* the enchant level
*/
void setEnchantLevel(int level);
}

View File

@@ -10,6 +10,9 @@ import com.l2jserver.model.world.AbstractObject;
*/
public interface Equiper extends ObjectCapability {
void equip(Equipable equipable);
boolean isEquiped(Equipable equipment);
boolean isEquiped(com.l2jserver.model.template.capability.Equipable equipable);
void setEquipment(Object slot, Equipable equipment);

View File

@@ -0,0 +1,20 @@
package com.l2jserver.model.world.capability;
import com.l2jserver.model.world.AbstractObject;
import com.l2jserver.model.world.WorldObject;
/**
* Defines an {@link AbstractObject} that can be killed.
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface Killable extends ObjectCapability {
/**
* Process the dying routines. Note that if the object killed himself,
* <tt>killer</tt> must be his instance.
*
* @param killer
* the killer. Can be null if unknown.
*/
void die(WorldObject killer);
}

View File

@@ -0,0 +1,24 @@
package com.l2jserver.model.world.capability;
import com.l2jserver.model.world.AbstractObject;
/**
* Defines an {@link AbstractObject} that has levels.
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface Levelable extends ObjectCapability {
/**
* Get this object`s level
*
* @return the level
*/
int getLevel();
/**
* Set this object's level
*
* @param level
*/
void setLevel(int level);
}

View File

@@ -0,0 +1,16 @@
package com.l2jserver.model.world.capability;
import com.l2jserver.model.world.AbstractObject;
/**
* Defines an {@link AbstractObject} that can be damaged (HP)
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/
public interface Mana extends ObjectCapability {
void consumeMana(int amount);
int getMP();
void setMP(int mana);
}