mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-06 07:32:46 +00:00
@@ -9,13 +9,13 @@ import com.l2jserver.util.Coordinate;
|
||||
public abstract class AbstractCharacterTemplate extends CharacterTemplate {
|
||||
protected AbstractCharacterTemplate(CharacterTemplateID id,
|
||||
CharacterClass characterClass, int intelligence, int strength,
|
||||
int concentration, int mentality, int dextry, int witness,
|
||||
int concentration, int mentality, int dexterity, int witness,
|
||||
int physicalAttack, int magicalAttack, int physicalDefense,
|
||||
int magicalDefense, int attackSpeed, int castSpeed, int accuracy,
|
||||
int criticalChance, int evasionChance, int moveSpeed,
|
||||
int maxWeigth, boolean craft, Coordinate spawnLocation) {
|
||||
super(id, characterClass, intelligence, strength, concentration,
|
||||
mentality, dextry, witness, physicalAttack, magicalAttack,
|
||||
mentality, dexterity, witness, physicalAttack, magicalAttack,
|
||||
physicalDefense, magicalDefense, attackSpeed, castSpeed,
|
||||
accuracy, criticalChance, evasionChance, maxWeigth, moveSpeed,
|
||||
craft, spawnLocation);
|
||||
|
||||
@@ -8,13 +8,13 @@ import com.l2jserver.util.Coordinate;
|
||||
public abstract class HumanCharacterTemplate extends AbstractCharacterTemplate {
|
||||
protected HumanCharacterTemplate(CharacterTemplateID id,
|
||||
CharacterClass characterClass, int intelligence, int strength,
|
||||
int concentration, int mentality, int dextry, int witness,
|
||||
int concentration, int mentality, int dexterity, int witness,
|
||||
int physicalAttack, int magicalAttack, int physicalDefense,
|
||||
int magicalDefense, int attackSpeed, int castSpeed, int accuracy,
|
||||
int criticalChance, int evasionChance, int moveSpeed,
|
||||
int maxWeigth, boolean craft, Coordinate spawnLocation) {
|
||||
super(id, characterClass, intelligence, strength, concentration,
|
||||
mentality, dextry, witness, physicalAttack, magicalAttack,
|
||||
mentality, dexterity, witness, physicalAttack, magicalAttack,
|
||||
physicalDefense, magicalDefense, attackSpeed, castSpeed,
|
||||
accuracy, criticalChance, evasionChance, moveSpeed, maxWeigth,
|
||||
false, spawnLocation);
|
||||
|
||||
@@ -37,12 +37,14 @@ public class Lineage2PipelineFactory implements ChannelPipelineFactory {
|
||||
pipeline.addLast(Lineage2Decrypter.HANDLER_NAME,
|
||||
new Lineage2Decrypter());
|
||||
|
||||
pipeline.addLast("logger-hex", new LoggingHandler(InternalLogLevel.DEBUG, true));
|
||||
pipeline.addLast("logger-hex", new LoggingHandler(
|
||||
InternalLogLevel.DEBUG, true));
|
||||
|
||||
pipeline.addLast("packet.writer", new Lineage2PacketWriter());
|
||||
pipeline.addLast("packet.reader", new Lineage2PacketReader(injector));
|
||||
|
||||
pipeline.addLast("logger", new LoggingHandler(InternalLogLevel.DEBUG, true));
|
||||
pipeline.addLast("logger", new LoggingHandler(InternalLogLevel.DEBUG,
|
||||
true));
|
||||
|
||||
pipeline.addLast("packet.handler", new Lineage2PacketHandler());
|
||||
|
||||
|
||||
@@ -53,8 +53,8 @@ public class AuthLoginPacket extends AbstractClientPacket {
|
||||
|
||||
final List<L2Character> chars = characterDao.selectByAccount(conn
|
||||
.getSession().getUsername());
|
||||
// conn.write(CharacterSelectionListPacket.fromL2Session(
|
||||
// conn.getSession(), chars.toArray(new L2Character[0])));
|
||||
// conn.write(CharacterSelectionListPacket.fromL2Session(
|
||||
// conn.getSession(), chars.toArray(new L2Character[0])));
|
||||
conn.write(new CharacterEnterWorldPacket(chars.get(0), playKey1));
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class CharacterCreatePacket extends AbstractClientPacket {
|
||||
private int strength;
|
||||
private int concentration;
|
||||
private int mentality;
|
||||
private int dextry;
|
||||
private int dexterity;
|
||||
private int witness;
|
||||
|
||||
private CharacterHairStyle hairStyle;
|
||||
@@ -80,7 +80,7 @@ public class CharacterCreatePacket extends AbstractClientPacket {
|
||||
strength = buffer.readInt();
|
||||
concentration = buffer.readInt();
|
||||
mentality = buffer.readInt();
|
||||
dextry = buffer.readInt();
|
||||
dexterity = buffer.readInt();
|
||||
witness = buffer.readInt();
|
||||
|
||||
hairStyle = CharacterHairStyle.fromOption(buffer.readInt());
|
||||
|
||||
@@ -44,8 +44,7 @@ public class ProtocolVersionPacket extends AbstractClientPacket {
|
||||
|
||||
log.debug("Client protocol version: {}", version);
|
||||
if (L2JConstants.SUPPORTED_PROTOCOL != version) {
|
||||
log.info(
|
||||
"Incorrect protocol version: {0}. Only {1} is supported.",
|
||||
log.info("Incorrect protocol version: {0}. Only {1} is supported.",
|
||||
version, L2JConstants.SUPPORTED_PROTOCOL);
|
||||
// notify wrong protocol and close connection
|
||||
conn.write(new KeyPacket(key, false)).addListener(
|
||||
|
||||
@@ -30,7 +30,7 @@ public class RequestManorList extends AbstractClientPacket {
|
||||
|
||||
@Override
|
||||
public void process(final Lineage2Connection conn) {
|
||||
conn.write(new ManorListPacket("gludio", "dion", "giran", "oren", "aden",
|
||||
"innadril", "goddard", "rune", "schuttgart"));
|
||||
conn.write(new ManorListPacket("gludio", "dion", "giran", "oren",
|
||||
"aden", "innadril", "goddard", "rune", "schuttgart"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class CharacterEnterWorldPacket extends AbstractServerPacket {
|
||||
buffer.writeInt(character.getAttributes().getStrength()); // STR
|
||||
buffer.writeInt(character.getAttributes().getConcentration()); // CON
|
||||
buffer.writeInt(character.getAttributes().getMentality()); // MEN
|
||||
buffer.writeInt(character.getAttributes().getDextry()); // DEX
|
||||
buffer.writeInt(character.getAttributes().getDexterity()); // DEX
|
||||
buffer.writeInt(character.getAttributes().getWitness()); // WIT
|
||||
|
||||
buffer.writeInt(250); // game time
|
||||
|
||||
@@ -47,7 +47,7 @@ public class CharacterSelectionListPacket extends AbstractServerPacket {
|
||||
buffer.writeInt(0x07); // max chars
|
||||
buffer.writeByte(0x00);
|
||||
|
||||
//int i = 0;
|
||||
// int i = 0;
|
||||
for (final L2Character character : characters) {
|
||||
BufferUtils.writeString(buffer, character.getName());
|
||||
buffer.writeInt(character.getID().getID());
|
||||
@@ -128,13 +128,13 @@ public class CharacterSelectionListPacket extends AbstractServerPacket {
|
||||
// buffer.writeInt(charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_BELT));
|
||||
|
||||
// hair style
|
||||
//buffer.writeInt(character.getAppearance().getHairStyle().option);
|
||||
// buffer.writeInt(character.getAppearance().getHairStyle().option);
|
||||
buffer.writeInt(0x02);
|
||||
// hair color
|
||||
//buffer.writeInt(character.getAppearance().getHairColor().option);
|
||||
// buffer.writeInt(character.getAppearance().getHairColor().option);
|
||||
buffer.writeInt(0x03);
|
||||
// face
|
||||
//buffer.writeInt(character.getAppearance().getFace().option);
|
||||
// buffer.writeInt(character.getAppearance().getFace().option);
|
||||
buffer.writeInt(0x00);
|
||||
|
||||
buffer.writeDouble(30); // hp max
|
||||
@@ -164,7 +164,7 @@ public class CharacterSelectionListPacket extends AbstractServerPacket {
|
||||
|
||||
// buffer.writeInt(0x00);
|
||||
|
||||
//i++;
|
||||
// i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class CharacterTemplatePacket extends AbstractServerPacket {
|
||||
buffer.writeInt(template.getBaseAttributes().getStrength());
|
||||
buffer.writeInt(0x0a);
|
||||
buffer.writeInt(0x46);
|
||||
buffer.writeInt(template.getBaseAttributes().getDextry());
|
||||
buffer.writeInt(template.getBaseAttributes().getDexterity());
|
||||
buffer.writeInt(0x0a);
|
||||
buffer.writeInt(0x46);
|
||||
buffer.writeInt(template.getBaseAttributes().getConcentration());
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.l2jserver.util.BufferUtils;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class UserinfoPacket extends AbstractServerPacket {
|
||||
public class UserInformationPacket extends AbstractServerPacket {
|
||||
/**
|
||||
* Message OPCODE
|
||||
*/
|
||||
@@ -18,7 +18,7 @@ public class UserinfoPacket extends AbstractServerPacket {
|
||||
|
||||
private String[] manors;
|
||||
|
||||
public UserinfoPacket(String... manors) {
|
||||
public UserInformationPacket(String... manors) {
|
||||
super(OPCODE);
|
||||
this.manors = manors;
|
||||
}
|
||||
@@ -36,7 +36,7 @@ public abstract class CharacterTemplate extends AbstractTemplate<L2Character> {
|
||||
|
||||
public CharacterTemplate(CharacterTemplateID id,
|
||||
CharacterClass characterClass, int intelligence, int strength,
|
||||
int concentration, int mentality, int dextry, int witness,
|
||||
int concentration, int mentality, int dexterity, int witness,
|
||||
int physicalAttack, int magicalAttack, int physicalDefense,
|
||||
int magicalDefense, int attackSpeed, int castSpeed, int accuracy,
|
||||
int criticalChance, int evasionChance, int moveSpeed,
|
||||
@@ -46,7 +46,7 @@ public abstract class CharacterTemplate extends AbstractTemplate<L2Character> {
|
||||
this.characterClass = characterClass;
|
||||
this.spawnLocation = spawnLocation;
|
||||
baseAttributes = new CharacterBaseAttributes(intelligence, strength,
|
||||
concentration, mentality, dextry, witness, physicalAttack,
|
||||
concentration, mentality, dexterity, witness, physicalAttack,
|
||||
magicalAttack, physicalDefense, magicalDefense, attackSpeed,
|
||||
castSpeed, accuracy, criticalChance, evasionChance, moveSpeed,
|
||||
maxWeigth, craft);
|
||||
@@ -133,10 +133,10 @@ public abstract class CharacterTemplate extends AbstractTemplate<L2Character> {
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @see com.l2jserver.model.world.character.CharacterBaseAttributes#getDextry()
|
||||
* @see com.l2jserver.model.world.character.CharacterBaseAttributes#getDexterity()
|
||||
*/
|
||||
public int getDextry() {
|
||||
return baseAttributes.getDextry();
|
||||
return baseAttributes.getDexterity();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,9 +22,9 @@ public interface CharacterAttributes {
|
||||
public int getMentality();
|
||||
|
||||
/**
|
||||
* @return the dextry
|
||||
* @return the dexterity
|
||||
*/
|
||||
public int getDextry();
|
||||
public int getDexterity();
|
||||
|
||||
/**
|
||||
* @return the witness
|
||||
|
||||
@@ -25,7 +25,7 @@ public class CharacterBaseAttributes implements CharacterAttributes {
|
||||
/**
|
||||
* The character dextry
|
||||
*/
|
||||
private final int dextry;
|
||||
private final int dexterity;
|
||||
/**
|
||||
* The character witness
|
||||
*/
|
||||
@@ -132,7 +132,7 @@ public class CharacterBaseAttributes implements CharacterAttributes {
|
||||
this.strength = strength;
|
||||
this.concentration = concentration;
|
||||
this.mentality = mentality;
|
||||
this.dextry = dextry;
|
||||
this.dexterity = dextry;
|
||||
this.witness = witness;
|
||||
this.physicalAttack = physicalAttack;
|
||||
this.magicalAttack = magicalAttack;
|
||||
@@ -179,8 +179,8 @@ public class CharacterBaseAttributes implements CharacterAttributes {
|
||||
/**
|
||||
* @return the dextry
|
||||
*/
|
||||
public int getDextry() {
|
||||
return dextry;
|
||||
public int getDexterity() {
|
||||
return dexterity;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,8 +27,8 @@ public class CharacterCalculatedAttributes implements CharacterAttributes {
|
||||
return baseAttributes.getMentality();
|
||||
}
|
||||
|
||||
public int getDextry() {
|
||||
return baseAttributes.getDextry();
|
||||
public int getDexterity() {
|
||||
return baseAttributes.getDexterity();
|
||||
}
|
||||
|
||||
public int getWitness() {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class RGBColor {
|
||||
}
|
||||
|
||||
public int toInteger() {
|
||||
return red + green >> 8 + blue >> 16;
|
||||
return red + green >> 8 + blue >> 16;
|
||||
}
|
||||
|
||||
public static RGBColor fromByteArray(byte[] rgb) {
|
||||
|
||||
Reference in New Issue
Block a user