Package networking.response

Source Code of networking.response.ResponseUpdateWeatherPrediction

package networking.response;

import metadata.Constants;
import utility.GamePacket;

/**
*
* @author Xuyuan
*/
public class ResponseUpdateWeatherPrediction extends GameResponse {

    private short day;
    private short lightOutput;
    private short rainOutput;

    public ResponseUpdateWeatherPrediction() {
        responseCode = Constants.SMSG_WEATHER_PREDICTION;
    }

    @Override
    public byte[] constructResponseInBytes() {
        GamePacket packet = new GamePacket(responseCode);
        packet.addShort16(day);
        packet.addShort16(lightOutput);
        packet.addShort16(rainOutput);
        return packet.getBytes();
    }

    public void setDay(short day) {
        this.day = day;
    }

    public void setLightOutput(short lightOutput) {
        this.lightOutput = lightOutput;
    }

    public void setRainOutput(short rainOutput) {
        this.rainOutput = rainOutput;
    }
}
TOP

Related Classes of networking.response.ResponseUpdateWeatherPrediction

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.