Package gwlpr.protocol.gameserver.outbound

Examples of gwlpr.protocol.gameserver.outbound.P378_Unknown


     * Step 4. (final step)
     * TODO fix this and reverse the packet more!
     */
    public static void charCreateFinish(Channel channel, Character chara)
    {
        P378_Unknown sAction = new P378_Unknown();
        sAction.init(channel);
        sAction.setUnknown1(new byte[16]);
        sAction.setUnknown2(chara.getName());
        sAction.setUnknown3((short) 81);
       
        ByteBuffer buffer = ByteBuffer.allocate(100).order(ByteOrder.LITTLE_ENDIAN);
        buffer.putShort((short) 6);
        buffer.putShort((short) 248);
        buffer.put(new byte[] {0x33, 0x36, 0x31, 0x30});
       
        buffer.put((byte) ((chara.getSkin().byteValue() << 5) | (chara.getHeight().byteValue() << 1) | chara.getSex().byteValue()));
        buffer.put((byte) ((chara.getFace().byteValue() << 7) | (chara.getSkin().byteValue() >> 3)));
        buffer.put((byte) ((chara.getPrimaryProfession().getId().byteValue() << 4) | (chara.getFace().byteValue() >> 1)));
        buffer.put((byte) ((chara.getCampaign().byteValue() << 6) | chara.getHairstyle().byteValue()));
       
        buffer.put(new byte[16]);

        byte level = chara.getLevel().getLevel().byteValue();
        buffer.put((byte) ((level << 4) | chara.getCampaign().byteValue()));                                                  
       
        buffer.put(new byte[] {-1, -0x23, -0x23, 0, -0x23, -0x23, -0x23, -0x23});
       
        byte[] a = new byte[buffer.position()];
        buffer.position(0);
        buffer.get(a);
       
        sAction.setUnknown4(a);

        channel.writeAndFlush(sAction);
    }
View Full Code Here

TOP

Related Classes of gwlpr.protocol.gameserver.outbound.P378_Unknown

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.