mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-06 07:32:46 +00:00
@@ -20,9 +20,9 @@ import script.AIInterest;
|
||||
|
||||
import com.l2jserver.game.net.Lineage2Connection;
|
||||
import com.l2jserver.game.net.packet.server.ActorMovementPacket;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.capability.Attackable;
|
||||
import com.l2jserver.model.world.capability.Positionable;
|
||||
import com.l2jserver.model.world.PositionableObject;
|
||||
import com.l2jserver.model.world.character.event.CharacterMoveEvent;
|
||||
import com.l2jserver.service.game.ai.AIScript;
|
||||
import com.l2jserver.service.game.ai.script.AttackAIScript;
|
||||
@@ -119,10 +119,10 @@ public class CharacterAI implements AIScript, WalkingAIScript, AttackAIScript {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void follow(Positionable positionable) {
|
||||
public void follow(PositionableObject positionable) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attack(Attackable target) {
|
||||
public void attack(Actor target) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,12 +18,9 @@ package script.template.item;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
|
||||
import com.l2jserver.model.template.capability.Stackable;
|
||||
import com.l2jserver.model.template.item.EtcItemTemplate;
|
||||
import com.l2jserver.model.world.Item;
|
||||
|
||||
public class AdenaItemTemplate extends EtcItemTemplate implements
|
||||
Stackable<Item> {
|
||||
public class AdenaItemTemplate extends EtcItemTemplate {
|
||||
public static final int ID = 57;
|
||||
|
||||
@Inject
|
||||
|
||||
@@ -19,12 +19,9 @@ package script.template.item;
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
|
||||
import com.l2jserver.model.id.template.provider.SkillTemplateIDProvider;
|
||||
import com.l2jserver.model.template.capability.Stackable;
|
||||
import com.l2jserver.model.template.item.SkillEtcItemTemplate;
|
||||
import com.l2jserver.model.world.Item;
|
||||
|
||||
public class LargaFireworkItemTemplate extends SkillEtcItemTemplate implements
|
||||
Stackable<Item> {
|
||||
public class LargaFireworkItemTemplate extends SkillEtcItemTemplate {
|
||||
public static final int ID = 6407;
|
||||
|
||||
@Inject
|
||||
|
||||
@@ -18,29 +18,11 @@ package script.template.item.armor;
|
||||
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
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
|
||||
implements Enchantable, Penalty {
|
||||
implements Enchantable {
|
||||
public AbstractGradeAArmorTemplate(ItemTemplateID id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enchant(com.l2jserver.model.world.capability.Enchantable target) {
|
||||
target.setEnchantLevel(target.getEnchantLevel() + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void penalty(Equiper user) {
|
||||
// if (!(user instanceof Levelable) && !(user instanceof Castable))
|
||||
// return;
|
||||
// final Levelable levelable = (Levelable) user;
|
||||
// final Castable castable = (Castable) user;
|
||||
// if (levelable.getLevel() < 20) {
|
||||
//
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,6 @@ package script.template.item.armor;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
|
||||
import com.l2jserver.model.world.capability.Attackable;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
import com.l2jserver.model.world.capability.Enchantable;
|
||||
|
||||
public class Dummy2ArmorTemplate extends AbstractGradeAArmorTemplate {
|
||||
public static final int ID = 10;
|
||||
@@ -33,25 +30,4 @@ public class Dummy2ArmorTemplate extends AbstractGradeAArmorTemplate {
|
||||
public Dummy2ArmorTemplate(ItemTemplateIDProvider factory) {
|
||||
super(factory.createID(ID));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void defend(Attacker source, Attackable target) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enchant(Enchantable target) {
|
||||
if (target.getEnchantLevel() >= MAX_ENCHANT)
|
||||
return;
|
||||
super.enchant(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPhysicalDefense() {
|
||||
return REDUCED_DAMAGE_PHYSICAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMagicalDefense() {
|
||||
return REDUCED_DAMAGE_MAGICAL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,6 @@ package script.template.item.armor;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
|
||||
import com.l2jserver.model.world.capability.Attackable;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
|
||||
public class DummyArmorTemplate extends AbstractNoGradeArmorTemplate {
|
||||
public static final int ID = 20;
|
||||
@@ -31,18 +29,4 @@ public class DummyArmorTemplate extends AbstractNoGradeArmorTemplate {
|
||||
public DummyArmorTemplate(ItemTemplateIDProvider factory) {
|
||||
super(factory.createID(ID));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void defend(Attacker source, Attackable target) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPhysicalDefense() {
|
||||
return REDUCED_DAMAGE_PHYSICAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMagicalDefense() {
|
||||
return REDUCED_DAMAGE_MAGICAL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@ package script.template.item.potion;
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
|
||||
import com.l2jserver.model.template.item.PotionTemplate;
|
||||
import com.l2jserver.model.world.capability.Attackable;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
|
||||
public class RedPotionTemplate extends PotionTemplate {
|
||||
public static final int ID = 15;
|
||||
@@ -32,9 +30,4 @@ public class RedPotionTemplate extends PotionTemplate {
|
||||
this.price = 40;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void consume(Attacker source, Attackable target) {
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,6 @@ import static com.l2jserver.model.template.item.WeaponTemplate.WeaponAttributeTy
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
|
||||
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 {
|
||||
@@ -49,10 +47,4 @@ public class LongSwordTemplate extends AbstractNoGradeWeaponTemplate {
|
||||
this.soulshots = 2;
|
||||
this.spiritshots = 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attack(Attacker source, Attackable target) {
|
||||
source.attack(target, this);
|
||||
target.receiveAttack(source, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,6 @@ import static com.l2jserver.model.template.item.WeaponTemplate.WeaponAttributeTy
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
|
||||
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 {
|
||||
@@ -52,10 +50,4 @@ public class ShortSwordTemplate extends AbstractNoGradeWeaponTemplate {
|
||||
this.soulshots = 1;
|
||||
this.spiritshots = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attack(Attacker source, Attackable target) {
|
||||
source.attack(target, this);
|
||||
target.receiveAttack(source, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@ package script.template.skill;
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.model.id.template.provider.SkillTemplateIDProvider;
|
||||
import com.l2jserver.model.template.SkillTemplate;
|
||||
import com.l2jserver.model.world.capability.Castable;
|
||||
import com.l2jserver.model.world.capability.Caster;
|
||||
import com.l2jserver.model.world.character.CharacterClass;
|
||||
|
||||
public class TestSkillTemplate extends SkillTemplate {
|
||||
@@ -36,9 +34,4 @@ public class TestSkillTemplate extends SkillTemplate {
|
||||
public CharacterClass[] getClasses() {
|
||||
return new CharacterClass[] { CharacterClass.HUMAN_FIGHTER };
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cast(Caster caster, Castable... targets) {
|
||||
// TODO do casting
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@ import com.l2jserver.model.id.provider.AccountIDProvider;
|
||||
import com.l2jserver.model.id.template.CharacterTemplateID;
|
||||
import com.l2jserver.model.id.template.provider.CharacterTemplateIDProvider;
|
||||
import com.l2jserver.model.template.CharacterTemplate;
|
||||
import com.l2jserver.model.world.AbstractActor.Race;
|
||||
import com.l2jserver.model.world.AbstractActor.Sex;
|
||||
import com.l2jserver.model.world.Actor.Race;
|
||||
import com.l2jserver.model.world.Actor.Sex;
|
||||
import com.l2jserver.model.world.Clan;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.character.CharacterAppearance;
|
||||
|
||||
@@ -27,8 +27,8 @@ import com.l2jserver.game.net.packet.server.ActionFailedPacket;
|
||||
import com.l2jserver.model.id.ObjectID;
|
||||
import com.l2jserver.model.id.object.ActorID;
|
||||
import com.l2jserver.model.id.object.provider.ObjectIDResolver;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.service.game.character.ActorIsNotAttackableServiceException;
|
||||
import com.l2jserver.service.game.character.CannotSetTargetServiceException;
|
||||
import com.l2jserver.service.game.character.CharacterService;
|
||||
|
||||
@@ -31,8 +31,8 @@ import com.l2jserver.model.id.object.provider.CharacterIDProvider;
|
||||
import com.l2jserver.model.id.template.CharacterTemplateID;
|
||||
import com.l2jserver.model.id.template.provider.CharacterTemplateIDProvider;
|
||||
import com.l2jserver.model.template.CharacterTemplate;
|
||||
import com.l2jserver.model.world.AbstractActor.Race;
|
||||
import com.l2jserver.model.world.AbstractActor.Sex;
|
||||
import com.l2jserver.model.world.Actor.Race;
|
||||
import com.l2jserver.model.world.Actor.Sex;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.character.CharacterAppearance.CharacterFace;
|
||||
import com.l2jserver.model.world.character.CharacterAppearance.CharacterHairColor;
|
||||
|
||||
@@ -21,8 +21,8 @@ import org.jboss.netty.buffer.ChannelBuffer;
|
||||
import com.l2jserver.game.net.Lineage2Connection;
|
||||
import com.l2jserver.game.net.packet.AbstractServerPacket;
|
||||
import com.l2jserver.game.net.packet.server.CharacterCreateFailPacket.Reason;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.service.game.chat.ChatMessageDestination;
|
||||
import com.l2jserver.util.BufferUtils;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.jboss.netty.buffer.ChannelBuffer;
|
||||
import com.l2jserver.game.net.Lineage2Connection;
|
||||
import com.l2jserver.game.net.packet.AbstractServerPacket;
|
||||
import com.l2jserver.game.net.packet.server.CharacterCreateFailPacket.Reason;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.util.dimensional.Coordinate;
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.jboss.netty.buffer.ChannelBuffer;
|
||||
import com.l2jserver.game.net.Lineage2Connection;
|
||||
import com.l2jserver.game.net.packet.AbstractServerPacket;
|
||||
import com.l2jserver.game.net.packet.server.CharacterCreateFailPacket.Reason;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
|
||||
/**
|
||||
* This packet notifies the client that the chosen character has been
|
||||
|
||||
@@ -27,8 +27,8 @@ import com.l2jserver.model.game.Fort;
|
||||
import com.l2jserver.model.game.Skill;
|
||||
import com.l2jserver.model.template.ItemTemplate;
|
||||
import com.l2jserver.model.template.SkillTemplate;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.Item;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.util.BufferUtils;
|
||||
import com.l2jserver.util.factory.CollectionFactory;
|
||||
|
||||
|
||||
@@ -16,11 +16,13 @@
|
||||
*/
|
||||
package com.l2jserver.model;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.l2jserver.model.id.ID;
|
||||
|
||||
/**
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
* Simple model interface implementing {@link ID} related methods
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class AbstractModel<T extends ID<?>> implements Model<T> {
|
||||
/**
|
||||
@@ -35,8 +37,7 @@ public class AbstractModel<T extends ID<?>> implements Model<T> {
|
||||
|
||||
@Override
|
||||
public void setID(T ID) {
|
||||
if (this.id != null)
|
||||
throw new IllegalStateException("ID is already set");
|
||||
Preconditions.checkState(id == null, "ID is already set");
|
||||
this.id = ID;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ package com.l2jserver.model.game;
|
||||
import com.l2jserver.model.id.object.ActorID;
|
||||
import com.l2jserver.model.id.template.SkillTemplateID;
|
||||
import com.l2jserver.model.template.SkillTemplate;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
|
||||
/**
|
||||
* Register the state of a skill known by an {@link Actor}.
|
||||
|
||||
@@ -19,7 +19,7 @@ package com.l2jserver.model.id.object;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.assistedinject.Assisted;
|
||||
import com.l2jserver.model.id.ObjectID;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
|
||||
/**
|
||||
* An {@link ObjectID} instance representing an {@link Actor} object
|
||||
|
||||
@@ -20,9 +20,9 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.l2jserver.model.id.template.ActorTemplateID;
|
||||
import com.l2jserver.model.world.AbstractActor.Race;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.Actor.Race;
|
||||
import com.l2jserver.model.world.actor.ActorAttributes;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
|
||||
/**
|
||||
* Template for {@link Actor}
|
||||
|
||||
@@ -23,12 +23,10 @@ import com.google.inject.Inject;
|
||||
import com.l2jserver.game.net.Lineage2Connection;
|
||||
import com.l2jserver.model.id.object.CharacterID;
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
import com.l2jserver.model.template.capability.Depositable;
|
||||
import com.l2jserver.model.template.capability.Dropable;
|
||||
import com.l2jserver.model.template.capability.Enchantable;
|
||||
import com.l2jserver.model.template.capability.Sellable;
|
||||
import com.l2jserver.model.template.capability.Tradable;
|
||||
import com.l2jserver.model.template.capability.Usable;
|
||||
import com.l2jserver.model.world.Item;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.service.network.NetworkService;
|
||||
@@ -117,20 +115,6 @@ public abstract class ItemTemplate extends AbstractTemplate<Item> {
|
||||
return (this instanceof Tradable);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the usable
|
||||
*/
|
||||
public boolean isUsable() {
|
||||
return (this instanceof Usable);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the usable
|
||||
*/
|
||||
public boolean isDepositable() {
|
||||
return (this instanceof Depositable);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the weight
|
||||
*/
|
||||
|
||||
@@ -23,10 +23,11 @@ import com.l2jserver.game.net.packet.server.NPCHtmlMessagePacket;
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
import com.l2jserver.model.id.template.NPCTemplateID;
|
||||
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
|
||||
import com.l2jserver.model.world.AbstractActor.Race;
|
||||
import com.l2jserver.model.template.capability.Interactable;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.Actor.Race;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.NPC;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.service.game.character.CannotSetTargetServiceException;
|
||||
import com.l2jserver.service.game.character.CharacterService;
|
||||
import com.l2jserver.service.network.NetworkService;
|
||||
@@ -39,7 +40,8 @@ import com.l2jserver.util.html.markup.HtmlTemplate;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class NPCTemplate extends ActorTemplate<NPC> {
|
||||
public abstract class NPCTemplate extends ActorTemplate<NPC> implements
|
||||
Interactable<NPC> {
|
||||
/**
|
||||
* The {@link NetworkService}
|
||||
*/
|
||||
@@ -93,17 +95,7 @@ public abstract class NPCTemplate extends ActorTemplate<NPC> {
|
||||
super(id, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs an interaction with this NPC. This is normally invoked from
|
||||
* <tt>npc</tt> instance.
|
||||
*
|
||||
* @param character
|
||||
* the interacting character
|
||||
* @param args
|
||||
* the action arguments
|
||||
* @throws L2Exception
|
||||
* any {@link L2Exception}
|
||||
*/
|
||||
@Override
|
||||
public void action(NPC npc, L2Character character, String... args)
|
||||
throws L2Exception {
|
||||
Preconditions.checkNotNull(npc, "npc");
|
||||
@@ -140,7 +132,7 @@ public abstract class NPCTemplate extends ActorTemplate<NPC> {
|
||||
* the action arguments
|
||||
* @throws L2Exception
|
||||
*/
|
||||
public void talk(NPC npc, L2Character character, Lineage2Connection conn,
|
||||
protected void talk(NPC npc, L2Character character, Lineage2Connection conn,
|
||||
String... args) throws L2Exception {
|
||||
if (args.length == 0 || (args.length >= 1 && args[0].equals("Chat"))) {
|
||||
String name = "";
|
||||
|
||||
@@ -18,7 +18,6 @@ package com.l2jserver.model.template;
|
||||
|
||||
import com.l2jserver.model.game.Skill;
|
||||
import com.l2jserver.model.id.template.SkillTemplateID;
|
||||
import com.l2jserver.model.template.capability.Castable;
|
||||
import com.l2jserver.model.world.character.CharacterClass;
|
||||
|
||||
/**
|
||||
@@ -26,8 +25,7 @@ import com.l2jserver.model.world.character.CharacterClass;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class SkillTemplate extends AbstractTemplate<Skill> implements
|
||||
Castable {
|
||||
public abstract class SkillTemplate extends AbstractTemplate<Skill> {
|
||||
/**
|
||||
* The maximum level supported by this skill
|
||||
*/
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.template.Template;
|
||||
import com.l2jserver.model.world.capability.Caster;
|
||||
|
||||
/**
|
||||
* Defines an {@link Template template} {@link TemplateCapability capability}
|
||||
* that an {@link Caster} can cast on an
|
||||
* {@link com.l2jserver.model.world.capability.Castable}.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*
|
||||
*/
|
||||
public interface Castable extends TemplateCapability {
|
||||
void cast(Caster caster,
|
||||
com.l2jserver.model.world.capability.Castable... targets);
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.template.Template;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
|
||||
/**
|
||||
* Defines an {@link Template template} {@link TemplateCapability capability}
|
||||
* that can be consumed.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Consumable extends TemplateCapability {
|
||||
void consume(Attacker source,
|
||||
com.l2jserver.model.world.capability.Attackable target);
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.template.Template;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
|
||||
/**
|
||||
* Defines an {@link Template template} {@link TemplateCapability capability}
|
||||
* that an {@link com.l2jserver.model.world.capability.Attackable} can use to
|
||||
* defend from an {@link Attacker}.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Defendable extends TemplateCapability {
|
||||
void defend(Attacker source,
|
||||
com.l2jserver.model.world.capability.Attackable target);
|
||||
|
||||
int getPhysicalDefense();
|
||||
|
||||
int getMagicalDefense();
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.template.Template;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
|
||||
/**
|
||||
* Defines an {@link Template template} {@link TemplateCapability capability}
|
||||
* that can be selled.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Depositable extends TemplateCapability {
|
||||
void sell(Attacker source,
|
||||
com.l2jserver.model.world.capability.Attackable target);
|
||||
}
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.template.Template;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
|
||||
/**
|
||||
* Defines an {@link Template template} {@link TemplateCapability capability}
|
||||
@@ -26,6 +25,5 @@ import com.l2jserver.model.world.capability.Attacker;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Dropable extends TemplateCapability {
|
||||
void sell(Attacker source,
|
||||
com.l2jserver.model.world.capability.Attackable target);
|
||||
|
||||
}
|
||||
|
||||
@@ -25,5 +25,5 @@ import com.l2jserver.model.template.Template;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Enchantable extends TemplateCapability {
|
||||
void enchant(com.l2jserver.model.world.capability.Enchantable target);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.template.Template;
|
||||
import com.l2jserver.model.world.capability.Equiper;
|
||||
|
||||
/**
|
||||
* Defines an {@link Template template} {@link TemplateCapability capability}
|
||||
* for an object that acn be equipable by an {@link Equiper}.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*
|
||||
*/
|
||||
public interface Equipable extends TemplateCapability {
|
||||
void equip(Equiper equiper);
|
||||
}
|
||||
@@ -17,17 +17,27 @@
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.template.Template;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
import com.l2jserver.util.exception.L2Exception;
|
||||
|
||||
/**
|
||||
* Defines an {@link Template template} {@link TemplateCapability capability}
|
||||
* that an {@link Attacker} can use to attack an
|
||||
* {@link com.l2jserver.model.world.capability.Attackable}
|
||||
* Defines an {@link Template} which the player can interact with
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*
|
||||
*/
|
||||
public interface Attackable extends TemplateCapability {
|
||||
void attack(Attacker source,
|
||||
com.l2jserver.model.world.capability.Attackable target);
|
||||
public interface Interactable<T extends WorldObject> extends TemplateCapability {
|
||||
/**
|
||||
* Performs an interaction with this template.
|
||||
*
|
||||
* @param character
|
||||
* the interacting character
|
||||
* @param args
|
||||
* the action arguments
|
||||
* @throws L2Exception
|
||||
* any {@link L2Exception}
|
||||
*/
|
||||
void action(T object, L2Character character, String... args)
|
||||
throws L2Exception;
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.template.AbstractTemplate;
|
||||
import com.l2jserver.model.world.capability.Equiper;
|
||||
|
||||
/**
|
||||
* Indicated than an {@link AbstractTemplate} can add penalties to an given
|
||||
* {@link Equiper}.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Penalty extends TemplateCapability {
|
||||
void penalty(Equiper user);
|
||||
}
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.template.Template;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
|
||||
/**
|
||||
* Defines an {@link Template template} {@link TemplateCapability capability}
|
||||
@@ -26,6 +25,5 @@ import com.l2jserver.model.world.capability.Attacker;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Sellable extends TemplateCapability {
|
||||
void sell(Attacker source,
|
||||
com.l2jserver.model.world.capability.Attackable target);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
|
||||
/**
|
||||
* Defines an template that can be stacked (i.e. more then one item per slot in
|
||||
* the inventory)
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Stackable<T extends WorldObject> extends TemplateCapability {
|
||||
void stack(T... object);
|
||||
}
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.template.Template;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
|
||||
/**
|
||||
* Defines an {@link Template template} {@link TemplateCapability capability}
|
||||
@@ -26,6 +25,5 @@ import com.l2jserver.model.world.capability.Attacker;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Tradable extends TemplateCapability {
|
||||
void sell(Attacker source,
|
||||
com.l2jserver.model.world.capability.Attackable target);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.template.capability;
|
||||
|
||||
import com.l2jserver.model.template.Template;
|
||||
|
||||
/**
|
||||
* Defines an {@link Template template} {@link TemplateCapability capability}
|
||||
* that can be used.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Usable extends TemplateCapability {
|
||||
void canUse();
|
||||
}
|
||||
@@ -18,7 +18,6 @@ package com.l2jserver.model.template.item;
|
||||
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
import com.l2jserver.model.template.ItemTemplate;
|
||||
import com.l2jserver.model.template.capability.Defendable;
|
||||
import com.l2jserver.model.world.Item;
|
||||
|
||||
/**
|
||||
@@ -26,7 +25,7 @@ import com.l2jserver.model.world.Item;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class ArmorTemplate extends ItemTemplate implements Defendable {
|
||||
public abstract class ArmorTemplate extends ItemTemplate {
|
||||
public ArmorTemplate(ItemTemplateID id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ package com.l2jserver.model.template.item;
|
||||
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
import com.l2jserver.model.template.ItemTemplate;
|
||||
import com.l2jserver.model.template.capability.Consumable;
|
||||
import com.l2jserver.model.world.Item;
|
||||
|
||||
/**
|
||||
@@ -26,8 +25,7 @@ import com.l2jserver.model.world.Item;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class ConsumableTemplate extends ItemTemplate implements
|
||||
Consumable {
|
||||
public abstract class ConsumableTemplate extends ItemTemplate {
|
||||
public ConsumableTemplate(ItemTemplateID id, String icon,
|
||||
ItemMaterial material) {
|
||||
super(id, icon, material);
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.l2jserver.model.template.item;
|
||||
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
import com.l2jserver.model.template.capability.Stackable;
|
||||
import com.l2jserver.model.world.Item;
|
||||
|
||||
/**
|
||||
@@ -25,8 +24,7 @@ import com.l2jserver.model.world.Item;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class PotionTemplate extends ConsumableTemplate implements
|
||||
Stackable<Item> {
|
||||
public abstract class PotionTemplate extends ConsumableTemplate {
|
||||
public PotionTemplate(ItemTemplateID id, String icon) {
|
||||
super(id, icon, ItemMaterial.LIQUID);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ import java.util.Map.Entry;
|
||||
|
||||
import com.l2jserver.model.id.template.ItemTemplateID;
|
||||
import com.l2jserver.model.template.ItemTemplate;
|
||||
import com.l2jserver.model.template.capability.Attackable;
|
||||
import com.l2jserver.model.world.Item;
|
||||
import com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll;
|
||||
import com.l2jserver.util.calculator.Calculator;
|
||||
@@ -38,7 +37,7 @@ import com.l2jserver.util.factory.CollectionFactory;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class WeaponTemplate extends ItemTemplate implements Attackable {
|
||||
public abstract class WeaponTemplate extends ItemTemplate {
|
||||
/**
|
||||
* The paperldoll slot used by this weapon
|
||||
*/
|
||||
|
||||
@@ -17,15 +17,8 @@
|
||||
package com.l2jserver.model.world;
|
||||
|
||||
import com.l2jserver.model.id.object.ActorID;
|
||||
import com.l2jserver.model.template.SkillTemplate;
|
||||
import com.l2jserver.model.template.capability.Attackable;
|
||||
import com.l2jserver.model.world.actor.ActorEffects;
|
||||
import com.l2jserver.model.world.actor.ActorSkillContainer;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.capability.Attacker;
|
||||
import com.l2jserver.model.world.capability.Castable;
|
||||
import com.l2jserver.model.world.capability.Equipable;
|
||||
import com.l2jserver.model.world.capability.Equiper;
|
||||
import com.l2jserver.util.dimensional.Coordinate;
|
||||
import com.l2jserver.util.dimensional.Point;
|
||||
|
||||
@@ -34,7 +27,7 @@ import com.l2jserver.util.dimensional.Point;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class AbstractActor extends AbstractObject implements Actor {
|
||||
public abstract class Actor extends PositionableObject {
|
||||
/**
|
||||
* The actor race
|
||||
*/
|
||||
@@ -124,78 +117,14 @@ public abstract class AbstractActor extends AbstractObject implements Actor {
|
||||
*/
|
||||
protected final ActorSkillContainer skills = new ActorSkillContainer(this);
|
||||
|
||||
@Override
|
||||
public void receiveDamage(int damage) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHP() {
|
||||
return hp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHP(int hp) {
|
||||
this.hp = hp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveAttack(Attacker attacker, Attackable weapon) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attack(com.l2jserver.model.world.capability.Attackable target,
|
||||
Attackable weapon) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cast() {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cast(SkillTemplate skill, Castable cast) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawn(Coordinate coordinate) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSpawned() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the coordinate point
|
||||
*/
|
||||
public Point getPoint() {
|
||||
return point;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param point
|
||||
* the coordinate point to set
|
||||
*/
|
||||
public void setPoint(Point point) {
|
||||
this.point = point;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Coordinate getPosition() {
|
||||
return point.getCoordinate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPosition(Coordinate coord) {
|
||||
this.point = new Point(coord, (point != null ? point.getAngle() : 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the race
|
||||
*/
|
||||
@@ -226,12 +155,10 @@ public abstract class AbstractActor extends AbstractObject implements Actor {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
@@ -239,52 +166,14 @@ public abstract class AbstractActor extends AbstractObject implements Actor {
|
||||
/**
|
||||
* @return the active effects on this actor
|
||||
*/
|
||||
@Override
|
||||
public ActorEffects getEffects() {
|
||||
return effects;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActorSkillContainer getSkills() {
|
||||
return skills;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void die(WorldObject killer) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public void equip(Equipable equipable) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEquiped(Equipable equipment) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEquiped(
|
||||
com.l2jserver.model.template.capability.Equipable equipable) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEquipment(Object slot, Equipable equipment) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getEquipment(Object slot) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public void equip(Equiper equiper) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActorID<?> getID() {
|
||||
return (ActorID<?>) super.getID();
|
||||
@@ -21,7 +21,6 @@ import java.util.Iterator;
|
||||
import com.l2jserver.model.id.object.CharacterID;
|
||||
import com.l2jserver.model.id.object.ClanID;
|
||||
import com.l2jserver.model.id.object.iterator.WorldObjectIterator;
|
||||
import com.l2jserver.model.world.capability.Joinable;
|
||||
import com.l2jserver.model.world.clan.ClanMembers;
|
||||
|
||||
/**
|
||||
@@ -29,7 +28,7 @@ import com.l2jserver.model.world.clan.ClanMembers;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class Clan extends AbstractObject implements Joinable<L2Character> {
|
||||
public class Clan extends AbstractObject implements Iterable<L2Character> {
|
||||
/**
|
||||
* Clan leader
|
||||
*/
|
||||
@@ -40,16 +39,6 @@ public class Clan extends AbstractObject implements Joinable<L2Character> {
|
||||
*/
|
||||
private final ClanMembers members = new ClanMembers(this);
|
||||
|
||||
@Override
|
||||
public void join(L2Character member) {
|
||||
members.add(member);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void leave(L2Character member) {
|
||||
members.remove(member);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the leaderID
|
||||
*/
|
||||
|
||||
@@ -19,9 +19,6 @@ 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.Playable;
|
||||
import com.l2jserver.model.world.capability.Spawnable;
|
||||
import com.l2jserver.model.world.character.CharacterInventory.InventoryLocation;
|
||||
import com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll;
|
||||
import com.l2jserver.util.dimensional.Coordinate;
|
||||
@@ -47,8 +44,7 @@ import com.l2jserver.util.dimensional.Point;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class Item extends AbstractObject implements Playable, Spawnable,
|
||||
Dropable {
|
||||
public class Item extends PositionableObject {
|
||||
/**
|
||||
* The {@link ItemTemplate} ID
|
||||
*/
|
||||
@@ -80,33 +76,6 @@ public class Item extends AbstractObject implements Playable, Spawnable,
|
||||
this.templateID = templateID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drop(Coordinate position) {
|
||||
this.coordinate = position;
|
||||
this.location = null;
|
||||
this.paperdoll = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawn(Coordinate coordinate) {
|
||||
this.drop(coordinate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSpawned() {
|
||||
return (location != null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Coordinate getPosition() {
|
||||
return coordinate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPosition(Coordinate coord) {
|
||||
this.coordinate = coord;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the count
|
||||
*/
|
||||
@@ -176,17 +145,10 @@ public class Item extends AbstractObject implements Playable, Spawnable,
|
||||
this.ownerID = ownerID;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.l2jserver.model.world.capability.Pointable#getPoint()
|
||||
*/
|
||||
@Override
|
||||
public Point getPoint() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPoint(Point point) {
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.l2jserver.model.id.object.ClanID;
|
||||
import com.l2jserver.model.id.object.PetID;
|
||||
import com.l2jserver.model.template.CharacterTemplate;
|
||||
import com.l2jserver.model.world.actor.ActorAttributes;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.character.CharacterAppearance;
|
||||
import com.l2jserver.model.world.character.CharacterCalculatedAttributes;
|
||||
import com.l2jserver.model.world.character.CharacterClass;
|
||||
|
||||
@@ -29,7 +29,7 @@ import com.l2jserver.service.game.ai.AIScript;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class NPC extends AbstractActor {
|
||||
public class NPC extends Actor {
|
||||
/**
|
||||
* The NPC template ID
|
||||
*/
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.model.id.object.CharacterID;
|
||||
import com.l2jserver.model.id.object.ClanID;
|
||||
import com.l2jserver.model.id.object.iterator.WorldObjectIterator;
|
||||
import com.l2jserver.model.world.capability.Joinable;
|
||||
import com.l2jserver.util.factory.CollectionFactory;
|
||||
|
||||
/**
|
||||
* This class represents an Party in Lineage II world
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class Party extends AbstractObject implements Joinable<L2Character> {
|
||||
/**
|
||||
* Active party members
|
||||
*/
|
||||
private final List<CharacterID> members = CollectionFactory.newList();
|
||||
|
||||
@Override
|
||||
public void join(L2Character member) {
|
||||
members.add(member.getID());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClanID getID() {
|
||||
return (ClanID) super.getID();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void leave(L2Character member) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<L2Character> iterator() {
|
||||
return new WorldObjectIterator<L2Character>(members.iterator());
|
||||
}
|
||||
}
|
||||
@@ -18,15 +18,13 @@ package com.l2jserver.model.world;
|
||||
|
||||
import com.l2jserver.model.id.object.CharacterID;
|
||||
import com.l2jserver.model.id.object.ItemID;
|
||||
import com.l2jserver.model.world.capability.Summonable;
|
||||
import com.l2jserver.util.dimensional.Coordinate;
|
||||
|
||||
/**
|
||||
* This class represents an Pet in the Lineage II World
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class Pet extends Player implements Summonable {
|
||||
public class Pet extends Player {
|
||||
/**
|
||||
* The {@link CharacterID} pet's owner
|
||||
*/
|
||||
@@ -36,18 +34,6 @@ public class Pet extends Player implements Summonable {
|
||||
*/
|
||||
private ItemID itemID;
|
||||
|
||||
@Override
|
||||
public void summon(Coordinate coordinate) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSummoned() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the owner ID
|
||||
*/
|
||||
|
||||
@@ -16,15 +16,12 @@
|
||||
*/
|
||||
package com.l2jserver.model.world;
|
||||
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.capability.Playable;
|
||||
|
||||
/**
|
||||
* {@link Player} is any object that can be controlled by the player. The most
|
||||
* common implementation is {@link L2Character}.
|
||||
*
|
||||
* @author Rogiel
|
||||
*/
|
||||
public abstract class Player extends AbstractActor implements Playable, Actor {
|
||||
public abstract class Player extends Actor {
|
||||
|
||||
}
|
||||
|
||||
@@ -14,22 +14,38 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
package com.l2jserver.model.world;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
import com.l2jserver.util.dimensional.Coordinate;
|
||||
import com.l2jserver.util.dimensional.Point;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that can be dropped on the ground.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*
|
||||
*/
|
||||
public interface Dropable extends Positionable {
|
||||
public abstract class PositionableObject extends AbstractObject {
|
||||
private Point point;
|
||||
|
||||
/**
|
||||
* When an item is dropped its position will be set as <tt>position</tt>
|
||||
*
|
||||
* @param position
|
||||
* the position
|
||||
* @return the coordinate point
|
||||
*/
|
||||
void drop(Coordinate position);
|
||||
public Point getPoint() {
|
||||
return point;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param point
|
||||
* the coordinate point to set
|
||||
*/
|
||||
public void setPoint(Point point) {
|
||||
this.point = point;
|
||||
}
|
||||
|
||||
public Coordinate getPosition() {
|
||||
return point.getCoordinate();
|
||||
}
|
||||
|
||||
public void setPosition(Coordinate coord) {
|
||||
this.point = new Point(coord, (point != null ? point.getAngle() : 0));
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jserver.model.world.actor;
|
||||
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
|
||||
/**
|
||||
* Class controlling active effects on an {@link Actor}.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jserver.model.world.actor;
|
||||
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
|
||||
/**
|
||||
* This enumeration maps for each level the minimum experience required.
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
import com.l2jserver.model.game.Skill;
|
||||
import com.l2jserver.model.id.template.SkillTemplateID;
|
||||
import com.l2jserver.model.template.SkillTemplate;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.util.factory.CollectionFactory;
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jserver.model.world.actor.event;
|
||||
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.service.game.world.event.WorldEvent;
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
package com.l2jserver.model.world.actor.event;
|
||||
|
||||
import com.l2jserver.model.id.ObjectID;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.capability.Spawnable;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
import com.l2jserver.model.world.event.SpawnEvent;
|
||||
import com.l2jserver.util.dimensional.Point;
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ActorSpawnEvent implements ActorEvent, SpawnEvent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Spawnable getObject() {
|
||||
public WorldObject getObject() {
|
||||
return actor;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.id.object.ActorID;
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
import com.l2jserver.model.world.actor.ActorEffects;
|
||||
import com.l2jserver.model.world.actor.ActorSkillContainer;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that defines an Actor (NPC, player, pet,
|
||||
* etc...)
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Actor extends Spawnable, Pointable, Damagable, Attackable,
|
||||
Attacker, Castable, Caster, Levelable, Killable, Equiper, Equipable {
|
||||
/**
|
||||
* @return the actor effects
|
||||
*/
|
||||
ActorEffects getEffects();
|
||||
|
||||
/**
|
||||
* @return the actor skills
|
||||
*/
|
||||
ActorSkillContainer getSkills();
|
||||
|
||||
@Override
|
||||
ActorID<?> getID();
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that can receive attacks from an
|
||||
* {@link Attacker}.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Attackable extends ObjectCapability {
|
||||
void receiveAttack(Attacker attacker,
|
||||
com.l2jserver.model.template.capability.Attackable weapon);
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that can attack an {@link Attackable}.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Attacker extends ObjectCapability {
|
||||
void attack(Attackable target,
|
||||
com.l2jserver.model.template.capability.Attackable weapon);
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that can receive skill castings.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Castable extends ObjectCapability {
|
||||
void cast();
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.template.SkillTemplate;
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that can cast skills.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Caster extends ObjectCapability {
|
||||
void cast(SkillTemplate skill, Castable cast);
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.template.ItemTemplate;
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that can be consumed.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Consumable extends ObjectCapability {
|
||||
void consume(ItemTemplate item, Castable target);
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that an player can talk to.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Conversable extends ObjectCapability {
|
||||
void talk(Talker talker);
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that can be enchanted.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Enchantable extends ObjectCapability {
|
||||
/**
|
||||
* Get the current enchant level in the object
|
||||
*
|
||||
* @return the enchant level
|
||||
*/
|
||||
int getEnchantLevel();
|
||||
|
||||
/**
|
||||
* Set the new enchant level in the object
|
||||
*
|
||||
* @param level
|
||||
* the enchant level
|
||||
*/
|
||||
void setEnchantLevel(int level);
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that can be equipped into an
|
||||
* {@link Equiper}.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Equipable extends ObjectCapability {
|
||||
void equip(Equiper equiper);
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that can be equipped with {@link Equipable}
|
||||
* instances.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
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);
|
||||
|
||||
void getEquipment(Object slot);
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that can become invisible to other objects.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Invisible extends ObjectCapability {
|
||||
boolean isInvisible();
|
||||
|
||||
void setInvisible();
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that other objects can join to.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Joinable<T> extends ObjectCapability, Iterable<T> {
|
||||
/**
|
||||
* Join an <tt>member</tt> to this object.
|
||||
*
|
||||
* @param member
|
||||
* the entering member
|
||||
*/
|
||||
void join(T member);
|
||||
|
||||
/**
|
||||
* Removes the joined <tt>member</tt> from this object
|
||||
*
|
||||
* @param member
|
||||
* the exiting member
|
||||
*/
|
||||
void leave(T member);
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
|
||||
/**
|
||||
* Defines an base interface for all capabilities for {@link AbstractObject}
|
||||
* instances. No implementing class need to implement this interface.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface ObjectCapability extends WorldObject {
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that can be played (i.e. controlled by the
|
||||
* player)
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Playable extends ObjectCapability {
|
||||
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
import com.l2jserver.util.dimensional.Point;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that can be positioned and pointed in the
|
||||
* world.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Pointable extends Positionable {
|
||||
Point getPoint();
|
||||
|
||||
void setPoint(Point point);
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
import com.l2jserver.util.dimensional.Coordinate;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that can be positioned in the world.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Positionable extends ObjectCapability {
|
||||
Coordinate getPosition();
|
||||
|
||||
void setPosition(Coordinate coord);
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
import com.l2jserver.util.dimensional.Coordinate;
|
||||
|
||||
/**
|
||||
* Represents an {@link AbstractObject} that can be spawned.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Spawnable extends ObjectCapability, Positionable, Pointable {
|
||||
void spawn(Coordinate coordinate);
|
||||
|
||||
boolean isSpawned();
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
import com.l2jserver.util.dimensional.Coordinate;
|
||||
|
||||
/**
|
||||
* Represents an {@link AbstractObject} that can be summoned.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Summonable extends Spawnable {
|
||||
void summon(Coordinate coordinate);
|
||||
|
||||
boolean isSummoned();
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.capability;
|
||||
|
||||
import com.l2jserver.model.world.AbstractObject;
|
||||
|
||||
/**
|
||||
* Defines an {@link AbstractObject} that can talk to an {@link Conversable}.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface Talker extends ObjectCapability {
|
||||
}
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jserver.model.world.character;
|
||||
|
||||
import com.l2jserver.model.world.AbstractActor.Race;
|
||||
import com.l2jserver.model.world.Actor.Race;
|
||||
|
||||
/**
|
||||
* Defines all the possible classes for an character
|
||||
|
||||
@@ -19,10 +19,10 @@ package com.l2jserver.model.world.character.event;
|
||||
import java.util.Date;
|
||||
|
||||
import com.l2jserver.model.id.ObjectID;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.Player;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
|
||||
/**
|
||||
* Event triggered once a character logs-in.
|
||||
|
||||
@@ -19,10 +19,10 @@ package com.l2jserver.model.world.character.event;
|
||||
import java.util.Date;
|
||||
|
||||
import com.l2jserver.model.id.ObjectID;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.Player;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
|
||||
/**
|
||||
* Event triggered once a character logs-out.
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
package com.l2jserver.model.world.character.event;
|
||||
|
||||
import com.l2jserver.model.id.ObjectID;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.Player;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.util.dimensional.Point;
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
package com.l2jserver.model.world.character.event;
|
||||
|
||||
import com.l2jserver.model.id.ObjectID;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.Player;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
|
||||
/**
|
||||
* Event triggered once a character starts running
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
package com.l2jserver.model.world.character.event;
|
||||
|
||||
import com.l2jserver.model.id.ObjectID;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.Player;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.util.dimensional.Point;
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
package com.l2jserver.model.world.character.event;
|
||||
|
||||
import com.l2jserver.model.id.ObjectID;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.Player;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
|
||||
/**
|
||||
* Event triggered once a character moves
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
package com.l2jserver.model.world.character.event;
|
||||
|
||||
import com.l2jserver.model.id.ObjectID;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.Player;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
|
||||
/**
|
||||
* Event triggered once a character moves
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
package com.l2jserver.model.world.character.event;
|
||||
|
||||
import com.l2jserver.model.id.ObjectID;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.Player;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
|
||||
/**
|
||||
* Event triggered once a character starts walking
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
*/
|
||||
package com.l2jserver.model.world.event;
|
||||
|
||||
import com.l2jserver.model.world.capability.Spawnable;
|
||||
import com.l2jserver.service.game.world.event.WorldEvent;
|
||||
import com.l2jserver.util.dimensional.Point;
|
||||
|
||||
@@ -26,9 +25,6 @@ import com.l2jserver.util.dimensional.Point;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface SpawnEvent extends WorldEvent {
|
||||
@Override
|
||||
Spawnable getObject();
|
||||
|
||||
/**
|
||||
* @return the spawning point
|
||||
*/
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
package com.l2jserver.model.world.item;
|
||||
|
||||
import com.l2jserver.model.id.ObjectID;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.Item;
|
||||
import com.l2jserver.model.world.Player;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.player.event.PlayerEvent;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.party;
|
||||
|
||||
import com.l2jserver.model.world.Clan;
|
||||
import com.l2jserver.model.world.Party;
|
||||
import com.l2jserver.service.game.world.event.WorldEvent;
|
||||
|
||||
/**
|
||||
* Base event for {@link Party} objects
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface PartyEvent extends WorldEvent {
|
||||
Clan getClan();
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver <l2jserver.com>.
|
||||
*
|
||||
* l2jserver is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.model.world.party;
|
||||
|
||||
import com.l2jserver.service.game.world.event.WorldEvent;
|
||||
import com.l2jserver.service.game.world.event.WorldListener;
|
||||
|
||||
/**
|
||||
* This listener will filter to only dispatch {@link PartyEvent} events.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public abstract class PartyListener implements WorldListener {
|
||||
@Override
|
||||
public boolean dispatch(WorldEvent e) {
|
||||
if (!(e instanceof PartyEvent))
|
||||
return false;
|
||||
return dispatch((PartyEvent) e);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see WorldListener#dispatch(WorldEvent)
|
||||
*/
|
||||
protected abstract boolean dispatch(PartyEvent e);
|
||||
}
|
||||
@@ -17,9 +17,9 @@
|
||||
package com.l2jserver.model.world.player.event;
|
||||
|
||||
import com.l2jserver.model.id.ObjectID;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.Player;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.util.dimensional.Point;
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jserver.service.game.ai;
|
||||
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.service.Service;
|
||||
import com.l2jserver.util.dimensional.Coordinate;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package com.l2jserver.service.game.ai;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.service.AbstractService;
|
||||
import com.l2jserver.service.AbstractService.Depends;
|
||||
import com.l2jserver.service.ServiceStartException;
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
*/
|
||||
package com.l2jserver.service.game.ai.script;
|
||||
|
||||
import com.l2jserver.model.world.capability.Attackable;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.service.game.ai.AIScript;
|
||||
|
||||
/**
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a
|
||||
*/
|
||||
public interface AttackAIScript extends AIScript {
|
||||
void attack(Attackable target);
|
||||
void attack(Actor actor);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jserver.service.game.ai.script;
|
||||
|
||||
import com.l2jserver.model.world.capability.Positionable;
|
||||
import com.l2jserver.model.world.PositionableObject;
|
||||
|
||||
/**
|
||||
* This AI is used to receive notifications once another object aproaches.
|
||||
@@ -31,5 +31,5 @@ public interface ProximityAIScript {
|
||||
* @param object
|
||||
* the object
|
||||
*/
|
||||
void approach(Positionable object);
|
||||
void approach(PositionableObject object);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jserver.service.game.ai.script;
|
||||
|
||||
import com.l2jserver.model.world.capability.Positionable;
|
||||
import com.l2jserver.model.world.PositionableObject;
|
||||
import com.l2jserver.service.game.ai.AIScript;
|
||||
import com.l2jserver.util.dimensional.Coordinate;
|
||||
|
||||
@@ -26,5 +26,5 @@ import com.l2jserver.util.dimensional.Coordinate;
|
||||
public interface WalkingAIScript extends AIScript {
|
||||
void walk(Coordinate coord);
|
||||
|
||||
void follow(Positionable positionable);
|
||||
void follow(PositionableObject positionable);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package com.l2jserver.service.game.character;
|
||||
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
|
||||
/**
|
||||
* Exception thrown when the character is trying to attack an {@link Actor} that
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
package com.l2jserver.service.game.character;
|
||||
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.service.Service;
|
||||
import com.l2jserver.service.game.spawn.AlreadySpawnedServiceException;
|
||||
import com.l2jserver.service.game.spawn.NotSpawnedServiceException;
|
||||
|
||||
@@ -32,13 +32,13 @@ import com.l2jserver.game.net.packet.server.GameGuardQueryPacket;
|
||||
import com.l2jserver.game.net.packet.server.NPCInformationPacket;
|
||||
import com.l2jserver.model.id.object.CharacterID;
|
||||
import com.l2jserver.model.template.NPCTemplate;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.L2Character.CharacterMoveType;
|
||||
import com.l2jserver.model.world.L2Character.CharacterState;
|
||||
import com.l2jserver.model.world.NPC;
|
||||
import com.l2jserver.model.world.PositionableObject;
|
||||
import com.l2jserver.model.world.WorldObject;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.model.world.capability.Positionable;
|
||||
import com.l2jserver.model.world.character.event.CharacterEnterWorldEvent;
|
||||
import com.l2jserver.model.world.character.event.CharacterEvent;
|
||||
import com.l2jserver.model.world.character.event.CharacterLeaveWorldEvent;
|
||||
@@ -160,10 +160,10 @@ public class CharacterServiceImpl extends AbstractService implements
|
||||
// the given event will be broadcasted or not
|
||||
// TODO this should not be here, it should be i world service or a newly
|
||||
// created broadcast service.
|
||||
final WorldListener broadcastListener = new FilteredWorldListener<Positionable>(
|
||||
final WorldListener broadcastListener = new FilteredWorldListener<PositionableObject>(
|
||||
new KnownListFilter(character)) {
|
||||
@Override
|
||||
protected boolean dispatch(WorldEvent e, Positionable object) {
|
||||
protected boolean dispatch(WorldEvent e, PositionableObject object) {
|
||||
if (e instanceof NPCSpawnEvent) {
|
||||
conn.write(new NPCInformationPacket((NPC) object));
|
||||
} else if (e instanceof CharacterMoveEvent) {
|
||||
@@ -175,7 +175,7 @@ public class CharacterServiceImpl extends AbstractService implements
|
||||
} else if (e instanceof PlayerTeleportedEvent
|
||||
|| e instanceof CharacterEnterWorldEvent) {
|
||||
// TODO this should not be here!
|
||||
for (final WorldObject o : worldService
|
||||
for (final PositionableObject o : worldService
|
||||
.iterable(new KnownListFilter(character))) {
|
||||
if (o instanceof NPC) {
|
||||
conn.write(new NPCInformationPacket((NPC) o));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user