添加json
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user