"use strict";
|
cc._RF.push(module, 'cfec1vreFpEkrBYsKV6vAuC', 'guild_list_vo');
|
// Scripts/mod/guild/guild_list_vo.js
|
|
"use strict";
|
|
/*-----------------------------------------------------+
|
公会列表vo
|
+-----------------------------------------------------*/
|
var GuildEvent = require("guild_event");
|
|
var GuildListVo = cc.Class({
|
"extends": gcore.BaseEvent,
|
ctor: function ctor() {
|
this.initData();
|
},
|
//初始化数据
|
initData: function initData() {
|
this.gid = 0;
|
this.gsrv_id = "";
|
this.name = "";
|
this.lev = 0;
|
this.members_num = 0;
|
this.members_max = 0;
|
this.leader_name = 0;
|
this.apply_type = 0;
|
this.apply_lev = 0;
|
this.is_apply = 0; //false
|
},
|
updateData: function updateData(data) {
|
for (var k in data) {
|
if (this[k] != null) {
|
this.setGuildAttribute(k, data[k]);
|
}
|
}
|
},
|
setGuildAttribute: function setGuildAttribute(key, value) {
|
if (this[key] != value) {
|
this[key] = value;
|
this.dispatchUpdateAttrByKey(key, value);
|
}
|
},
|
dispatchUpdateAttrByKey: function dispatchUpdateAttrByKey(key, value) {
|
this.fire(GuildEvent.UpdateGuildItemEvent, key, value);
|
},
|
_delete: function _delete() {}
|
});
|
module.exports = GuildListVo;
|
|
cc._RF.pop();
|