Package utility

Examples of utility.GamePacket.addBoolean()


    }

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

        return packet.getBytes();
    }

    public void setStatus(boolean status) {
View Full Code Here


                packet.addShort16((short) env.getColumn());
                packet.addInt32(env.getOwnerID());
                packet.addInt32(env.getEnvironmentScore());

                for (Zone zone : env.getZones()) {
                    packet.addBoolean(zone.isEnable());
                    packet.addShort16((short) zone.getID());
                    packet.addShort16((short) zone.getType());

                    WaterSource waterSource = zone.getWaterSource();
                    packet.addBoolean(waterSource != null);
View Full Code Here

                    packet.addBoolean(zone.isEnable());
                    packet.addShort16((short) zone.getID());
                    packet.addShort16((short) zone.getType());

                    WaterSource waterSource = zone.getWaterSource();
                    packet.addBoolean(waterSource != null);

                    if (waterSource != null) {
                        packet.addInt32(waterSource.getID());
                        packet.addInt32(waterSource.getMaxWater());
                        packet.addInt32(waterSource.getWater());
View Full Code Here

    }

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

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

            for (World world : worldList) {
                packet.addInt32(world.getID());
                packet.addString(world.getGameName());
               
                boolean isNew = world.getPlayTime() == 0;
                packet.addBoolean(isNew);

                if (!isNew) {
                    packet.addShort16((short) world.getYear());
                    packet.addShort16((short) world.getMonth());
                    packet.addInt32((int) world.getPlayTime());
View Full Code Here

        for (Zone zone : env.getZones()) {
            packet.addShort16((short) zone.getID());
            packet.addShort16((short) zone.getType());

            WaterSource waterSource = zone.getWaterSource();
            packet.addBoolean(waterSource != null);

            if (waterSource != null) {
                packet.addInt32(waterSource.getID());
                packet.addInt32(waterSource.getMaxWater());
                packet.addInt32(waterSource.getWater());
View Full Code Here

    }

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

        return packet.getBytes();
    }

    public void setStatus(boolean status) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.