处理物品不存在的错误
This commit is contained in:
@@ -160,7 +160,11 @@ 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.error('无道具', good.id);
|
||||
// 道具不存在时先跳过
|
||||
if (!goodInfo) {
|
||||
console.log('sortItems 道具不存在:', good.id);
|
||||
continue;
|
||||
}
|
||||
|
||||
let {type, table, isCurrency} = ITID.get(goodInfo.itid);
|
||||
if(table == ITEM_TABLE.EQUIP) {
|
||||
|
||||
Reference in New Issue
Block a user