Package networking.response

Source Code of networking.response.ResponseUpdateAnimalOwner

package networking.response;

import metadata.Constants;
import utility.GamePacket;

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

    private short animalID;
    private short newAvatarID;

    public ResponseUpdateAnimalOwner() {
        responseCode = Constants.SMSG_UPDATE_ANIMAL_OWNER;
    }

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

    public void setAnimalID(int animalID) {
        this.animalID = (short) animalID;
    }

    public void setNewAvatarID(int newAvatarID) {
        this.newAvatarID = (short) newAvatarID;
    }
}
TOP

Related Classes of networking.response.ResponseUpdateAnimalOwner

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.