Package utility

Examples of utility.GamePacket.addInt32()


    @Override
    public byte[] constructResponseInBytes() {
        GamePacket packet = new GamePacket(responseCode);
        packet.addInt32(animal_id);
        packet.addInt32(predator_id);
        packet.addShort16(count);
        return packet.getBytes();
    }

    public void setAnimalID(int animalID) {
View Full Code Here


    @Override
    public byte[] constructResponseInBytes() {
        GamePacket packet = new GamePacket(responseCode);
        packet.addShort16((short) status);
        packet.addInt32(plantTypeID);
        packet.addInt32(amount);
        return packet.getBytes();
    }

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

    @Override
    public byte[] constructResponseInBytes() {
        GamePacket packet = new GamePacket(responseCode);
        packet.addShort16((short) status);
        packet.addInt32(plantTypeID);
        packet.addInt32(amount);
        return packet.getBytes();
    }

    public void setStatus(int status) {
        this.status = status;
View Full Code Here

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

        return packet.getBytes();
    }

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

                if (predatorList.endsWith(", ")) {
                    predatorList = predatorList.substring(0, predatorList.lastIndexOf(","));
                }

                packet.addString(predatorList);
                packet.addInt32(pt.getModelID());
                packet.addInt32((int) pt.getAvgBiomass());
            }
        }

        return packet.getBytes();
View Full Code Here

                    predatorList = predatorList.substring(0, predatorList.lastIndexOf(","));
                }

                packet.addString(predatorList);
                packet.addInt32(pt.getModelID());
                packet.addInt32((int) pt.getAvgBiomass());
            }
        }

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

    @Override
    public byte[] constructResponseInBytes() {
        GamePacket packet = new GamePacket(responseCode);
        packet.addShort16((short) month);
        packet.addShort16((short) year);
        packet.addInt32(duration);
        packet.addInt32(current);
        packet.addFloat(rate);
        return packet.getBytes();
    }
View Full Code Here

    public byte[] constructResponseInBytes() {
        GamePacket packet = new GamePacket(responseCode);
        packet.addShort16((short) month);
        packet.addShort16((short) year);
        packet.addInt32(duration);
        packet.addInt32(current);
        packet.addFloat(rate);
        return packet.getBytes();
    }

    public void setCurrent(int current) {
View Full Code Here

    }

    @Override
    public byte[] constructResponseInBytes() {
        GamePacket packet = new GamePacket(responseCode);
        packet.addInt32(amount);
        packet.addInt32(total);
        return packet.getBytes();
    }

    public void setAmount(int amount) {
View Full Code Here

    @Override
    public byte[] constructResponseInBytes() {
        GamePacket packet = new GamePacket(responseCode);
        packet.addInt32(amount);
        packet.addInt32(total);
        return packet.getBytes();
    }

    public void setAmount(int amount) {
        this.amount = amount;
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.