添加json

This commit is contained in:
luying
2021-01-23 18:10:48 +08:00
parent 0e88bc2bfc
commit d9ef58b6c5
40 changed files with 16877 additions and 6504 deletions
+5
View File
@@ -9,6 +9,7 @@ import { RANDOM_SE_COUNT, FIX_ATTRIBUTES_RAN, ITID, CURRENCY_BY_TYPE, CURRENCY_T
import { getRandValueByMinMax, getRandEelm } from './util';
import { findWhere } from 'underscore';
import { UserGuildModel } from '../db/UserGuild';
export async function addSkins(roleId: string, id: number) {
let skinInfo = gameData.fashion.get(id);
@@ -27,6 +28,10 @@ export async function addSkins(roleId: string, id: number) {
export async function addBags(roleId: string, roleName: string, data: BagInter) {
let { id, count, itemName, type, hid } = data;
let item = await ItemModel.increaseItem(roleId, id, count, { roleId, roleName, itemName, id, type, hid });
if(item.id == CURRENCY_BY_TYPE.get(CURRENCY_TYPE.HONOUR) ) {
await UserGuildModel.addHonourWeekly(roleId, count);
}
return { id: item.id, count: item.count };
}