Package utility

Examples of utility.GamePacket


        responseCode = Constants.SMSG_CHANGE_PARAMETERS;
    }

    @Override
    public byte[] constructResponseInBytes() {
        GamePacket packet = new GamePacket(responseCode);
        packet.addShort16(status);

        if (status == 0) {
            packet.addShort16((short) parameterList.size());

            for (short parameter : parameterList.keySet()) {
                packet.addShort16(parameter);
                packet.addFloat(parameterList.get(parameter));
            }
        }

        return packet.getBytes();
    }
View Full Code Here


        responseCode = Constants.SMSG_SEE_PVE_ONLINE_PLAYERS;
    }

    @Override
    public byte[] constructResponseInBytes() {
        GamePacket packet = new GamePacket(responseCode);
        if (pvePlayers != null) {
            numberOfPlayers = (short) pvePlayers.size();
            packet.addShort16(numberOfPlayers);
            for (String player : pvePlayers) {
                packet.addString(player);
            }
        }

        return packet.getBytes();
    }
View Full Code Here

TOP

Related Classes of utility.GamePacket

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.