Package networking.response

Source Code of networking.response.ResponseUpdateCash

package networking.response;

import metadata.Constants;
import utility.GamePacket;

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

    private int amount;
    private int cash;

    public ResponseUpdateCash() {
        responseCode = Constants.SMSG_UPDATE_CASH;
    }

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

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public void setCash(int cash) {
        this.cash = cash;
    }
}
TOP

Related Classes of networking.response.ResponseUpdateCash

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.