mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-06 07:32:46 +00:00
Fixes small issues
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.l2jserver</groupId>
|
<groupId>com.l2jserver</groupId>
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ public class Lineage2Client {
|
|||||||
public boolean supports(ProtocolVersion version) {
|
public boolean supports(ProtocolVersion version) {
|
||||||
if (version == null)
|
if (version == null)
|
||||||
return false;
|
return false;
|
||||||
return version.supports(version);
|
return this.version.supports(version);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -405,4 +405,10 @@ public class Lineage2Client {
|
|||||||
return (Lineage2PacketWriter) channel.getPipeline().get(
|
return (Lineage2PacketWriter) channel.getPipeline().get(
|
||||||
Lineage2PacketWriter.HANDLER_NAME);
|
Lineage2PacketWriter.HANDLER_NAME);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Lineage2Client [channel=" + channel + ", characterID="
|
||||||
|
+ characterID + ", session=" + session + ", version=" + version
|
||||||
|
+ "]";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,4 +104,11 @@ public class Lineage2Session {
|
|||||||
public int getLoginKey2() {
|
public int getLoginKey2() {
|
||||||
return loginKey2;
|
return loginKey2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Lineage2Session [accountID=" + accountID + ", playKey1="
|
||||||
|
+ playKey1 + ", playKey2=" + playKey2 + ", loginKey1="
|
||||||
|
+ loginKey1 + ", loginKey2=" + loginKey2 + "]";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,8 @@ public class CM_BYPASS extends AbstractClientPacket {
|
|||||||
// parse command
|
// parse command
|
||||||
final StringTokenizer tokenizer = new StringTokenizer(command, "_ ");
|
final StringTokenizer tokenizer = new StringTokenizer(command, "_ ");
|
||||||
final String type = tokenizer.nextToken();
|
final String type = tokenizer.nextToken();
|
||||||
if (type.equals("npc")) {
|
switch (type) {
|
||||||
|
case "npc":
|
||||||
final int objectId = Integer.parseInt(tokenizer.nextToken());
|
final int objectId = Integer.parseInt(tokenizer.nextToken());
|
||||||
final ObjectID<NPC> id = idResolver.resolve(objectId);
|
final ObjectID<NPC> id = idResolver.resolve(objectId);
|
||||||
if (!(id instanceof NPCID)) {
|
if (!(id instanceof NPCID)) {
|
||||||
@@ -107,8 +108,12 @@ public class CM_BYPASS extends AbstractClientPacket {
|
|||||||
conn.sendSystemMessage(e.getSystemMessage());
|
conn.sendSystemMessage(e.getSystemMessage());
|
||||||
conn.sendActionFailed();
|
conn.sendActionFailed();
|
||||||
}
|
}
|
||||||
} else {
|
return;
|
||||||
log.warn("Client requested an bypass not supported by server");
|
default:
|
||||||
|
log.warn(
|
||||||
|
"Client {} requested an bypass not supported by server: {}",
|
||||||
|
conn, type);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,10 +77,12 @@ public abstract class BaseNPCController implements NPCController {
|
|||||||
public void interact(NPC npc, L2Character character, final String... args)
|
public void interact(NPC npc, L2Character character, final String... args)
|
||||||
throws L2Exception {
|
throws L2Exception {
|
||||||
if (args.length == 2) {
|
if (args.length == 2) {
|
||||||
if (args[0].equals("Chat")) {
|
switch(args[0]) {
|
||||||
|
case "Chat":
|
||||||
if (talk(npc, character,
|
if (talk(npc, character,
|
||||||
Arrays.copyOfRange(args, 1, args.length)))
|
Arrays.copyOfRange(args, 1, args.length)))
|
||||||
return;
|
return;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else if (args.length == 0 || args.length == 1) {
|
} else if (args.length == 0 || args.length == 1) {
|
||||||
// default action is talk
|
// default action is talk
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ public class TeleporterController extends BaseNPCController {
|
|||||||
public void interact(NPC npc, L2Character character, String... args)
|
public void interact(NPC npc, L2Character character, String... args)
|
||||||
throws L2Exception {
|
throws L2Exception {
|
||||||
if (args.length >= 2) {
|
if (args.length >= 2) {
|
||||||
if (args[0].equals("goto")) {
|
switch (args[0]) {
|
||||||
|
case "goto":
|
||||||
final TeleportationTemplate tele = teleportationIdProvider
|
final TeleportationTemplate tele = teleportationIdProvider
|
||||||
.resolveID(Integer.parseInt(args[1])).getTemplate();
|
.resolveID(Integer.parseInt(args[1])).getTemplate();
|
||||||
if (tele == null) {
|
if (tele == null) {
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -87,7 +87,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-release-plugin</artifactId>
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
<version>2.0</version>
|
<version>2.2.2</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
<assembly
|
|
||||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
|
|
||||||
<id>bin</id>
|
|
||||||
<formats>
|
|
||||||
<format>zip</format>
|
|
||||||
</formats>
|
|
||||||
<baseDirectory>${basedir}</baseDirectory>
|
|
||||||
<files>
|
|
||||||
<file>
|
|
||||||
<source>${basedir}/l2jserver2-gameserver/target/l2jserver2-gameserver-${project.version}-mysql5-bin.zip</source>
|
|
||||||
<outputDirectory>/</outputDirectory>
|
|
||||||
</file>
|
|
||||||
</files>
|
|
||||||
</assembly>
|
|
||||||
Reference in New Issue
Block a user