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
"use strict";
cc._RF.push(module, '35c988PcHlMjabF08enbtUz', 'forgehouse_model');
// Scripts/mod/forgehouse/forgehouse_model.js
 
"use strict";
 
// --------------------------------------------------------------------
// @author: xxx@syg.com(必填, 创建模块的人员)
// @description:
//      这里填写详细说明,主要填写该模块的功能简要
// <br/>Create: 2019-01-03 10:09:32
// --------------------------------------------------------------------
var ForgehouseModel = cc.Class({
  "extends": BaseClass,
  ctor: function ctor() {},
  properties: {},
  initConfig: function initConfig() {
    this.eqm_data_list = {};
  },
  // 根据装备类型获取配置数据
  getBackEquipsData: function getBackEquipsData(type) {
    if (this.eqm_data_list[type]) {
      return this.eqm_data_list[type];
    }
 
    this.eqm_data_list[type] = [];
    var list = Config.partner_eqm_data.data_eqm_compose_id[type];
 
    for (var key in list) {
      var element = list[key]; // if (element.type == type){
 
      this.eqm_data_list[type].push(element); // }
    }
 
    this.eqm_data_list[type].sort(function (a, b) {
      return a.id - b.id;
    });
    return this.eqm_data_list[type];
  },
  setCompSendID: function setCompSendID(id) {
    this.comp_send_id = id;
  },
  getCompSendID: function getCompSendID() {
    return this.comp_send_id || null;
  }
});
 
cc._RF.pop();