mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-09 08:52:51 +00:00
First commit
Change-Id: I4d273faba7286288d2b9a214c87c39a76724d787
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.l2jserver.model.template;
|
||||
|
||||
import com.l2jserver.model.id.TemplateID;
|
||||
|
||||
public class AbstractTemplate {
|
||||
private final TemplateID id;
|
||||
|
||||
public AbstractTemplate(TemplateID id) {
|
||||
super();
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public TemplateID getId() {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.l2jserver.model.template;
|
||||
|
||||
import com.l2jserver.model.id.TemplateID;
|
||||
import com.l2jserver.model.template.capability.Consumable;
|
||||
|
||||
public abstract class ConsumableTemplate extends ItemTemplate implements
|
||||
Consumable {
|
||||
public ConsumableTemplate(TemplateID id) {
|
||||
super(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.l2jserver.model.template;
|
||||
|
||||
import com.l2jserver.model.id.TemplateID;
|
||||
|
||||
public abstract class ItemTemplate extends AbstractTemplate {
|
||||
public ItemTemplate(TemplateID id) {
|
||||
super(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.l2jserver.model.template;
|
||||
|
||||
import com.l2jserver.model.id.TemplateID;
|
||||
|
||||
public abstract class PotionTemplate extends ConsumableTemplate {
|
||||
public PotionTemplate(TemplateID id) {
|
||||
super(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.l2jserver.model.template;
|
||||
|
||||
import com.l2jserver.model.id.TemplateID;
|
||||
import com.l2jserver.model.template.capability.Castable;
|
||||
|
||||
public abstract class SkillTemplate extends AbstractTemplate implements
|
||||
Castable {
|
||||
public SkillTemplate(TemplateID id) {
|
||||
super(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.l2jserver.model.template;
|
||||
|
||||
import com.l2jserver.model.id.TemplateID;
|
||||
import com.l2jserver.model.template.capability.Attackable;
|
||||
import com.l2jserver.model.template.capability.Enchantable;
|
||||
|
||||
public abstract class WeaponTemplate extends ItemTemplate implements
|
||||
Attackable, Enchantable {
|
||||
public WeaponTemplate(TemplateID id) {
|
||||
super(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
|
||||
public interface Attackable extends TemplateCapability {
|
||||
void attack(Attacker source,
|
||||
com.l2jserver.model.world.capability.Attackable target);
|
||||
|
||||
public int getDamage();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.world.capability.Caster;
|
||||
|
||||
public interface Castable extends TemplateCapability {
|
||||
void cast(Caster caster,
|
||||
com.l2jserver.model.world.capability.Castable target);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
|
||||
public interface Consumable extends TemplateCapability {
|
||||
void consume(Attacker source,
|
||||
com.l2jserver.model.world.capability.Attackable target);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
|
||||
public interface Enchantable extends TemplateCapability {
|
||||
void enchant(com.l2jserver.model.world.capability.Enchantable target);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
public interface TemplateCapability {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user