mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-07 16:03:10 +00:00
@@ -12,15 +12,9 @@ public class AdenaItemTemplate extends ItemTemplate implements Stackable<Item> {
|
||||
@Inject
|
||||
public AdenaItemTemplate(ItemTemplateIDFactory factory) {
|
||||
super(factory.createID(ID));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stack(Item... object) {
|
||||
// final Item item1 = object[0];
|
||||
// if (object.length >= 2) {
|
||||
// for (int i = 1; i < object.length; i++) {
|
||||
// // TODO set item amount
|
||||
// }
|
||||
// }
|
||||
this.icon = "icon.etc_adena_i00";
|
||||
this.immediateEffect = true;
|
||||
this.material = ItemMaterial.GOLD;
|
||||
this.price = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package script.template.item.armor;
|
||||
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
import com.l2jserver.model.template.ArmorTemplate;
|
||||
import com.l2jserver.model.template.capability.Enchantable;
|
||||
import com.l2jserver.model.template.capability.Penalty;
|
||||
import com.l2jserver.model.template.item.ArmorTemplate;
|
||||
import com.l2jserver.model.world.capability.Equiper;
|
||||
|
||||
public abstract class AbstractGradeAArmorTemplate extends ArmorTemplate
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package script.template.item.armor;
|
||||
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
import com.l2jserver.model.template.ArmorTemplate;
|
||||
import com.l2jserver.model.template.item.ArmorTemplate;
|
||||
|
||||
public abstract class AbstractNoGradeArmorTemplate extends ArmorTemplate {
|
||||
public AbstractNoGradeArmorTemplate(ItemTemplateID id) {
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
package script.template.item;
|
||||
package script.template.item.potion;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.model.id.template.factory.ItemTemplateIDFactory;
|
||||
import com.l2jserver.model.template.PotionTemplate;
|
||||
import com.l2jserver.model.template.item.PotionTemplate;
|
||||
import com.l2jserver.model.world.capability.Attackable;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
|
||||
public class TestPotionTemplate extends PotionTemplate {
|
||||
public class RedPotionTemplate extends PotionTemplate {
|
||||
public static final int ID = 15;
|
||||
|
||||
@Inject
|
||||
public TestPotionTemplate(ItemTemplateIDFactory factory) {
|
||||
super(factory.createID(ID));
|
||||
public RedPotionTemplate(ItemTemplateIDFactory factory) {
|
||||
super(factory.createID(ID), "icon.etc_potion_red_i00");
|
||||
this.weight = 80;
|
||||
this.price = 40;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,12 @@
|
||||
package script.template.item.weapon;
|
||||
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
import com.l2jserver.model.template.item.WeaponTemplate;
|
||||
import com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll;
|
||||
|
||||
public abstract class AbstractNoGradeWeaponTemplate extends WeaponTemplate {
|
||||
public AbstractNoGradeWeaponTemplate(ItemTemplateID id, String icon,
|
||||
ItemMaterial material, InventoryPaperdoll paperdoll, WeaponType type) {
|
||||
super(id, icon, material, paperdoll, type);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package script.template.item.weapon;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.model.id.template.factory.ItemTemplateIDFactory;
|
||||
import com.l2jserver.model.world.capability.Attackable;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
import com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll;
|
||||
|
||||
public class LongSwordTemplate extends AbstractNoGradeWeaponTemplate {
|
||||
public static final int ID = 57;
|
||||
|
||||
@Inject
|
||||
public LongSwordTemplate(ItemTemplateIDFactory factory) {
|
||||
super(factory.createID(ID), "icon.weapon_long_sword_i00",
|
||||
ItemMaterial.STEEL, InventoryPaperdoll.RIGHT_HAND,
|
||||
WeaponType.SWORD);
|
||||
|
||||
attribute.set(WeaponAttributeType.PHYSICAL_ATTACK, 0x08, 24);
|
||||
attribute.set(WeaponAttributeType.MAGICAL_ATTACK, 0x08, 17);
|
||||
attribute.set(WeaponAttributeType.R_CRITICAL, 0x08, 8);
|
||||
attribute.set(WeaponAttributeType.PHYSICAL_ATTACK_SPEED, 0x08, 379);
|
||||
|
||||
this.randomDamage = 10;
|
||||
this.attackRange = 40;
|
||||
this.damageRange = new int[] { 0, 0, 40, 120 };
|
||||
this.weight = 1560;
|
||||
this.price = 105000;
|
||||
this.soulshots = 2;
|
||||
this.spiritshots = 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attack(Attacker source, Attackable target) {
|
||||
source.attack(target, this);
|
||||
target.receiveAttack(source, this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package script.template.item.weapon;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.model.id.template.factory.ItemTemplateIDFactory;
|
||||
import com.l2jserver.model.world.capability.Attackable;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
import com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll;
|
||||
|
||||
public class ShortSwordTemplate extends AbstractNoGradeWeaponTemplate {
|
||||
public static final int ID = 57;
|
||||
|
||||
@Inject
|
||||
public ShortSwordTemplate(ItemTemplateIDFactory factory) {
|
||||
super(factory.createID(ID), "icon.weapon_small_sword_i00",
|
||||
ItemMaterial.STEEL, InventoryPaperdoll.RIGHT_HAND,
|
||||
WeaponType.SWORD);
|
||||
|
||||
attribute.set(WeaponAttributeType.PHYSICAL_ATTACK, 0x08, 8);
|
||||
attribute.set(WeaponAttributeType.MAGICAL_ATTACK, 0x08, 6);
|
||||
attribute.set(WeaponAttributeType.R_CRITICAL, 0x08, 8);
|
||||
attribute.set(WeaponAttributeType.PHYSICAL_ATTACK_SPEED, 0x08, 379);
|
||||
|
||||
this.type = WeaponType.SWORD;
|
||||
this.paperdoll = InventoryPaperdoll.RIGHT_HAND;
|
||||
this.randomDamage = 10;
|
||||
this.attackRange = 40;
|
||||
this.damageRange = new int[] { 0, 0, 40, 120 };
|
||||
this.material = ItemMaterial.STEEL;
|
||||
this.weight = 1600;
|
||||
this.price = 590;
|
||||
this.soulshots = 1;
|
||||
this.spiritshots = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attack(Attacker source, Attackable target) {
|
||||
source.attack(target, this);
|
||||
target.receiveAttack(source, this);
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package script.template.item.weapon;
|
||||
|
||||
import com.l2jserver.model.template.WeaponTemplate;
|
||||
import com.l2jserver.model.world.capability.Attackable;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
|
||||
public class TestWeaponTemplate extends WeaponTemplate {
|
||||
private static final int DAMAGE_PHYSICAL = 10;
|
||||
private static final int DAMAGE_MAGICAL = 10;
|
||||
@SuppressWarnings("unused")
|
||||
private static final int MAX_ENCHANT_LEVEL = 10;
|
||||
|
||||
public TestWeaponTemplate() {
|
||||
super(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attack(Attacker source, Attackable target) {
|
||||
source.attack(target, this);
|
||||
target.receiveAttack(source, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPhysicalDamage() {
|
||||
return DAMAGE_PHYSICAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMagicalDamage() {
|
||||
return DAMAGE_MAGICAL;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user