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

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


            ex.printStackTrace();
        }
    }

    private void spawnChar(CharacterData newCharacter, Channel recipient) throws Exception {
        P077_UpdateAgentAppearance updateAgentAppearance = new P077_UpdateAgentAppearance();
        updateAgentAppearance.setUnknown1(newCharacter.getLocalID());
        updateAgentAppearance.setUnknown2(newCharacter.getAgentID());

        //TODO: utility method that does this, I'm sick of converting everywhere...
        byte[] rawData = newCharacter.getAppearance();

        //FIXME: appearance is not 4 bytes, why are we truncating the first 4 bytes??
        //updateAgentAppearance.setAppearance(new short[]{(short) (rawData[0] & 0xFF), (short) (rawData[1] & 0xFF), (short) (rawData[2] & 0xFF), (short) (rawData[3] & 0xFF)});
        //TODO: utility
        updateAgentAppearance.setAppearance(1L | rawData[3] << 24 | rawData[2] << 16 | rawData[1] << 8 | rawData[0] & 0xFF);
        updateAgentAppearance.setUnknown6(0x3cbfa094);
        updateAgentAppearance.setName(newCharacter.getName());
        recipient.write(updateAgentAppearance);

        P021_SpawnObject spawnObject = new P021_SpawnObject();
        spawnObject.setAgentId(newCharacter.getAgentID());
        spawnObject.setUnknown2((0x30000000) | newCharacter.getLocalID()); // assumption that this is localID
View Full Code Here

TOP

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

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.