"use strict";
var __reflect = (this && this.__reflect) || function (p, c, t) {
    p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = this && this.__extends || function __extends(t, e) { 
 function r() { 
 this.constructor = t;
}
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
r.prototype = e.prototype, t.prototype = new r();
};
Object.defineProperty(exports, "__esModule", { value: true });
var Data_1 = require("../Data");
var PetHomeInfoData = (function (_super) {
    __extends(PetHomeInfoData, _super);
    function PetHomeInfoData() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /**
         * 当前状态（1:正常 2:外出 3:吃饭 4:学习 5:喝水 6:睡觉）
         */
        _this.status = 0;
        /**
         * 宠物名称
         */
        _this.petName = "";
        /**
         * 宠物等级
         */
        _this.petLevel = 0;
        /**
         * 饲养员拥有食物量
         */
        _this.foodNum = 0;
        /**
         * 食物名称
         */
        _this.foodName = "";
        /**
         * 每次喂养食物数量
         */
        _this.feedLimit = 10;
        /**
         * 宝箱插件id
         */
        _this.awardPluginId = 0;
        /**
         * 外出奖励（-1:自定义奖励 0:无奖励 1：粮食奖励）
         */
        _this.travelRewardType = 0;
        /**
         * 外出奖励个数(针对粮食奖励)
         */
        _this.travelRewardNum = 0;
        /**
         * 宠物正在使用的道具数据
         */
        _this.toy = [];
        return _this;
    }
    PetHomeInfoData.prototype.update = function (result) {
        if (!result) {
            return;
        }
        _super.prototype.update.call(this, result);
        var result2;
        if (result.data) {
            result2 = result.data;
        }
        if (result2) {
            if (result2.petId) {
                this.petId = result2.petId;
            }
            if (result2.status) {
                this.status = result2.status;
            }
            if (result2.leftMinutes) {
                this.leftMinutes = result2.leftMinutes;
            }
            if (result2.isFull) {
                this.isFull = result2.isFull;
            }
            if (result2.petName) {
                this.petName = result2.petName;
            }
            if (result2.petLevel) {
                this.petLevel = result2.petLevel;
            }
            if (result2.foodNum) {
                this.foodNum = result2.foodNum;
            }
            if (result2.foodName) {
                this.foodName = result2.foodName;
            }
            if (result2.feedLimit) {
                this.feedLimit = result2.feedLimit;
            }
            if (result2.awardPluginId) {
                this.awardPluginId = result2.awardPluginId;
            }
            if (result2.travelRewardType) {
                this.travelRewardType = result2.travelRewardType;
            }
            if (result2.travelRewardNum) {
                this.travelRewardNum = result2.travelRewardNum;
            }
            this.toy = result2.toy;
            if (result2.levelRewardPluginId) {
                this.levelRewardPluginId = result2.levelRewardPluginId;
            }
            if (result2.petExp) {
                this.petExp = result2.petExp;
            }
            if (result2.currentLevelExp) {
                this.currentLevelExp = result2.currentLevelExp;
            }
            if (result2.nextLevelExp) {
                this.nextLevelExp = result2.nextLevelExp;
            }
            if (result2.foodStoreLimit) {
                this.foodStoreLimit = result2.foodStoreLimit;
            }
            if (result2.statusTotalTime) {
                this.statusTotalTime = result2.statusTotalTime;
            }
            if (result2.statusRemainingTime) {
                this.statusRemainingTime = result2.statusRemainingTime;
            }
            if (result2.foodList) {
                this.foodList = result2.foodList;
            }
        }
    };
    return PetHomeInfoData;
}(Data_1.Data));
exports.PetHomeInfoData = PetHomeInfoData;
__reflect(PetHomeInfoData.prototype, "\"/Users/chiwang/Desktop/\u5151\u5427\u5DE5\u4F5C/gameegret20181011/db-game-template/egret/libs/tw/data/pet/PetHomeInfoData\".PetHomeInfoData");
//# sourceMappingURL=PetHomeInfoData.js.map