"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");
/**
 *Created by cuiliqiang on 2018/3/7
 * 集卡数据
 */
var GetCollectRuleData = (function (_super) {
    __extends(GetCollectRuleData, _super);
    function GetCollectRuleData() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    GetCollectRuleData.prototype.update = function (data) {
        if (!data) {
            return;
        }
        _super.prototype.update.call(this, data);
        this.prizeLevel = data.prizeLeve;
        this.clickFlag = data.clickFlag;
        this.exchange = data.exchange;
        this.collectRules = data.collectRule;
        if (data.collectGoods) {
            var len = data.collectGoods.length;
            var i = 0;
            for (i; i < len; i++) {
                this.allCount += data.collectGoods[i].count;
            }
        }
        else {
            this.allCount = 0;
        }
    };
    return GetCollectRuleData;
}(Data_1.Data));
exports.GetCollectRuleData = GetCollectRuleData;
__reflect(GetCollectRuleData.prototype, "\"/Users/chiwang/Desktop/\u5151\u5427\u5DE5\u4F5C/gameegret20181011/db-game-template/egret/libs/tw/data/common/getCollectRule/GetCollectRuleData\".GetCollectRuleData");
//# sourceMappingURL=GetCollectRuleData.js.map