feat(诸子列传): 添加功能

This commit is contained in:
luying
2023-07-13 16:23:29 +08:00
parent b1af8ad204
commit 1eb6f76cce
25 changed files with 5475 additions and 71 deletions
@@ -21,6 +21,7 @@ import { SkinType } from '../db/Skin';
import { LadderMatchModel } from '../db/LadderMatch';
import { ArtifactModelType } from '../db/Artifact';
import { GVGVestigeRankModel } from '../db/GVGVestigeRank';
import { AuthorBookType } from '../db/AuthorBook';
interface Param {
isInitRole?: boolean,
@@ -49,6 +50,9 @@ interface Param {
artifact?: ArtifactModelType,
artifacts?: ArtifactModelType[],
job?: number,
authorBooks?: AuthorBookType[],
bookId?: number,
subId?: number,
}
export async function calculateCeWithHero(type: HERO_SYSTEM_TYPE, roleId: string, serverId: number, sid: string, hid: number, heroUpdate: HeroUpdate, param: Param = {}) {
@@ -427,6 +431,14 @@ export async function calculateCes(type: HERO_SYSTEM_TYPE, roleId: string, serve
}
break;
}
case HERO_SYSTEM_TYPE.AUTHOR_BOOK_STAR: // 40. 诸子百家升星
{
let { authorBooks = [], bookId, subId } = param;
calCe.setAuthorBooks(authorBooks);
ceChangeTxt.push(`诸子列传 ${bookId}${subId} 重置星级`);
break;
}
}
let { heroCe, roleInc } = calCe.getCeInc(); // 计算战力,获得有变化的武将战力
let changeHids: number[] = [];