Implemented GalacticPacketIntents for incoming packets

This commit is contained in:
Obique
2014-11-29 11:41:10 -06:00
committed by Obique
parent 094331918d
commit 5b140638e3
8 changed files with 162 additions and 20 deletions
+4 -4
View File
@@ -5,7 +5,7 @@ import java.util.concurrent.ConcurrentHashMap;
import network.packets.Packet;
import network.packets.swg.login.ClientIdMsg;
import intents.InboundPacketIntent;
import intents.GalacticPacketIntent;
import resources.control.Intent;
import resources.control.Manager;
import resources.network.ServerType;
@@ -30,14 +30,14 @@ public class PlayerManager extends Manager {
@Override
public boolean initialize() {
registerForIntent(InboundPacketIntent.TYPE);
registerForIntent(GalacticPacketIntent.TYPE);
return super.initialize();
}
@Override
public void onIntentReceived(Intent i) {
if (i instanceof InboundPacketIntent) {
InboundPacketIntent ipi = (InboundPacketIntent) i;
if (i instanceof GalacticPacketIntent) {
GalacticPacketIntent ipi = (GalacticPacketIntent) i;
Packet packet = ipi.getPacket();
ServerType type = ipi.getServerType();
long networkId = ipi.getNetworkId();