mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-06 07:32:46 +00:00
@@ -50,6 +50,7 @@ public class MySQL5ClanDAO extends AbstractMySQL5DAO<Clan, ClanID> implements
|
|||||||
/**
|
/**
|
||||||
* The {@link CharacterID} factory
|
* The {@link CharacterID} factory
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private final CharacterIDProvider charIdFactory;
|
private final CharacterIDProvider charIdFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ import org.jboss.netty.buffer.ChannelBuffers;
|
|||||||
import org.jboss.netty.channel.Channel;
|
import org.jboss.netty.channel.Channel;
|
||||||
import org.jboss.netty.channel.ChannelHandlerContext;
|
import org.jboss.netty.channel.ChannelHandlerContext;
|
||||||
import org.jboss.netty.handler.codec.frame.FrameDecoder;
|
import org.jboss.netty.handler.codec.frame.FrameDecoder;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This decoder parses Lineage II frames. Each frame is has a header of 2 bytes
|
* This decoder parses Lineage II frames. Each frame is has a header of 2 bytes
|
||||||
@@ -35,9 +33,6 @@ import org.slf4j.LoggerFactory;
|
|||||||
public class Lineage2FrameDecoder extends FrameDecoder {
|
public class Lineage2FrameDecoder extends FrameDecoder {
|
||||||
private static final int HEADER_SIZE = 2;
|
private static final int HEADER_SIZE = 2;
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory
|
|
||||||
.getLogger(Lineage2FrameDecoder.class);
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Object decode(ChannelHandlerContext ctx, Channel channel,
|
protected Object decode(ChannelHandlerContext ctx, Channel channel,
|
||||||
ChannelBuffer oldBuffer) throws Exception {
|
ChannelBuffer oldBuffer) throws Exception {
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ import org.jboss.netty.buffer.ChannelBuffers;
|
|||||||
import org.jboss.netty.channel.Channel;
|
import org.jboss.netty.channel.Channel;
|
||||||
import org.jboss.netty.channel.ChannelHandlerContext;
|
import org.jboss.netty.channel.ChannelHandlerContext;
|
||||||
import org.jboss.netty.handler.codec.oneone.OneToOneEncoder;
|
import org.jboss.netty.handler.codec.oneone.OneToOneEncoder;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.l2jserver.game.net.Lineage2Connection;
|
import com.l2jserver.game.net.Lineage2Connection;
|
||||||
import com.l2jserver.game.net.packet.ServerPacket;
|
import com.l2jserver.game.net.packet.ServerPacket;
|
||||||
@@ -42,12 +40,6 @@ public class Lineage2PacketWriter extends OneToOneEncoder {
|
|||||||
*/
|
*/
|
||||||
public static final String HANDLER_NAME = "packet.writer";
|
public static final String HANDLER_NAME = "packet.writer";
|
||||||
|
|
||||||
/**
|
|
||||||
* The logger
|
|
||||||
*/
|
|
||||||
private static final Logger log = LoggerFactory
|
|
||||||
.getLogger(Lineage2PacketWriter.class);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The active Lineage 2 connection
|
* The active Lineage 2 connection
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -80,7 +80,9 @@ public class CharacterRequestActionUse extends AbstractClientPacket {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private boolean ctrlPressed;
|
private boolean ctrlPressed;
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private boolean shiftPressed;
|
private boolean shiftPressed;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ public class CharacterValidatePositionPacket extends AbstractClientPacket {
|
|||||||
private final CharacterService charService;
|
private final CharacterService charService;
|
||||||
|
|
||||||
private Point point;
|
private Point point;
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private int extra; // vehicle id
|
private int extra; // vehicle id
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|||||||
@@ -48,14 +48,20 @@ public class RequestShortcutRegistry extends AbstractClientPacket {
|
|||||||
/**
|
/**
|
||||||
* The shortcut type
|
* The shortcut type
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private int type;
|
private int type;
|
||||||
/**
|
/**
|
||||||
* The shortcut ID
|
* The shortcut ID
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private int id;
|
private int id;
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private int slot;
|
private int slot;
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private int page;
|
private int page;
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private int lvl;
|
private int lvl;
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private int characterType;
|
private int characterType;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import com.l2jserver.model.world.Actor;
|
|||||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||||
*/
|
*/
|
||||||
public class ActorCalculator {
|
public class ActorCalculator {
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private final Actor actor;
|
private final Actor actor;
|
||||||
|
|
||||||
public ActorCalculator(Actor actor) {
|
public ActorCalculator(Actor actor) {
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ public abstract class AbstractService implements Service {
|
|||||||
this.running = true;
|
this.running = true;
|
||||||
} catch (ServiceStartException e) {
|
} catch (ServiceStartException e) {
|
||||||
this.running = false;
|
this.running = false;
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ package com.l2jserver.service.admin;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.l2jserver.model.id.object.CharacterID;
|
||||||
import com.l2jserver.model.world.L2Character;
|
import com.l2jserver.model.world.L2Character;
|
||||||
import com.l2jserver.service.AbstractService;
|
import com.l2jserver.service.AbstractService;
|
||||||
|
|
||||||
@@ -27,7 +28,8 @@ import com.l2jserver.service.AbstractService;
|
|||||||
*/
|
*/
|
||||||
public class AdministratorServiceImpl extends AbstractService implements
|
public class AdministratorServiceImpl extends AbstractService implements
|
||||||
AdministratorService {
|
AdministratorService {
|
||||||
private List<L2Character> online;
|
@SuppressWarnings("unused")
|
||||||
|
private List<CharacterID> online;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void command(L2Character character, String command, String... args) {
|
public void command(L2Character character, String command, String... args) {
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ public class AttackServiceImpl extends AbstractService implements AttackService
|
|||||||
* The {@link WorldEventDispatcher} is used to dispatch attack events to the
|
* The {@link WorldEventDispatcher} is used to dispatch attack events to the
|
||||||
* world
|
* world
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private final WorldEventDispatcher eventDispatcher;
|
private final WorldEventDispatcher eventDispatcher;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@@ -66,10 +67,12 @@ public class AttackServiceImpl extends AbstractService implements AttackService
|
|||||||
/**
|
/**
|
||||||
* The attacker
|
* The attacker
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private final Actor attacker;
|
private final Actor attacker;
|
||||||
/**
|
/**
|
||||||
* The target
|
* The target
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private final Actor target;
|
private final Actor target;
|
||||||
|
|
||||||
public AttackCallable(Actor attacker, Actor target) {
|
public AttackCallable(Actor attacker, Actor target) {
|
||||||
|
|||||||
@@ -40,18 +40,22 @@ public class AIServiceImpl extends AbstractService implements AIService {
|
|||||||
/**
|
/**
|
||||||
* The {@link WorldService}
|
* The {@link WorldService}
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private final WorldService worldService;
|
private final WorldService worldService;
|
||||||
/**
|
/**
|
||||||
* The {@link WorldService} event dispatcher
|
* The {@link WorldService} event dispatcher
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private final WorldEventDispatcher eventDispatcher;
|
private final WorldEventDispatcher eventDispatcher;
|
||||||
/**
|
/**
|
||||||
* The {@link ThreadService}
|
* The {@link ThreadService}
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private final ThreadService threadService;
|
private final ThreadService threadService;
|
||||||
/**
|
/**
|
||||||
* The {@link NetworkService}
|
* The {@link NetworkService}
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private final NetworkService networkService;
|
private final NetworkService networkService;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ public class NPCServiceImpl extends AbstractService implements NPCService {
|
|||||||
/**
|
/**
|
||||||
* The {@link CharacterService}
|
* The {@link CharacterService}
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private final CharacterService characterService;
|
private final CharacterService characterService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -16,9 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.l2jserver.service.game.spawn;
|
package com.l2jserver.service.game.spawn;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.l2jserver.game.net.Lineage2Connection;
|
import com.l2jserver.game.net.Lineage2Connection;
|
||||||
@@ -50,11 +47,6 @@ import com.l2jserver.util.dimensional.Point;
|
|||||||
*/
|
*/
|
||||||
@Depends({ WorldService.class })
|
@Depends({ WorldService.class })
|
||||||
public class SpawnServiceImpl extends AbstractService implements SpawnService {
|
public class SpawnServiceImpl extends AbstractService implements SpawnService {
|
||||||
/**
|
|
||||||
* The logger
|
|
||||||
*/
|
|
||||||
private final Logger log = LoggerFactory.getLogger(this.getClass());
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link WorldService}
|
* The {@link WorldService}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -16,13 +16,15 @@
|
|||||||
*/
|
*/
|
||||||
package com.l2jserver.util.calculator;
|
package com.l2jserver.util.calculator;
|
||||||
|
|
||||||
|
import com.l2jserver.model.world.Actor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function performs a multiplication: <blockquote><code>chain value *
|
* This function performs a multiplication: <blockquote><code>chain value *
|
||||||
* (value / 100)</code></blockquote>
|
* (value / 100)</code></blockquote>
|
||||||
*
|
*
|
||||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||||
*/
|
*/
|
||||||
public class PercentFunction extends MultiplicationFunction {
|
public class PercentFunction<O extends Actor> extends MultiplicationFunction<O> {
|
||||||
/**
|
/**
|
||||||
* The value
|
* The value
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -21,11 +21,10 @@ import javax.xml.bind.annotation.adapters.XmlAdapter;
|
|||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.l2jserver.model.id.template.CharacterTemplateID;
|
import com.l2jserver.model.id.template.CharacterTemplateID;
|
||||||
import com.l2jserver.model.id.template.provider.CharacterTemplateIDProvider;
|
import com.l2jserver.model.id.template.provider.CharacterTemplateIDProvider;
|
||||||
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
|
|
||||||
import com.l2jserver.model.world.character.CharacterClass;
|
import com.l2jserver.model.world.character.CharacterClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO this should use an {@link ItemTemplateIDProvider}!
|
* This class is an JAXB Adapter for {@link CharacterTemplateIDProvider}
|
||||||
*
|
*
|
||||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import com.l2jserver.model.id.template.ItemTemplateID;
|
|||||||
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
|
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO this should use an {@link ItemTemplateIDProvider}!
|
* This class is an JAXB Adapter for {@link ItemTemplateIDProvider}
|
||||||
*
|
*
|
||||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||||
*/
|
*/
|
||||||
@@ -43,7 +43,7 @@ public class ItemTemplateIDAdapter extends XmlAdapter<Integer, ItemTemplateID> {
|
|||||||
public ItemTemplateID unmarshal(Integer v) throws Exception {
|
public ItemTemplateID unmarshal(Integer v) throws Exception {
|
||||||
if (v == 0)
|
if (v == 0)
|
||||||
return null;
|
return null;
|
||||||
if(provider == null)
|
if (provider == null)
|
||||||
return new ItemTemplateID(v, null);
|
return new ItemTemplateID(v, null);
|
||||||
return provider.createID(v);
|
return provider.createID(v);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,11 +20,10 @@ import javax.xml.bind.annotation.adapters.XmlAdapter;
|
|||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.l2jserver.model.id.template.NPCTemplateID;
|
import com.l2jserver.model.id.template.NPCTemplateID;
|
||||||
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
|
|
||||||
import com.l2jserver.model.id.template.provider.NPCTemplateIDProvider;
|
import com.l2jserver.model.id.template.provider.NPCTemplateIDProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO this should use an {@link ItemTemplateIDProvider}!
|
* This class is an JAXB Adapter for {@link NPCTemplateIDProvider}
|
||||||
*
|
*
|
||||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -20,11 +20,10 @@ import javax.xml.bind.annotation.adapters.XmlAdapter;
|
|||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.l2jserver.model.id.template.TeleportationTemplateID;
|
import com.l2jserver.model.id.template.TeleportationTemplateID;
|
||||||
import com.l2jserver.model.id.template.provider.ItemTemplateIDProvider;
|
|
||||||
import com.l2jserver.model.id.template.provider.TeleportationTemplateIDProvider;
|
import com.l2jserver.model.id.template.provider.TeleportationTemplateIDProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO this should use an {@link ItemTemplateIDProvider}!
|
* This class is an JAXB Adapter for {@link TeleportationTemplateIDProvider}
|
||||||
*
|
*
|
||||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -36,8 +36,10 @@ public class PrecompiledScriptCompilerTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testCompileIterableOfFile() {
|
public void testCompileIterableOfFile() {
|
||||||
final PrecompiledScriptCompiler compiler = new PrecompiledScriptCompiler();
|
final PrecompiledScriptCompiler compiler = new PrecompiledScriptCompiler();
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
final CompilationResult result = compiler.compile(FileUtils.listFiles(
|
final CompilationResult result = compiler.compile(FileUtils.listFiles(
|
||||||
new File("target/scripts/script/template"), new String[] { "class" }, true));
|
new File("target/scripts/script/template"),
|
||||||
|
new String[] { "class" }, true));
|
||||||
System.out.println(result.getCompiledClasses()[0]);
|
System.out.println(result.getCompiledClasses()[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ public class NPCOldTemplateConverter {
|
|||||||
|
|
||||||
private static String[] generateJavaClass(ResultSet rs) throws SQLException {
|
private static String[] generateJavaClass(ResultSet rs) throws SQLException {
|
||||||
String npcName = "";
|
String npcName = "";
|
||||||
|
@SuppressWarnings("unused")
|
||||||
String npcClass = "";
|
String npcClass = "";
|
||||||
String npcTitle = "";
|
String npcTitle = "";
|
||||||
String npcType = "";
|
String npcType = "";
|
||||||
@@ -189,7 +190,7 @@ public class NPCOldTemplateConverter {
|
|||||||
return "";
|
return "";
|
||||||
if (l2j.contains("VillageMaster"))
|
if (l2j.contains("VillageMaster"))
|
||||||
return (l2j.replaceAll("VillageMaster", "") + "VillageMaster");
|
return (l2j.replaceAll("VillageMaster", "") + "VillageMaster");
|
||||||
if(l2j.contains("Npc"))
|
if (l2j.contains("Npc"))
|
||||||
l2j = l2j.replaceAll("Npc", "");
|
l2j = l2j.replaceAll("Npc", "");
|
||||||
return l2j;
|
return l2j;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user