Package be.demmel.jgws

Examples of be.demmel.jgws.MapData


        LOGGER.debug("P5633_EncryptedRC4Key sent, adding RC4Encoder to pipeline");
        RC4Encoder rc4Encoder = new RC4Encoder(rc4Key);
        ctx.pipeline().addFirst("rc4EnCoder", rc4Encoder);
       
        // Retrieve the map this user is on
        MapData map = serverData.getMap();
        CharacterData character = serverData.getCurrentCharacter();

        P370_InstanceLoadHead instanceLoadHeader = new P370_InstanceLoadHead();
        instanceLoadHeader.setUnknown1(character.isIsOutpost() ? (short) 0x3F : (short) 0x1F);
        instanceLoadHeader.setUnknown2(character.isIsOutpost() ? (short) 0x3F : (short) 0x1F);
        instanceLoadHeader.setUnknown3((short) 0x00);
        instanceLoadHeader.setUnknown4((short) 0x00);
        ctx.write(instanceLoadHeader);

        P371_InstanceLoadCharName instanceLoadCharName = new P371_InstanceLoadCharName();
        instanceLoadCharName.setCharName(character.getName());
        ctx.write(instanceLoadCharName);

        P395_InstanceLoadDistrictInfo instanceLoadDistrictInfo = new P395_InstanceLoadDistrictInfo();
        instanceLoadDistrictInfo.setCharAgent(character.getLocalID());
        instanceLoadDistrictInfo.setMapID(map.getGameMapID());
        instanceLoadDistrictInfo.setDistrictAndRegion((character.isIsOutpost() ? map.getDistrictNumber() : 0)
            | (character.isIsOutpost() ? map.getDistrictCountry() : 0));
        instanceLoadDistrictInfo.setIsExplorable(character.isIsOutpost() ? (short) 1 : 0);
        instanceLoadDistrictInfo.setIsObserver((byte) 0);
        instanceLoadDistrictInfo.setLanguage(character.isIsOutpost() ? 0 : (short) 3);

        ctx.write(instanceLoadDistrictInfo);
View Full Code Here


    }

    LOGGER.info("Searching for map with id: {}", foundPlayerData.getMapId());
    // Retrieve the map that will be loaded
    // TODO: pass instances, don't start using static things everywhere!
    MapData map = GameServer.getMap((int) foundPlayerData.getMapId());

    // Convert the security keys to the right format.... again
    // TODO: decide on 1 format!!
    short[] keys1 = foundPlayerData.getSecurityKey1();
    short[] keys2 = foundPlayerData.getSecurityKey2();
View Full Code Here

    // TODO: convert the skills from the char to the right integer values (because the client uses the length of ints, we have bytes)
    // empty for now, database doesn't support it for now anyway
    updateAvailableSkills.setSkillsBitField(new long[] {});
    ctx.write(updateAvailableSkills);

    MapData map = serverData.getMap();
   
    ChannelGroup allChannels = ctx.attr(AllChannelsKey.ALL_CHANNELS_KEY).get();

    // spawn this player on the map (for all players!)
    actions.add(new SpawnPlayerAction(ctx.channel(), allChannels));
View Full Code Here

TOP

Related Classes of be.demmel.jgws.MapData

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.