强化装备栏

This commit is contained in:
luying
2020-12-17 21:37:05 +08:00
parent b3ec0c85da
commit d2097a4264
9 changed files with 133 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
import { GOOD_TYPE, ITID, CURRENCY, CURRENCY_TYPE, CONSUME_TYPE, getCurNameById } from './../consts/consts';
import { GOOD_TYPE, ITID, CURRENCY, CURRENCY_TYPE, CONSUME_TYPE, getCurNameById } from './../consts';
import { EquipModel } from './../db/Equip';
import { decodeStr, resResult } from '../pubUtils/util';
import { getGoodById } from '../pubUtils/gamedata';
@@ -264,7 +264,9 @@ export async function addItems(roleId: string, roleName: string, sid: string, go
function sortItems (goods: Array<ItemInter>, bags: Array<BagInter>, skins: Array<number>, currencysMap: any, equips: Array<EquipInter>, showItems: Array<ItemInter>) {
for (let good of goods) {
let goodInfo = gameData.goods.get(good.id);
console.log('*****', good.id, goodInfo.goodType)
if (goodInfo.goodType == GOOD_TYPE.EQUIP) { // 装备
console.log()
for (let i = 0; i < good.count; i++) {
equips.push({id: good.id, ...goodInfo});
}