数数:消耗来源
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { DEFAULT_HERO_LV, FIGURE_UNLOCK_CONDITION, LINEUP_NUM, REDIS_KEY, STATUS, TASK_TYPE } from "../consts";
|
||||
import { DEFAULT_HERO_LV, FIGURE_UNLOCK_CONDITION, ITEM_CHANGE_REASON, LINEUP_NUM, REDIS_KEY, STATUS, TASK_TYPE } from "../consts";
|
||||
import { SkinModel } from "../db/Skin";
|
||||
import { DEFAULT_HEROES, HERO_SYSTEM_TYPE } from "../consts";
|
||||
import { HeroModel, HeroSkin, HeroType, HeroUpdate } from "../db/Hero";
|
||||
@@ -261,12 +261,13 @@ export class CreateHeroes extends UpdateHeroes {
|
||||
private taskPushMessage: TaskListReturn[] = [];
|
||||
private activityTaskPushMessage = [];
|
||||
private figureInfos: { heads: Figure[], frames: Figure[], spines: Figure[] }[] = [];
|
||||
private skinPushMessages: { heros: {skins: HeroSkin[], hid: number}[], skins: {id: number, hid: number }[]} = { heros: [], skins: [] };
|
||||
private skinPushMessages: { heros: {skins: HeroSkin[], hid: number}[], skins: {id: number, hid: number, inc: number, reason: number }[]} = { heros: [], skins: [] };
|
||||
|
||||
private async getSkinsOfThisHero(hid: number, initSkinInfo: SkinUpdate, isInit: boolean) {
|
||||
let allSkins = isInit? []: await SkinModel.findbyRoleAndHid(this.roleId, hid);
|
||||
let skin = await SkinModel.insertSkins(this.roleId, this.roleName, [initSkinInfo]);
|
||||
this.skinPushMessages.skins.push(...skin);
|
||||
let skinInfos = skin.map(cur => ({ id: cur.id, hid, inc: 1, reason: ITEM_CHANGE_REASON.GET_HERO_UNLOCK_SKIN}))
|
||||
this.skinPushMessages.skins.push(...skinInfos);
|
||||
if(skin) allSkins.push(...skin);
|
||||
let skins: { id: number, skin: string, enable: boolean, skinId: number }[] = [];
|
||||
for(let skin of allSkins) {
|
||||
|
||||
Reference in New Issue
Block a user