This commit is contained in:
aozhiwei 2022-05-12 09:32:18 +08:00
parent 32b3751834
commit 41ee0a085e
2 changed files with 16 additions and 20 deletions

View File

@ -0,0 +1,8 @@
const utils = require('j7/utils');
const basewrap = require('./basewrap');
class GameDb2006 extends basewrap.BaseWrap {
}
module.exports = GameDb2006;

View File

@ -79,10 +79,16 @@ function init() {
'', '',
'Config' 'Config'
); );
registerMetaClass(configDir + 'gamedb.json',
'',
'GameDb2006'
);
load(); load();
{ {
traverseMetaList('MarketDb', (dbConf, idx) => { traverseMetaList('GameDb2006', (dbConf, idx) => {
app.registerDb('MarketDb' + idx, dbConf); app.registerDb('GameDb2006' + idx, dbConf);
}); });
} }
} }
@ -117,24 +123,6 @@ function traverseMetaList(name, cb) {
} }
} }
function getContracts() {
return getMetaList('Contract');
}
function getContractByName(name) {
return getMetaByKey('Contract', name);
}
function getContractByAddress(address) {
let contract = null;
getContracts().forEach((item) => {
if (item['address'] == address) {
contract = item;
}
});
return contract;
}
exports.init = init; exports.init = init;
exports.getMetaByKey = getMetaByKey; exports.getMetaByKey = getMetaByKey;