🐞 fix(稷下学宫): 修复hp,maxhp, 休整点强化更新已安装特性卡id,权重展示
This commit is contained in:
@@ -11,6 +11,8 @@ import { clone } from 'underscore';
|
||||
import { RougeEffect, getSlotUnlockPoint } from './rougeEffectService';
|
||||
import { BackendSession } from 'pinus';
|
||||
import { checkTask } from '../task/taskService';
|
||||
import { RougelikeRecordModel } from '../../db/RougelikeRecord';
|
||||
import { updateMaxHp } from './rougeService';
|
||||
|
||||
export class HandleAddCard {
|
||||
roleId: string;
|
||||
@@ -120,11 +122,11 @@ export class HandleAddCard {
|
||||
passiveCardMap.set(passiveCardData.authorType, count + 1);
|
||||
}
|
||||
for (const [authorType, count] of passiveCardMap) {
|
||||
await checkTask(this.serverId, this.roleId, this.sid, TASK_TYPE.ROUGE_AUTHOR_CARD_COLLECT, { authorType, cardType: TASK_ROUGE_CARD_TYPE.PASSIVE, cardIds:this.addPassiveCards.map(cur => cur.cardId) });
|
||||
await checkTask(this.serverId, this.roleId, this.sid, TASK_TYPE.ROUGE_AUTHOR_CARD_COLLECT, { authorType, cardType: TASK_ROUGE_CARD_TYPE.PASSIVE, cardIds: this.addPassiveCards.map(cur => cur.cardId) });
|
||||
}
|
||||
}
|
||||
if (this.addHolyCards.length > 0) {
|
||||
await checkTask(this.serverId, this.roleId, this.sid, TASK_TYPE.ROUGE_HOLY_COLLECT, {cardIds:this.addHolyCards.map(cur => cur.cardId)});
|
||||
await checkTask(this.serverId, this.roleId, this.sid, TASK_TYPE.ROUGE_HOLY_COLLECT, { cardIds: this.addHolyCards.map(cur => cur.cardId) });
|
||||
}
|
||||
|
||||
if (this.addCharas.length > 0) {
|
||||
@@ -166,6 +168,8 @@ export class HandleAddCard {
|
||||
result.addCharas = [...charasMap.values()].map(param => new CommonChara(param));
|
||||
result.addCards = [...cardsMap.values()].map(param => new CommonCard(param));
|
||||
|
||||
const dbRecord = await RougelikeRecordModel.findByGameCode(this.gameCode);
|
||||
result.addCharas = await updateMaxHp(this.roleId, this.gameCode, (dbRecord?.type || 0), (dbRecord?.grade || 0), charasMap)
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user