1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-10 09:22:49 +00:00

Code formatting

This commit is contained in:
2011-08-07 22:31:55 -03:00
parent 129b527a08
commit 074f216ffc
65 changed files with 378 additions and 393 deletions

View File

@@ -35,8 +35,7 @@ import com.l2jserver.util.html.markup.MarkupTag;
/**
* This handler dispatches the {@link ClientPacket#process(Lineage2Client)}
* method and creates a new {@link Lineage2Client} once a new channel is
* open.
* method and creates a new {@link Lineage2Client} once a new channel is open.
*
* @author <a href="http://www.rogiel.com">Rogiel</a>
*/

View File

@@ -101,8 +101,7 @@ public class CM_ATTACK extends AbstractClientPacket {
}
@Inject
public CM_ATTACK(CharacterService charService,
ObjectIDResolver idResolver) {
public CM_ATTACK(CharacterService charService, ObjectIDResolver idResolver) {
this.charService = charService;
this.idResolver = idResolver;
}

View File

@@ -86,8 +86,8 @@ public class CM_AUTH_LOGIN extends AbstractClientPacket {
loginKey1, loginKey2));
final List<L2Character> chars = characterDao.selectByAccount(accountId);
conn.write(SM_CHAR_LIST.fromL2Session(
conn.getSession(), chars.toArray(new L2Character[chars.size()])));
conn.write(SM_CHAR_LIST.fromL2Session(conn.getSession(),
chars.toArray(new L2Character[chars.size()])));
}
/**

View File

@@ -41,7 +41,7 @@ import com.l2jserver.util.BufferUtils;
*/
public class CM_BYPASS extends AbstractClientPacket {
private final Logger log = LoggerFactory.getLogger(this.getClass());
/**
* The packet OPCODE
*/
@@ -62,8 +62,7 @@ public class CM_BYPASS extends AbstractClientPacket {
private String command;
@Inject
public CM_BYPASS(ObjectIDResolver idResolver,
NPCService npcService) {
public CM_BYPASS(ObjectIDResolver idResolver, NPCService npcService) {
this.idResolver = idResolver;
this.npcService = npcService;
}

View File

@@ -71,8 +71,7 @@ public class CM_CHAR_ACTION extends AbstractClientPacket {
}
@Inject
public CM_CHAR_ACTION(ObjectIDResolver idResolver,
NPCService npcService) {
public CM_CHAR_ACTION(ObjectIDResolver idResolver, NPCService npcService) {
this.idResolver = idResolver;
this.npcService = npcService;
}

View File

@@ -32,7 +32,7 @@ public class CM_CHAR_OPEN_MAP extends AbstractClientPacket {
* The packet OPCODE
*/
public static final int OPCODE = 0x6c;
@Override
public void read(Lineage2Client conn, ChannelBuffer buffer) {
}

View File

@@ -64,7 +64,7 @@ public class CM_CHAT extends AbstractClientPacket {
this.message = BufferUtils.readString(buffer);
this.destination = ChatMessageType.fromID(buffer.readInt());
if (this.destination == ChatMessageType.TELL) { // private
// message
// message
this.target = BufferUtils.readString(buffer);
}
}

View File

@@ -83,7 +83,7 @@ public class CM_ENTER_WORLD extends AbstractClientPacket {
} catch (SpawnPointNotFoundServiceException e) {
conn.sendActionFailed();
} catch (AlreadySpawnedServiceException e) {
//TODO send an error message here
// TODO send an error message here
}
}
}

View File

@@ -43,7 +43,7 @@ public class CM_EXT_REQ_MANOR_LIST extends AbstractClientPacket {
@Override
public void process(final Lineage2Client conn) {
conn.write(new SM_MANOR_LIST("gludio", "dion", "giran", "oren",
"aden", "innadril", "goddard", "rune", "schuttgart"));
conn.write(new SM_MANOR_LIST("gludio", "dion", "giran", "oren", "aden",
"innadril", "goddard", "rune", "schuttgart"));
}
}

View File

@@ -61,7 +61,7 @@ public class CM_GOTO_LOBBY extends AbstractClientPacket {
public void process(final Lineage2Client conn) {
final List<L2Character> chars = characterDao.selectByAccount(conn
.getSession().getAccountID());
conn.write(SM_CHAR_LIST.fromL2Session(
conn.getSession(), chars.toArray(new L2Character[0])));
conn.write(SM_CHAR_LIST.fromL2Session(conn.getSession(),
chars.toArray(new L2Character[0])));
}
}

View File

@@ -38,8 +38,7 @@ public class CM_LOGOUT extends AbstractClientPacket {
/**
* The logger
*/
private static final Logger log = LoggerFactory
.getLogger(CM_LOGOUT.class);
private static final Logger log = LoggerFactory.getLogger(CM_LOGOUT.class);
@Override
public void read(Lineage2Client conn, ChannelBuffer buffer) {

View File

@@ -54,16 +54,14 @@ public class SM_CHAT extends AbstractServerPacket {
*/
private int messageID = 0;
public SM_CHAT(Actor character, ChatMessageType destination,
String message) {
public SM_CHAT(Actor character, ChatMessageType destination, String message) {
super(OPCODE);
this.actor = character;
this.destination = destination;
this.message = message;
}
public SM_CHAT(Actor actor, ChatMessageType destination,
int messageID) {
public SM_CHAT(Actor actor, ChatMessageType destination, int messageID) {
super(OPCODE);
this.actor = actor;
this.destination = destination;

View File

@@ -48,11 +48,11 @@ public class SM_NPC_INFO extends AbstractServerPacket {
buffer.writeInt(npc.getID().getID());
buffer.writeInt(template.getID().getID() + 1000000); // npctype id
//if (npc instanceof NPC) {
buffer.writeInt((template.isAttackable() ? 0x01 : 0x00));
//} else {
// buffer.writeInt(0x01);
//}
// if (npc instanceof NPC) {
buffer.writeInt((template.isAttackable() ? 0x01 : 0x00));
// } else {
// buffer.writeInt(0x01);
// }
buffer.writeInt(npc.getPoint().getX());
buffer.writeInt(npc.getPoint().getY());
buffer.writeInt(npc.getPoint().getZ());