mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-31 01:15:57 -04:00
Added CreateClientPathMessage for noob paths, caught GetSpecificMapLocationsMessage
This commit is contained in:
@@ -39,6 +39,7 @@ import org.apache.mina.core.session.IoSession;
|
||||
|
||||
import protocol.swg.ClientIdMsg;
|
||||
import protocol.swg.ClientMfdStatusUpdateMessage;
|
||||
import protocol.swg.CreateClientPathMessage;
|
||||
import protocol.swg.ExpertiseRequestMessage;
|
||||
import protocol.swg.GuildRequestMessage;
|
||||
import protocol.swg.GuildResponseMessage;
|
||||
@@ -300,7 +301,14 @@ public class PlayerService implements INetworkDispatch {
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
swgOpcodes.put(Opcodes.GetSpecificMapLocationsMessage, new INetworkRemoteEvent() {
|
||||
|
||||
@Override
|
||||
public void handlePacket(IoSession session, IoBuffer data) throws Exception {
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
swgOpcodes.put(Opcodes.CmdSceneReady, new INetworkRemoteEvent() {
|
||||
|
||||
@Override
|
||||
@@ -653,6 +661,26 @@ public class PlayerService implements INetworkDispatch {
|
||||
player.getTitleList().remove(title);
|
||||
|
||||
}
|
||||
/**
|
||||
* Creates a blue path to the destination point.
|
||||
* @param actor Player that will be seeing the blue path.
|
||||
* @param destination Where the blue path will lead to.
|
||||
*/
|
||||
public void createClientPath(SWGObject actor, Point3D destination) {
|
||||
|
||||
if (actor == null || actor.getClient() == null || actor.getClient().getSession() == null)
|
||||
return;
|
||||
|
||||
List<Point3D> coordinates = new ArrayList<Point3D>();
|
||||
coordinates.add(actor.getPosition());
|
||||
|
||||
// TODO: Generate a path to destination based off of objects in the world.
|
||||
|
||||
coordinates.add(destination); // Destination MUST be last coordinate in array
|
||||
|
||||
CreateClientPathMessage path = new CreateClientPathMessage(coordinates);
|
||||
actor.getClient().getSession().write(path.serialize());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
|
||||
Reference in New Issue
Block a user