Package be.demmel.jgws.packets.gameserver.outbound

Examples of be.demmel.jgws.packets.gameserver.outbound.P002_PingReply


    super(P005_Ping.class);
  }

  @Override
  public void handlePacket(ChannelHandlerContext ctx, P005_Ping packet, GameServerSession serverData, List<QueueAction> actions) throws Exception {
    P002_PingReply pingReply = new P002_PingReply();
    CharacterData character = serverData.getCurrentCharacter();
    long timeBetweenNowAndLastPing = new Date().getTime() - character.getLastPingTime().getTime();
    pingReply.setUnknown1(timeBetweenNowAndLastPing);
    ctx.write(pingReply);
  }
View Full Code Here


  public void handlePacket(ChannelHandlerContext ctx, P003_PingReply packet, GameServerSession serverData, List<QueueAction> actions) throws Exception {
    // Retrieve the Character the player is currently playing
    CharacterData character = serverData.getCurrentCharacter();
    long timeBetweenNowAndLastPing = new Date().getTime() - character.getLastPingTime().getTime();

    P002_PingReply pingReply = new P002_PingReply();
    pingReply.setUnknown1(timeBetweenNowAndLastPing);
    ctx.write(pingReply);
  }
View Full Code Here

TOP

Related Classes of be.demmel.jgws.packets.gameserver.outbound.P002_PingReply

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.