difenduandada
2024-12-31 34abe6963b344c882358274957f4b992456fee40
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
"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();