mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-07 16:03:10 +00:00
Clean up in the entire source code
Major clean up in the source code reformatting it and organizing imports.
This commit is contained in:
@@ -42,6 +42,9 @@ public class PluginLoader implements Loader, Unloader {
|
||||
/**
|
||||
* Returns list of suitable Template classes to load/unload
|
||||
*
|
||||
* @param classes
|
||||
* loaded classes
|
||||
*
|
||||
* @return list of Template classes to load/unload
|
||||
*/
|
||||
@SuppressWarnings({ "unchecked", "unused" })
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.l2jserver.model.world.NPC;
|
||||
public class MonsterAI extends NPCAI {
|
||||
/**
|
||||
* @param creature
|
||||
* the creature
|
||||
*/
|
||||
protected MonsterAI(NPC creature) {
|
||||
super(creature);
|
||||
|
||||
@@ -38,7 +38,9 @@ import com.l2jserver.service.network.keygen.BlowfishKeygenService;
|
||||
public class L2JGameServerMain {
|
||||
/**
|
||||
* Main method
|
||||
* @param args no arguments are used
|
||||
*
|
||||
* @param args
|
||||
* no arguments are used
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
final L2JGameServer server = new L2JGameServer();
|
||||
|
||||
@@ -30,6 +30,7 @@ public interface Desire extends Comparable<Desire> {
|
||||
*
|
||||
* @return hashcode for this object
|
||||
*/
|
||||
@Override
|
||||
int hashCode();
|
||||
|
||||
/**
|
||||
@@ -39,6 +40,7 @@ public interface Desire extends Comparable<Desire> {
|
||||
* another object to compare with
|
||||
* @return result of object comparation
|
||||
*/
|
||||
@Override
|
||||
boolean equals(Object obj);
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,8 @@ package com.l2jserver.game.ai.desires;
|
||||
public interface DesireIteratorFilter {
|
||||
/**
|
||||
* This method is called each time for every desire that is in the queue.<br>
|
||||
* <br> {@link java.util.ConcurrentModificationException} will be thrown by
|
||||
* <br>
|
||||
* {@link java.util.ConcurrentModificationException} will be thrown by
|
||||
* {@link com.l2jserver.game.ai.desires.DesireQueue#iterateDesires(DesireIteratorHandler, DesireIteratorFilter[])}
|
||||
* if any of the following methods will be called from here:
|
||||
* <ul>
|
||||
|
||||
@@ -33,7 +33,8 @@ public interface DesireIteratorHandler {
|
||||
/**
|
||||
* This method is called each time for every desire that is in the queue.<br>
|
||||
* Remove of desire must be handeled by <b>iterator.remove();</b><br>
|
||||
* <br> {@link java.util.ConcurrentModificationException} will be thrown by
|
||||
* <br>
|
||||
* {@link java.util.ConcurrentModificationException} will be thrown by
|
||||
* {@link com.l2jserver.game.ai.desires.DesireQueue#iterateDesires(DesireIteratorHandler, DesireIteratorFilter[])}
|
||||
* if any of the following methods will be called from here:
|
||||
* <ul>
|
||||
|
||||
@@ -59,9 +59,13 @@ public class Lineage2PipelineFactory implements ChannelPipelineFactory {
|
||||
|
||||
/**
|
||||
* Creates a new instance of this pipeline
|
||||
* @param injector the {@link Guice} {@link Injector}
|
||||
* @param networkService the network service
|
||||
* @param worldService the world service
|
||||
*
|
||||
* @param injector
|
||||
* the {@link Guice} {@link Injector}
|
||||
* @param networkService
|
||||
* the network service
|
||||
* @param worldService
|
||||
* the world service
|
||||
*/
|
||||
@Inject
|
||||
public Lineage2PipelineFactory(Injector injector,
|
||||
|
||||
@@ -94,7 +94,8 @@ public class Shortcut extends AbstractModel<ShortcutID> {
|
||||
public final int id;
|
||||
|
||||
/**
|
||||
* @param id the numeric id
|
||||
* @param id
|
||||
* the numeric id
|
||||
*/
|
||||
ShortcutType(int id) {
|
||||
this.id = id;
|
||||
|
||||
@@ -33,7 +33,8 @@ public abstract class ID<T> {
|
||||
protected final T id;
|
||||
|
||||
/**
|
||||
* @param id the raw id
|
||||
* @param id
|
||||
* the raw id
|
||||
*/
|
||||
@Inject
|
||||
protected ID(T id) {
|
||||
|
||||
@@ -34,7 +34,8 @@ import com.l2jserver.model.world.Actor;
|
||||
*/
|
||||
public abstract class ActorID<T extends Actor> extends ObjectID<T> {
|
||||
/**
|
||||
* @param id the raw id
|
||||
* @param id
|
||||
* the raw id
|
||||
*/
|
||||
@Inject
|
||||
public ActorID(@Assisted int id) {
|
||||
|
||||
@@ -38,8 +38,10 @@ public final class CharacterID extends ActorID<L2Character> {
|
||||
private transient final CharacterDAO characterDao;
|
||||
|
||||
/**
|
||||
* @param id the raw id
|
||||
* @param characterDao the character DAO
|
||||
* @param id
|
||||
* the raw id
|
||||
* @param characterDao
|
||||
* the character DAO
|
||||
*/
|
||||
@Inject
|
||||
public CharacterID(@Assisted int id, CharacterDAO characterDao) {
|
||||
|
||||
@@ -38,8 +38,10 @@ public final class ClanID extends ObjectID<Clan> {
|
||||
private final ClanDAO clanDao;
|
||||
|
||||
/**
|
||||
* @param id the raw id
|
||||
* @param clanDao the clan DAO
|
||||
* @param id
|
||||
* the raw id
|
||||
* @param clanDao
|
||||
* the clan DAO
|
||||
*/
|
||||
@Inject
|
||||
protected ClanID(@Assisted int id, ClanDAO clanDao) {
|
||||
|
||||
@@ -38,8 +38,10 @@ public final class ItemID extends ObjectID<Item> {
|
||||
private final ItemDAO itemDao;
|
||||
|
||||
/**
|
||||
* @param id the raw id
|
||||
* @param itemDao the item DAO
|
||||
* @param id
|
||||
* the raw id
|
||||
* @param itemDao
|
||||
* the item DAO
|
||||
*/
|
||||
@Inject
|
||||
protected ItemID(@Assisted int id, ItemDAO itemDao) {
|
||||
|
||||
@@ -37,8 +37,10 @@ public final class PetID extends ActorID<Pet> {
|
||||
private final PetDAO petDao;
|
||||
|
||||
/**
|
||||
* @param id the raw id
|
||||
* @param petDao the pet DAO
|
||||
* @param id
|
||||
* the raw id
|
||||
* @param petDao
|
||||
* the pet DAO
|
||||
*/
|
||||
@Inject
|
||||
protected PetID(int id, PetDAO petDao) {
|
||||
|
||||
@@ -28,7 +28,8 @@ import com.l2jserver.service.game.template.TemplateService;
|
||||
* An {@link TemplateID} instance representing an {@link ActorTemplate} object
|
||||
*
|
||||
* @param <T>
|
||||
* the type of {@link ActorTemplate} this {@link TemplateID} represents
|
||||
* the type of {@link ActorTemplate} this {@link TemplateID}
|
||||
* represents
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class ActorTemplateID<T extends ActorTemplate<?>> extends
|
||||
@@ -39,8 +40,10 @@ public class ActorTemplateID<T extends ActorTemplate<?>> extends
|
||||
private transient final TemplateService templateService;
|
||||
|
||||
/**
|
||||
* @param id the raw id
|
||||
* @param templateService the template service
|
||||
* @param id
|
||||
* the raw id
|
||||
* @param templateService
|
||||
* the template service
|
||||
*/
|
||||
@Inject
|
||||
protected ActorTemplateID(@Assisted int id, TemplateService templateService) {
|
||||
|
||||
@@ -30,8 +30,10 @@ import com.l2jserver.service.game.template.TemplateService;
|
||||
*/
|
||||
public class CharacterTemplateID extends ActorTemplateID<CharacterTemplate> {
|
||||
/**
|
||||
* @param id the raw id
|
||||
* @param templateService the template service
|
||||
* @param id
|
||||
* the raw id
|
||||
* @param templateService
|
||||
* the template service
|
||||
*/
|
||||
@Inject
|
||||
public CharacterTemplateID(@Assisted int id, TemplateService templateService) {
|
||||
|
||||
@@ -37,8 +37,10 @@ public class ItemTemplateID extends TemplateID<ItemTemplate, Integer> {
|
||||
private final TemplateService templateService;
|
||||
|
||||
/**
|
||||
* @param id the raw id
|
||||
* @param templateService the template service
|
||||
* @param id
|
||||
* the raw id
|
||||
* @param templateService
|
||||
* the template service
|
||||
*/
|
||||
@Inject
|
||||
public ItemTemplateID(@Assisted int id, TemplateService templateService) {
|
||||
|
||||
@@ -33,8 +33,10 @@ import com.l2jserver.util.jaxb.NPCTemplateIDAdapter;
|
||||
@XmlJavaTypeAdapter(value = NPCTemplateIDAdapter.class)
|
||||
public class NPCTemplateID extends ActorTemplateID<NPCTemplate> {
|
||||
/**
|
||||
* @param id the raw id
|
||||
* @param templateService the template service
|
||||
* @param id
|
||||
* the raw id
|
||||
* @param templateService
|
||||
* the template service
|
||||
*/
|
||||
@Inject
|
||||
public NPCTemplateID(@Assisted int id, TemplateService templateService) {
|
||||
|
||||
@@ -34,8 +34,10 @@ public class SkillTemplateID extends TemplateID<SkillTemplate, Integer> {
|
||||
private final TemplateService templateService;
|
||||
|
||||
/**
|
||||
* @param id the raw id
|
||||
* @param templateService the template service
|
||||
* @param id
|
||||
* the raw id
|
||||
* @param templateService
|
||||
* the template service
|
||||
*/
|
||||
@Inject
|
||||
public SkillTemplateID(@Assisted int id, TemplateService templateService) {
|
||||
|
||||
@@ -40,8 +40,10 @@ public class TeleportationTemplateID extends
|
||||
private final TemplateService templateService;
|
||||
|
||||
/**
|
||||
* @param id the raw id
|
||||
* @param templateService the template service
|
||||
* @param id
|
||||
* the raw id
|
||||
* @param templateService
|
||||
* the template service
|
||||
*/
|
||||
@Inject
|
||||
public TeleportationTemplateID(@Assisted int id,
|
||||
|
||||
@@ -14,7 +14,8 @@ public enum CharacterRace {
|
||||
public final int id;
|
||||
|
||||
/**
|
||||
* @param id the race numeric id
|
||||
* @param id
|
||||
* the race numeric id
|
||||
*/
|
||||
CharacterRace(int id) {
|
||||
this.id = id;
|
||||
|
||||
@@ -70,7 +70,8 @@ public class Item extends PositionableObject {
|
||||
private long count = 1;
|
||||
|
||||
/**
|
||||
* @param templateID the item template id
|
||||
* @param templateID
|
||||
* the item template id
|
||||
*/
|
||||
public Item(ItemTemplateID templateID) {
|
||||
this.templateID = templateID;
|
||||
|
||||
@@ -361,6 +361,7 @@ public class L2Character extends Player {
|
||||
/**
|
||||
* @return the stats
|
||||
*/
|
||||
@Override
|
||||
public CharacterStats getStats() {
|
||||
return stats;
|
||||
}
|
||||
|
||||
@@ -101,8 +101,10 @@ public class NPC extends Actor {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param maxHP the maximum HP
|
||||
* @throws UnsupportedOperationException always
|
||||
* @param maxHP
|
||||
* the maximum HP
|
||||
* @throws UnsupportedOperationException
|
||||
* always
|
||||
*/
|
||||
public void setMaxHP(double maxHP) {
|
||||
throw new UnsupportedOperationException();
|
||||
@@ -116,8 +118,10 @@ public class NPC extends Actor {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param maxMP the maximum MP
|
||||
* @throws UnsupportedOperationException always
|
||||
* @param maxMP
|
||||
* the maximum MP
|
||||
* @throws UnsupportedOperationException
|
||||
* always
|
||||
*/
|
||||
public void setMaxMP(double maxMP) {
|
||||
throw new UnsupportedOperationException();
|
||||
|
||||
@@ -37,7 +37,8 @@ public class Pet extends Player {
|
||||
private ItemID itemID;
|
||||
|
||||
/**
|
||||
* @param templateID the pet template id
|
||||
* @param templateID
|
||||
* the pet template id
|
||||
*/
|
||||
public Pet(ActorTemplateID<?> templateID) {
|
||||
super(templateID);
|
||||
|
||||
@@ -26,7 +26,8 @@ import com.l2jserver.model.id.template.ActorTemplateID;
|
||||
*/
|
||||
public abstract class Player extends Actor {
|
||||
/**
|
||||
* @param templateID the actor template id
|
||||
* @param templateID
|
||||
* the actor template id
|
||||
*/
|
||||
public Player(ActorTemplateID<?> templateID) {
|
||||
super(templateID);
|
||||
|
||||
@@ -55,7 +55,8 @@ public abstract class PositionableObject extends AbstractObject {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param coord sets the current position
|
||||
* @param coord
|
||||
* sets the current position
|
||||
*/
|
||||
public void setPosition(Coordinate coord) {
|
||||
desireUpdate();
|
||||
|
||||
@@ -79,7 +79,8 @@ public enum ActorExperience {
|
||||
public final int level;
|
||||
|
||||
/**
|
||||
* @param experience the minimum experience for the level
|
||||
* @param experience
|
||||
* the minimum experience for the level
|
||||
*/
|
||||
ActorExperience(long experience) {
|
||||
this.experience = experience;
|
||||
|
||||
@@ -139,6 +139,7 @@ public class CharacterShortcutContainer implements Iterable<Shortcut> {
|
||||
|
||||
/**
|
||||
* Compares two shortcut slots
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public static class ShortcutSlotComparator implements Comparator<Shortcut>,
|
||||
|
||||
@@ -28,7 +28,8 @@ import com.l2jserver.util.calculator.Calculator;
|
||||
*/
|
||||
public class CharacterCalculator extends ActorCalculator {
|
||||
/**
|
||||
* @param calculators the calculators
|
||||
* @param calculators
|
||||
* the calculators
|
||||
*/
|
||||
public CharacterCalculator(
|
||||
Calculator<ActorCalculatorContext, StatType>... calculators) {
|
||||
|
||||
@@ -32,7 +32,9 @@ public class CharacterCalculatorContext extends ActorCalculatorContext {
|
||||
|
||||
/**
|
||||
* Creates a new context
|
||||
* @param character the character
|
||||
*
|
||||
* @param character
|
||||
* the character
|
||||
*/
|
||||
public CharacterCalculatorContext(L2Character character) {
|
||||
super(character);
|
||||
|
||||
@@ -25,8 +25,10 @@ import com.l2jserver.model.world.actor.stat.StatType;
|
||||
*/
|
||||
public abstract class CharacterFormula extends CharacterCalculatorFunction {
|
||||
/**
|
||||
* @param order the calculation order
|
||||
* @param type the stat type
|
||||
* @param order
|
||||
* the calculation order
|
||||
* @param type
|
||||
* the stat type
|
||||
*/
|
||||
public CharacterFormula(int order, StatType type) {
|
||||
super(order, type);
|
||||
|
||||
@@ -41,6 +41,7 @@ public class MaximumCPAddCalculator extends CharacterFormula {
|
||||
super(0x100, StatType.MAX_CP);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected double calculate(L2Character c, CharacterTemplate t, double value) {
|
||||
int lvl = c.getLevel() - t.getMinimumLevel();
|
||||
double mod = t.getBaseCPModifier() * lvl;
|
||||
|
||||
@@ -42,6 +42,7 @@ public class MaximumCPBonusCalculator extends CharacterFormula {
|
||||
super(0x100, StatType.MAX_CP);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected double calculate(L2Character c, CharacterTemplate t, double value) {
|
||||
return value
|
||||
* BaseStats.CON.calculateBonus(c.getStats().getConcentration());
|
||||
|
||||
@@ -41,6 +41,7 @@ public class MaximumHPAddCalculator extends CharacterFormula {
|
||||
super(0x100, StatType.MAX_HP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double calculate(L2Character c, CharacterTemplate t, double value) {
|
||||
int lvl = c.getLevel() - t.getMinimumLevel();
|
||||
double mod = t.getBaseHPModifier() * lvl;
|
||||
|
||||
@@ -32,7 +32,9 @@ public class NPCCalculatorContext extends ActorCalculatorContext {
|
||||
|
||||
/**
|
||||
* Creates a new calculator context
|
||||
* @param npc the {@link NPC}
|
||||
*
|
||||
* @param npc
|
||||
* the {@link NPC}
|
||||
*/
|
||||
public NPCCalculatorContext(NPC npc) {
|
||||
super(npc);
|
||||
|
||||
@@ -20,8 +20,10 @@ package com.l2jserver.service.cache;
|
||||
* This interface represents a Map structure for cache usage.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
* @param <K> the key type
|
||||
* @param <V> the value type
|
||||
* @param <K>
|
||||
* the key type
|
||||
* @param <V>
|
||||
* the value type
|
||||
*/
|
||||
public interface Cache<K, V> extends Iterable<V> {
|
||||
/**
|
||||
|
||||
@@ -56,7 +56,8 @@ public interface CacheService extends Service {
|
||||
* the cache value type
|
||||
* @param name
|
||||
* the cache name
|
||||
* @param size the maximum cache size
|
||||
* @param size
|
||||
* the maximum cache size
|
||||
* @size the maximum cache size
|
||||
* @return the created cache
|
||||
*/
|
||||
@@ -73,7 +74,8 @@ public interface CacheService extends Service {
|
||||
* the cache value type
|
||||
* @param name
|
||||
* the cache name
|
||||
* @param size the maximum cache size
|
||||
* @param size
|
||||
* the maximum cache size
|
||||
* @size the maximum cache size
|
||||
* @return the created cache
|
||||
*/
|
||||
|
||||
@@ -180,7 +180,8 @@ public class EhCacheService extends AbstractService implements CacheService {
|
||||
private final net.sf.ehcache.Cache cache;
|
||||
|
||||
/**
|
||||
* @param cache the backing cache
|
||||
* @param cache
|
||||
* the backing cache
|
||||
*/
|
||||
public EhCacheFacade(net.sf.ehcache.Cache cache) {
|
||||
this.cache = cache;
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Indicate to the proxy that this method should not be cached.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -35,8 +35,10 @@ class MethodInvocation {
|
||||
private final Object[] args;
|
||||
|
||||
/**
|
||||
* @param method the method invoked
|
||||
* @param args the invocation arguments
|
||||
* @param method
|
||||
* the method invoked
|
||||
* @param args
|
||||
* the invocation arguments
|
||||
*/
|
||||
public MethodInvocation(Method method, Object[] args) {
|
||||
this.method = method;
|
||||
|
||||
@@ -101,7 +101,8 @@ public class SoftCacheService extends AbstractService implements CacheService {
|
||||
|
||||
@Override
|
||||
public <K, V> Cache<K, V> createEternalCache(String name, int size) {
|
||||
log.debug("Creating eternal cache {} with minimum size of {}", name, size);
|
||||
log.debug("Creating eternal cache {} with minimum size of {}", name,
|
||||
size);
|
||||
return new EternalCache<K, V>(name);
|
||||
}
|
||||
|
||||
@@ -130,11 +131,13 @@ public class SoftCacheService extends AbstractService implements CacheService {
|
||||
* value object)
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
* @param <K> the key type
|
||||
* @param <V> the value type
|
||||
* @param <K>
|
||||
* the key type
|
||||
* @param <V>
|
||||
* the value type
|
||||
*/
|
||||
private class SoftCache<K, V> extends AbstractReferenceCache<K, V> implements
|
||||
Cache<K, V> {
|
||||
private class SoftCache<K, V> extends AbstractReferenceCache<K, V>
|
||||
implements Cache<K, V> {
|
||||
/**
|
||||
* This class is a {@link SoftReference} with additional responsibility
|
||||
* of holding key object
|
||||
|
||||
@@ -42,7 +42,8 @@ public abstract class AbstractDAO<T extends Model<?>, I extends ID<?>>
|
||||
protected final DatabaseService database;
|
||||
|
||||
/**
|
||||
* @param database the database service
|
||||
* @param database
|
||||
* the database service
|
||||
*/
|
||||
@Inject
|
||||
protected AbstractDAO(DatabaseService database) {
|
||||
|
||||
@@ -41,7 +41,8 @@ public abstract class AbstractJDBCDAO<T extends Model<?>, I extends ID<?>>
|
||||
protected final JDBCDatabaseService database;
|
||||
|
||||
/**
|
||||
* @param database the database service
|
||||
* @param database
|
||||
* the database service
|
||||
*/
|
||||
@Inject
|
||||
protected AbstractJDBCDAO(DatabaseService database) {
|
||||
|
||||
@@ -64,9 +64,12 @@ public abstract class JDBCCharacterFriendDAO extends
|
||||
+ "_friend";
|
||||
|
||||
/**
|
||||
* @param database the database service
|
||||
* @param idProvider the frind id provider
|
||||
* @param charIdProvider the character id provider
|
||||
* @param database
|
||||
* the database service
|
||||
* @param idProvider
|
||||
* the frind id provider
|
||||
* @param charIdProvider
|
||||
* the character id provider
|
||||
*/
|
||||
@Inject
|
||||
public JDBCCharacterFriendDAO(DatabaseService database,
|
||||
|
||||
@@ -80,10 +80,14 @@ public abstract class JDBCItemDAO extends AbstractJDBCDAO<Item, ItemID>
|
||||
public static final String COORD_Z = "coord_z";
|
||||
|
||||
/**
|
||||
* @param database the database service
|
||||
* @param idFactory the item id provider
|
||||
* @param templateIdFactory the item template id provider
|
||||
* @param charIdFactory the character id provider
|
||||
* @param database
|
||||
* the database service
|
||||
* @param idFactory
|
||||
* the item id provider
|
||||
* @param templateIdFactory
|
||||
* the item template id provider
|
||||
* @param charIdFactory
|
||||
* the character id provider
|
||||
*/
|
||||
@Inject
|
||||
public JDBCItemDAO(DatabaseService database,
|
||||
|
||||
@@ -31,9 +31,12 @@ import com.l2jserver.service.database.jdbc.JDBCCharacterFriendDAO;
|
||||
public class H2CharacterFriendDAO extends JDBCCharacterFriendDAO implements
|
||||
CharacterFriendDAO {
|
||||
/**
|
||||
* @param database the database service
|
||||
* @param idProvider the frind id provider
|
||||
* @param charIdProvider the character id provider
|
||||
* @param database
|
||||
* the database service
|
||||
* @param idProvider
|
||||
* the frind id provider
|
||||
* @param charIdProvider
|
||||
* the character id provider
|
||||
*/
|
||||
@Inject
|
||||
public H2CharacterFriendDAO(DatabaseService database,
|
||||
|
||||
@@ -31,10 +31,14 @@ import com.l2jserver.service.database.jdbc.JDBCItemDAO;
|
||||
*/
|
||||
public class H2ItemDAO extends JDBCItemDAO implements ItemDAO {
|
||||
/**
|
||||
* @param database the database service
|
||||
* @param idFactory the item id provider
|
||||
* @param templateIdFactory the item template id provider
|
||||
* @param charIdFactory the character id provider
|
||||
* @param database
|
||||
* the database service
|
||||
* @param idFactory
|
||||
* the item id provider
|
||||
* @param templateIdFactory
|
||||
* the item template id provider
|
||||
* @param charIdFactory
|
||||
* the character id provider
|
||||
*/
|
||||
@Inject
|
||||
public H2ItemDAO(DatabaseService database, ItemIDProvider idFactory,
|
||||
|
||||
@@ -31,9 +31,12 @@ import com.l2jserver.service.database.jdbc.JDBCNPCDAO;
|
||||
*/
|
||||
public class H2NPCDAO extends JDBCNPCDAO implements NPCDAO {
|
||||
/**
|
||||
* @param database the database service
|
||||
* @param idProvider the npc id provider
|
||||
* @param templateIdProvider the npc template id provider
|
||||
* @param database
|
||||
* the database service
|
||||
* @param idProvider
|
||||
* the npc id provider
|
||||
* @param templateIdProvider
|
||||
* the npc template id provider
|
||||
*/
|
||||
@Inject
|
||||
public H2NPCDAO(DatabaseService database, NPCIDProvider idProvider,
|
||||
|
||||
@@ -31,9 +31,12 @@ import com.l2jserver.service.database.jdbc.JDBCCharacterFriendDAO;
|
||||
public class MySQL5CharacterFriendDAO extends JDBCCharacterFriendDAO implements
|
||||
CharacterFriendDAO {
|
||||
/**
|
||||
* @param database the database service
|
||||
* @param idProvider the frind id provider
|
||||
* @param charIdProvider the character id provider
|
||||
* @param database
|
||||
* the database service
|
||||
* @param idProvider
|
||||
* the frind id provider
|
||||
* @param charIdProvider
|
||||
* the character id provider
|
||||
*/
|
||||
@Inject
|
||||
public MySQL5CharacterFriendDAO(DatabaseService database,
|
||||
|
||||
@@ -31,10 +31,14 @@ import com.l2jserver.service.database.jdbc.JDBCItemDAO;
|
||||
*/
|
||||
public class MySQL5ItemDAO extends JDBCItemDAO implements ItemDAO {
|
||||
/**
|
||||
* @param database the database service
|
||||
* @param idFactory the item id provider
|
||||
* @param templateIdFactory the item template id provider
|
||||
* @param charIdFactory the character id provider
|
||||
* @param database
|
||||
* the database service
|
||||
* @param idFactory
|
||||
* the item id provider
|
||||
* @param templateIdFactory
|
||||
* the item template id provider
|
||||
* @param charIdFactory
|
||||
* the character id provider
|
||||
*/
|
||||
@Inject
|
||||
public MySQL5ItemDAO(DatabaseService database, ItemIDProvider idFactory,
|
||||
|
||||
@@ -31,9 +31,12 @@ import com.l2jserver.service.database.jdbc.JDBCNPCDAO;
|
||||
*/
|
||||
public class MySQL5NPCDAO extends JDBCNPCDAO implements NPCDAO {
|
||||
/**
|
||||
* @param database the database service
|
||||
* @param idProvider the npc id provider
|
||||
* @param templateIdProvider the npc template id provider
|
||||
* @param database
|
||||
* the database service
|
||||
* @param idProvider
|
||||
* the npc id provider
|
||||
* @param templateIdProvider
|
||||
* the npc template id provider
|
||||
*/
|
||||
@Inject
|
||||
public MySQL5NPCDAO(DatabaseService database, NPCIDProvider idProvider,
|
||||
|
||||
@@ -69,9 +69,12 @@ public class AttackServiceImpl extends AbstractService implements AttackService
|
||||
private final WorldEventDispatcher eventDispatcher;
|
||||
|
||||
/**
|
||||
* @param threadService the thread service
|
||||
* @param npcService the npc service
|
||||
* @param eventDispatcher the world service event dispatcher
|
||||
* @param threadService
|
||||
* the thread service
|
||||
* @param npcService
|
||||
* the npc service
|
||||
* @param eventDispatcher
|
||||
* the world service event dispatcher
|
||||
*/
|
||||
@Inject
|
||||
public AttackServiceImpl(ThreadService threadService,
|
||||
@@ -107,8 +110,10 @@ public class AttackServiceImpl extends AbstractService implements AttackService
|
||||
private final Actor target;
|
||||
|
||||
/**
|
||||
* @param attacker the attacker
|
||||
* @param target the target
|
||||
* @param attacker
|
||||
* the attacker
|
||||
* @param target
|
||||
* the target
|
||||
*/
|
||||
public AttackCallable(Actor attacker, Actor target) {
|
||||
this.attacker = attacker;
|
||||
@@ -126,7 +131,8 @@ public class AttackServiceImpl extends AbstractService implements AttackService
|
||||
// TODO calculate critical
|
||||
// TODO calculate soulshot
|
||||
|
||||
log.debug("Attack dealt {} damage, but only {} is effective", damage, dealDamage);
|
||||
log.debug("Attack dealt {} damage, but only {} is effective",
|
||||
damage, dealDamage);
|
||||
|
||||
// reduce target life
|
||||
target.setHP(target.getHP() - dealDamage);
|
||||
|
||||
@@ -26,4 +26,5 @@ public class CharacterAlreadyRunningServiceException extends
|
||||
/**
|
||||
* The Java Serialization API serial
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;}
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -26,4 +26,5 @@ public class CharacterAlreadyWalkingServiceException extends
|
||||
/**
|
||||
* The Java Serialization API serial
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;}
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -25,4 +25,5 @@ public class CharacterInJailServiceException extends CharacterServiceException {
|
||||
/**
|
||||
* The Java Serialization API serial
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;}
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -21,9 +21,9 @@ package com.l2jserver.service.game.character;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class CharacterInvalidNameException extends
|
||||
CharacterServiceException {
|
||||
public class CharacterInvalidNameException extends CharacterServiceException {
|
||||
/**
|
||||
* The Java Serialization API serial
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;}
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -26,4 +26,5 @@ public class CharacterNameAlreadyExistsException extends
|
||||
/**
|
||||
* The Java Serialization API serial
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;}
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -26,4 +26,5 @@ public class CharacterNotInJailServiceException extends
|
||||
/**
|
||||
* The Java Serialization API serial
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;}
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -45,8 +45,10 @@ public class DatabaseChatLoggingService extends AbstractService implements
|
||||
private final CharacterIDProvider charIdProvider;
|
||||
|
||||
/**
|
||||
* @param chatMessageDao the chat message DAO
|
||||
* @param charIdProvider the character id provider
|
||||
* @param chatMessageDao
|
||||
* the chat message DAO
|
||||
* @param charIdProvider
|
||||
* the character id provider
|
||||
*/
|
||||
@Inject
|
||||
protected DatabaseChatLoggingService(ChatMessageDAO chatMessageDao,
|
||||
|
||||
@@ -329,7 +329,8 @@ public class SimpleChatService extends AbstractService implements ChatService {
|
||||
private final CharacterID character;
|
||||
|
||||
/**
|
||||
* @param character the target character {@link ID}
|
||||
* @param character
|
||||
* the target character {@link ID}
|
||||
*/
|
||||
public PrivateChatChannelImpl(CharacterID character) {
|
||||
Preconditions.checkNotNull(character, "character");
|
||||
|
||||
@@ -34,8 +34,10 @@ public class Tile {
|
||||
private final byte flags;
|
||||
|
||||
/**
|
||||
* @param point the file point
|
||||
* @param flags the tile flags
|
||||
* @param point
|
||||
* the file point
|
||||
* @param flags
|
||||
* the tile flags
|
||||
*/
|
||||
public Tile(Point point, byte flags) {
|
||||
this.point = point;
|
||||
|
||||
@@ -185,8 +185,10 @@ public class MapperPathingService extends AbstractService implements
|
||||
private final Point3D target;
|
||||
|
||||
/**
|
||||
* @param source the source point
|
||||
* @param target the taget point
|
||||
* @param source
|
||||
* the source point
|
||||
* @param target
|
||||
* the taget point
|
||||
*/
|
||||
public VoidPath(Point3D source, Point3D target) {
|
||||
this.source = source;
|
||||
|
||||
@@ -32,7 +32,8 @@ public class DefaultClassListener implements ClassListener {
|
||||
private final Injector injector;
|
||||
|
||||
/**
|
||||
* @param injector the {@link Guice} {@link Injector}
|
||||
* @param injector
|
||||
* the {@link Guice} {@link Injector}
|
||||
*/
|
||||
public DefaultClassListener(Injector injector) {
|
||||
this.injector = injector;
|
||||
|
||||
@@ -85,11 +85,16 @@ public class CachedWorldIDService extends AbstractService implements
|
||||
private boolean loaded = false;
|
||||
|
||||
/**
|
||||
* @param cacheService the cache service
|
||||
* @param allocator the id allocator
|
||||
* @param characterDao the character DAO
|
||||
* @param itemDao the item dao
|
||||
* @param npcDao the NPC dao
|
||||
* @param cacheService
|
||||
* the cache service
|
||||
* @param allocator
|
||||
* the id allocator
|
||||
* @param characterDao
|
||||
* the character DAO
|
||||
* @param itemDao
|
||||
* the item dao
|
||||
* @param npcDao
|
||||
* the NPC dao
|
||||
*/
|
||||
@Inject
|
||||
public CachedWorldIDService(CacheService cacheService,
|
||||
|
||||
@@ -34,7 +34,8 @@ public class KnownListFilter extends AndFilter<PositionableObject> {
|
||||
public static final int KNOWNLIST_RANGE = 2000;
|
||||
|
||||
/**
|
||||
* @param object the object to locate known objects
|
||||
* @param object
|
||||
* the object to locate known objects
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public KnownListFilter(PositionableObject object) {
|
||||
|
||||
@@ -87,9 +87,12 @@ public class NettyNetworkService extends AbstractService implements
|
||||
private Set<Lineage2Client> clients = CollectionFactory.newSet();
|
||||
|
||||
/**
|
||||
* @param configService the configuration service
|
||||
* @param injector the {@link Guice} {@link Injector}
|
||||
* @param worldService the world service
|
||||
* @param configService
|
||||
* the configuration service
|
||||
* @param injector
|
||||
* the {@link Guice} {@link Injector}
|
||||
* @param worldService
|
||||
* the world service
|
||||
*/
|
||||
@Inject
|
||||
public NettyNetworkService(ConfigurationService configService,
|
||||
|
||||
@@ -79,8 +79,10 @@ public class BroadcastServiceImpl extends AbstractService implements
|
||||
private final WorldEventDispatcher eventDispatcher;
|
||||
|
||||
/**
|
||||
* @param worldService the world service
|
||||
* @param eventDispatcher the world service event disptacher
|
||||
* @param worldService
|
||||
* the world service
|
||||
* @param eventDispatcher
|
||||
* the world service event disptacher
|
||||
*/
|
||||
@Inject
|
||||
public BroadcastServiceImpl(WorldService worldService,
|
||||
|
||||
@@ -37,9 +37,13 @@ public class RGBColor {
|
||||
|
||||
/**
|
||||
* Creates a new RGB (red-green-blue) color
|
||||
* @param r the red byte
|
||||
* @param g the green byte
|
||||
* @param b the blue byte
|
||||
*
|
||||
* @param r
|
||||
* the red byte
|
||||
* @param g
|
||||
* the green byte
|
||||
* @param b
|
||||
* the blue byte
|
||||
*/
|
||||
protected RGBColor(byte r, byte g, byte b) {
|
||||
this.red = r;
|
||||
@@ -88,7 +92,9 @@ public class RGBColor {
|
||||
|
||||
/**
|
||||
* Creates an {@link RGBColor} from an byte array
|
||||
* @param rgb the RGB byte array
|
||||
*
|
||||
* @param rgb
|
||||
* the RGB byte array
|
||||
* @return the {@link RGBColor}
|
||||
*/
|
||||
public static RGBColor fromByteArray(byte[] rgb) {
|
||||
@@ -96,7 +102,8 @@ public class RGBColor {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param color the color integer
|
||||
* @param color
|
||||
* the color integer
|
||||
* @return the {@link RGBColor}
|
||||
*/
|
||||
public static RGBColor fromInteger(int color) {
|
||||
|
||||
@@ -245,6 +245,7 @@ public class ComplexCalculator<T extends CalculatorContext, V extends Enum<V>>
|
||||
functions.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double calculate(V v, T ctx, double value) {
|
||||
for (final Function<T, V> function : getList(v)) {
|
||||
value = function.calculate(ctx, value);
|
||||
@@ -257,6 +258,7 @@ public class ComplexCalculator<T extends CalculatorContext, V extends Enum<V>>
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double calculate(V v, T ctx) {
|
||||
return calculate(v, ctx, 0);
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ public class SimpleCalculator<T extends CalculatorContext, V extends Enum<V>>
|
||||
Arrays.sort(this.functions, FunctionOrderComparator.SHARED_INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double calculate(V v, T ctx, double value) {
|
||||
if (v != this.value)
|
||||
return value;
|
||||
@@ -64,6 +65,7 @@ public class SimpleCalculator<T extends CalculatorContext, V extends Enum<V>>
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double calculate(V v, T ctx) {
|
||||
return calculate(ctx, 0);
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ public class CoordinateAdapter extends
|
||||
|
||||
/**
|
||||
* Internal usage class: class used to read coordinate data from XML file
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
protected static class CoordinateElement {
|
||||
@@ -75,9 +76,12 @@ public class CoordinateAdapter extends
|
||||
}
|
||||
|
||||
/**
|
||||
* @param x the x cord
|
||||
* @param y the y cord
|
||||
* @param z the z cord
|
||||
* @param x
|
||||
* the x cord
|
||||
* @param y
|
||||
* the y cord
|
||||
* @param z
|
||||
* the z cord
|
||||
*/
|
||||
public CoordinateElement(int x, int y, int z) {
|
||||
super();
|
||||
|
||||
@@ -41,7 +41,8 @@ public class ItemTemplateIDAdapter extends XmlAdapter<Integer, ItemTemplateID> {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param provider the item template id provider
|
||||
* @param provider
|
||||
* the item template id provider
|
||||
*/
|
||||
@Inject
|
||||
public ItemTemplateIDAdapter(ItemTemplateIDProvider provider) {
|
||||
|
||||
@@ -42,7 +42,8 @@ public class NPCTemplateIDAdapter extends XmlAdapter<Integer, NPCTemplateID> {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param provider the {@link NPC} template id provider
|
||||
* @param provider
|
||||
* the {@link NPC} template id provider
|
||||
*/
|
||||
@Inject
|
||||
public NPCTemplateIDAdapter(NPCTemplateIDProvider provider) {
|
||||
|
||||
@@ -43,7 +43,8 @@ public class SkillTemplateIDAdapter extends
|
||||
}
|
||||
|
||||
/**
|
||||
* @param provider the {@link Skill} template id provider
|
||||
* @param provider
|
||||
* the {@link Skill} template id provider
|
||||
*/
|
||||
@Inject
|
||||
public SkillTemplateIDAdapter(SkillTemplateIDProvider provider) {
|
||||
|
||||
@@ -42,7 +42,8 @@ public class TeleportationTemplateIDAdapter extends
|
||||
}
|
||||
|
||||
/**
|
||||
* @param provider the teleportation template id provider
|
||||
* @param provider
|
||||
* the teleportation template id provider
|
||||
*/
|
||||
@Inject
|
||||
public TeleportationTemplateIDAdapter(
|
||||
|
||||
@@ -34,7 +34,7 @@ public class PathTransformer implements Transformer<Path> {
|
||||
|
||||
@Override
|
||||
public String transform(Path value) {
|
||||
if(value == null)
|
||||
if (value == null)
|
||||
return "";
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.util.Arrays;
|
||||
public class EndianessTest {
|
||||
/**
|
||||
* @param args
|
||||
* the arguments
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
final ByteBuffer bigEndian = ByteBuffer.allocate(8);
|
||||
|
||||
Reference in New Issue
Block a user