✨ feat(兼容): 配表使用后台隐藏物品
This commit is contained in:
@@ -26,6 +26,7 @@ import { combineItems, getCoinEventProperties, getGoldEventProperties, sortItems
|
||||
import { nowSeconds } from '../../pubUtils/timeUtil';
|
||||
import { calculateCeWithHero, calculateCeWithRole } from '../playerCeService';
|
||||
import { sendMessageToUsersWithSuc, sendMessageToUserWithSuc } from '../pushService';
|
||||
import { filterGoods } from '../dataService';
|
||||
|
||||
|
||||
|
||||
@@ -113,6 +114,7 @@ export async function handleCost(roleId: string, sid: string, goods: Array<ItemI
|
||||
}
|
||||
|
||||
export async function addItems(roleId: string, roleName: string, sid: string, goods: Array<ItemInter>, reason: ITEM_CHANGE_REASON) {
|
||||
goods = filterGoods(goods, obj => obj.id, roleId, reason);
|
||||
let { items, jewels, gold, coin, ap, skins, figures } = sortItems(goods, HANDLE_REWARD_TYPE.RECEIVE);
|
||||
let showItems: { id: number, seqId?: number, count: number, isBag?: boolean }[] = [];
|
||||
let role = await RoleModel.findByRoleId(roleId);
|
||||
@@ -494,11 +496,12 @@ export function getHonourObject(count: number) {
|
||||
*/
|
||||
export function unlockFigureWithoutSave(conditions: { type: number, paramHid?: number, paramFavourLv?: number, paramSkinId?: number, paramWinStreakNum?: number }[], role: RoleType) {
|
||||
|
||||
let { heads, frames, spines } = role;
|
||||
let { heads, frames, spines, roleId } = role;
|
||||
let figureInfo = { heads: new Array<Figure>(), frames: new Array<Figure>(), spines: new Array<Figure>() };
|
||||
for (let { type, paramHid, paramFavourLv, paramSkinId, paramWinStreakNum } of conditions) {
|
||||
let canUnLockList = gameData.figureCondition.get(type);
|
||||
if (canUnLockList) {
|
||||
canUnLockList = filterGoods(canUnLockList, obj => obj.gid, roleId, ITEM_CHANGE_REASON.GET_HERO_UNLOCK_FIGURE);
|
||||
let reason = 0;
|
||||
|
||||
for (let { id, params, gid } of canUnLockList) {
|
||||
|
||||
Reference in New Issue
Block a user