Skip to content

Commit

Permalink
Merge pull request #14 from JMaNGOS/master
Browse files Browse the repository at this point in the history
Merge from master to storm #6
  • Loading branch information
mAdloVe committed Aug 10, 2012
2 parents 787da1d + 7abb610 commit 4dbe9b3
Show file tree
Hide file tree
Showing 39 changed files with 21,206 additions and 427 deletions.
26 changes: 13 additions & 13 deletions Auth/conf/packetData/lc-packets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@
xsi:noNamespaceSchemaLocation="packets.xsd">
<opcodelist direction="DOWNSTREAM"
package="org.jmangos.auth.network.netty.packet.client.">
<packet id="00" name="CMD_AUTH_LOGON_CHALLENGE" state="CONNECTED"/>
<packet id="01" name="CMD_AUTH_LOGON_PROOF" state="CONNECTED"/>
<packet id="10" name="CMD_REALM_LIST" state="AUTHED"/>
<packet id="50" name="CMD_AUTH_ENABLE_CRYPT" state="AUTHED"/>
<packet id="00" name="CMD_AUTH_LOGON_CHALLENGE" state="CONNECTED" />
<packet id="01" name="CMD_AUTH_LOGON_PROOF" state="CONNECTED" />
<packet id="02" name="CMD_RECONNECT_CHALLENGE" state="CONNECTED" />
<packet name="CMD_RECONNECT_PROOF" id="3" ></packet>
<packet id="51" name="CMD_TEST_CRYPT" state="AUTHED"/>
<packet id="03" name="CMD_RECONNECT_PROOF" state="CONNECTED" />
<packet id="10" name="CMD_REALM_LIST" state="AUTHED" />
<packet id="50" name="CMD_AUTH_ENABLE_CRYPT" state="AUTHED" />
<packet id="51" name="CMD_TEST_CRYPT" state="AUTHED" />
</opcodelist>
<opcodelist direction="UPSTREAM"
package="org.jmangos.auth.network.netty.packet.server.">
<packet id="00" name="TCMD_AUTH_LOGON_CHALLENGE"/>
<packet id="01" name="TCMD_AUTH_LOGON_PROOF"/>
<packet id="10" name="TCMD_REALM_LIST"/>
<packet name="TCMD_RECONNECT_CHALLENGE" id="2" />
<packet name="TCMD_RECONNECT_PROOF" id="3" />
<packet name="TCMD_AUTH_ENABLE_CRYPT" id="50" />
<packet id="00" name="TCMD_AUTH_LOGON_CHALLENGE" />
<packet id="01" name="TCMD_AUTH_LOGON_PROOF" />
<packet id="02" name="TCMD_RECONNECT_CHALLENGE" />
<packet id="03" name="TCMD_RECONNECT_PROOF" />
<packet id="10" name="TCMD_REALM_LIST" />
<packet id="50" name="TCMD_AUTH_ENABLE_CRYPT" />
</opcodelist>
</opcodes>
</opcodes>
35 changes: 0 additions & 35 deletions Auth/conf/packetData/lr-packets.xml

This file was deleted.

4 changes: 0 additions & 4 deletions Auth/src/main/java/org/jmangos/auth/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ public class Config {
@Property(key = "network.compatible", defaultValue = "NONE")
public static Compatiple COMPATIBLE;

/** The REAL m_ address. */
@Property(key = "network.realm.address", defaultValue = "*:3740")
public static InetSocketAddress REALM_ADDRESS;

/**
* Load configuration.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import javax.inject.Inject;

import org.apache.commons.lang.ArrayUtils;
import org.apache.log4j.Logger;
import org.jboss.netty.channel.ChannelPipeline;
import org.jmangos.auth.network.netty.decoder.RealmPacketFrameDecoder;
Expand All @@ -31,7 +30,7 @@
import org.jmangos.commons.network.netty.sender.AbstractPacketSender;

/**
* The Class CMD_AUTH_ENABLE_CRYPT.
* The Class <tt>CMD_AUTH_ENABLE_CRYPT</tt>.
*/
public class CMD_AUTH_ENABLE_CRYPT extends AbstractWoWClientPacket {

Expand All @@ -41,32 +40,34 @@ public class CMD_AUTH_ENABLE_CRYPT extends AbstractWoWClientPacket {
/** The sender. */
@Inject
private AbstractPacketSender sender;

public CMD_AUTH_ENABLE_CRYPT() {
super();
}

/*
* (non-Javadoc)
*
* @see org.wowemu.common.network.model.ReceivablePacket#readImpl()
* @see org.jmangos.commons.network.model.ReceivablePacket#readImpl()
*/
@Override
protected void readImpl() throws BufferUnderflowException, RuntimeException {
if (getAccount().getAccessLevel() > 2) {
logger.info("Realm started crypt");
// TODO 5 - magic number send to config like realm acces
if (getAccount().getAccessLevel() == 5) {
logger.info("Realm " + getAccount().getName() + " started crypt");
ChannelPipeline pipeline = getClient().getChannel().getPipeline();
pipeline.addFirst("framedecoder", new RealmPacketFrameDecoder());
pipeline.addFirst("encoder", new RealmPacketFrameEncoder());
AuthToClientChannelHandler channelHandler = (AuthToClientChannelHandler) pipeline.getLast();
AuthToClientChannelHandler channelHandler = (AuthToClientChannelHandler) pipeline
.getLast();
channelHandler.getCrypt().init(getAccount().getvK());
}
}

/*
* (non-Javadoc)
*
* @see org.wowemu.common.network.model.ReceivablePacket#runImpl()
* @see org.jmangos.commons.network.model.ReceivablePacket#runImpl()
*/
@Override
protected void runImpl() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.jmangos.commons.network.netty.sender.AbstractPacketSender;

/**
* The Class CMD_AUTH_LOGON_CHALLENGE.
* The Class <tt>CMD_AUTH_LOGON_CHALLENGE</tt>.
*/
public class CMD_AUTH_LOGON_CHALLENGE extends AbstractWoWClientPacket {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import org.jmangos.commons.utils.BigNumber;

/**
* The Class CMD_AUTH_LOGON_PROOF.
* The Class <tt>CMD_AUTH_LOGON_PROOF</tt>.
*/
public class CMD_AUTH_LOGON_PROOF extends AbstractWoWClientPacket {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.jmangos.commons.network.netty.sender.AbstractPacketSender;

/**
* The Class CMD_REALM_LIST.
* The Class <tt>CMD_REALM_LIST</tt>.
*/
public class CMD_REALM_LIST extends AbstractWoWClientPacket {

Expand All @@ -36,13 +36,10 @@ public class CMD_REALM_LIST extends AbstractWoWClientPacket {
@Inject
private WorldListService worldlist;

/*
* {@inheritDoc}
*/
/*
* (non-Javadoc)
*
* @see org.jmangos.common.network.model.ReceivablePacket#getMinimumLength()
* @see org.jmangos.commons.network.model.ReceivablePacket#getMinimumLength()
*/
@Override
public int getMinimumLength() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.jmangos.commons.network.netty.sender.AbstractPacketSender;

/**
* The Class CMD_RECONNECT_CHALLENGE.
* The Class <tt>CMD_RECONNECT_CHALLENGE</tt>.
*/
public class CMD_RECONNECT_CHALLENGE extends AbstractWoWClientPacket {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.jmangos.commons.network.netty.sender.AbstractPacketSender;

/**
* The Class CMD_RECONNECT_PROOF.
* The Class <tt>CMD_RECONNECT_PROOF</tt>.
*/
public class CMD_RECONNECT_PROOF extends AbstractWoWClientPacket {

Expand All @@ -47,7 +47,7 @@ public class CMD_RECONNECT_PROOF extends AbstractWoWClientPacket {
private AccountService accountService;

/**
* Instantiates a new CMD_RECONNECT_PROOF.
* Instantiates a new <tt>CMD_RECONNECT_PROOF</tt>.
*/
public CMD_RECONNECT_PROOF() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,11 @@
import javax.inject.Inject;

import org.apache.log4j.Logger;
import org.jboss.netty.channel.ChannelPipeline;
import org.jmangos.auth.network.netty.decoder.RealmPacketFrameDecoder;
import org.jmangos.auth.network.netty.decoder.RealmPacketFrameEncoder;
import org.jmangos.auth.network.netty.handler.AuthToClientChannelHandler;
import org.jmangos.auth.network.netty.packet.AbstractWoWClientPacket;
import org.jmangos.auth.network.netty.packet.server.TCMD_AUTH_ENABLE_CRYPT;
import org.jmangos.commons.network.netty.sender.AbstractPacketSender;

/**
* The Class CMD_AUTH_ENABLE_CRYPT.
* The Class <tt>CMD_TEST_CRYPT</tt>.
*/
public class CMD_TEST_CRYPT extends AbstractWoWClientPacket {

Expand All @@ -48,7 +43,7 @@ public CMD_TEST_CRYPT() {
/*
* (non-Javadoc)
*
* @see org.wowemu.common.network.model.ReceivablePacket#readImpl()
* @see org.jmangos.commons.network.model.ReceivablePacket#readImpl()
*/
@Override
protected void readImpl() throws BufferUnderflowException, RuntimeException {
Expand All @@ -62,7 +57,7 @@ protected void readImpl() throws BufferUnderflowException, RuntimeException {
/*
* (non-Javadoc)
*
* @see org.wowemu.common.network.model.ReceivablePacket#runImpl()
* @see org.jmangos.commons.network.model.ReceivablePacket#runImpl()
*/
@Override
protected void runImpl() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@
package org.jmangos.auth.network.netty.packet.server;

import org.apache.log4j.Logger;
import org.jmangos.auth.model.Account;
import org.jmangos.auth.model.Realm;
import org.jmangos.auth.network.netty.packet.AbstractWoWServerPacket;
import org.jmangos.auth.service.WorldListService;

import javolution.util.FastMap;

/**
* The Class TCMD_REALM_LIST.
* The Class <tt>TCMD_AUTH_ENABLE_CRYPT</tt>.
*/
public class TCMD_AUTH_ENABLE_CRYPT extends AbstractWoWServerPacket {

Expand All @@ -34,7 +29,7 @@ public class TCMD_AUTH_ENABLE_CRYPT extends AbstractWoWServerPacket {
private static final Logger log = Logger.getLogger(TCMD_AUTH_ENABLE_CRYPT.class);

/**
* Instantiates a new TCMD_REALM_LIST.
* Instantiates a new <tt>TCMD_AUTH_ENABLE_CRYPT</tt>.
*/
public TCMD_AUTH_ENABLE_CRYPT() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
import org.jmangos.commons.network.model.State;

/**
* The Class TCMD_AUTH_LOGON_PROOF.
* The Class <tt>TCMD_AUTH_LOGON_PROOF</tt>.
*/
public class TCMD_AUTH_LOGON_PROOF extends AbstractWoWServerPacket {

/** The response. */
private WoWAuthResponse response;

/**
* Instantiates a new TCMD_AUTH_LOGON_PROOF.
* Instantiates a new <tt>TCMD_AUTH_LOGON_PROOF</tt>.
*/
public TCMD_AUTH_LOGON_PROOF() {
}

/**
* Constructs new instance of <tt>T_CMD_AUTH_LOGON_PROOF</tt> packet.
* Constructs new instance of <tt>TCMD_AUTH_LOGON_PROOF</tt> packet.
*
* @param response
* the WoWAuthResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import javolution.util.FastMap;

/**
* The Class TCMD_REALM_LIST.
* The Class <tt>TCMD_REALM_LIST</tt>.
*/
public class TCMD_REALM_LIST extends AbstractWoWServerPacket {

Expand All @@ -37,7 +37,7 @@ public class TCMD_REALM_LIST extends AbstractWoWServerPacket {
private WorldListService worldlist;

/**
* Instantiates a new TCMD_REALM_LIST.
* Instantiates a new <tt>TCMD_REALM_LIST</tt>.
*/
public TCMD_REALM_LIST() {
}
Expand All @@ -55,7 +55,7 @@ public TCMD_REALM_LIST(WorldListService worldlist) {
/*
* (non-Javadoc)
*
* @see org.jmangos.common.network.model.SendablePacket#writeImpl()
* @see org.jmangos.commons.network.model.SendablePacket#writeImpl()
*/
@Override
protected void writeImpl() {
Expand Down
Loading

0 comments on commit 4dbe9b3

Please sign in to comment.