Package be.demmel.jgws

Examples of be.demmel.jgws.GameServerSession


          channel.write(generalChatMessage);
        } catch (Exception e) {
          // TODO: what to do in this case? review the exceptions possible?
        }

        GameServerSession playerData = channel.attr(SessionKey.SESSION_KEY).get();
        // Retrieve the Character the player is currently playing
        CharacterData character = playerData.getCurrentCharacter();

        P085_GeneralChatOwner generalChatOwner = new P085_GeneralChatOwner();
        generalChatOwner.setUnknown1((int) character.getLocalID());
        generalChatOwner.setUnknown2(chatColor);
        try {
View Full Code Here


    public void execute() {
        try {
            for (Channel player :channels) {

                // If this player is the one that just joined the map, treat him differently
              GameServerSession playerData = newPlayerData.attr(SessionKey.SESSION_KEY).get();
                if (player == this.newPlayerData) {
                    spawnChar(playerData.getCurrentCharacter(), player);

                    P023_InstanceLoadFadeIntoMap fadeIntoMap = new P023_InstanceLoadFadeIntoMap();
                    fadeIntoMap.setAgentId(playerData.getCurrentCharacter().getAgentID());
                    fadeIntoMap.setUnknown2(3);
                    this.newPlayerData.write(fadeIntoMap);
                    continue;
                } else {
                    // It's another player, so spawn this player for the new player, and spawn him for the other
                    // spawn the new player for the "other" player
                    spawnChar(playerData.getCurrentCharacter(), player);
                    // spawn the "other" player for the new player
                    spawnChar(player.attr(SessionKey.SESSION_KEY).get().getCurrentCharacter(), this.newPlayerData);
                }

            }
View Full Code Here

    @Override
    protected void handle(ChannelGroup channels) throws IllegalStateException, Exception {
     
      for(Channel channel : channels) {
        MDC.put("channel", String.format("[id: 0x%08x]",channel.hashCode()));
        GameServerSession playerData = channel.attr(SessionKey.SESSION_KEY).get();
       
        // Retrieve the Character the player is currently playing
            CharacterData character = playerData.getCurrentCharacter();
           
            if(character == null) {// character not loaded yet
              continue;
            }
View Full Code Here

TOP

Related Classes of be.demmel.jgws.GameServerSession

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.