mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-17 04:22:47 +00:00
Change-Id: I3d4cd283cff0f3ea0202c4fe9b60ec5ed0b42ebd
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
16
src/main/java/com/l2jserver/model/world/capability/Mana.java
Normal file
16
src/main/java/com/l2jserver/model/world/capability/Mana.java
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user