排行:排行rpc同进程获取函数修改
This commit is contained in:
@@ -3,7 +3,7 @@ import { Channel, pinus } from 'pinus';
|
||||
import { getRandValueByMinMax, getRandEelm, decodeIdCntArrayStr } from '../pubUtils/util';
|
||||
import { DEFAULT_HEROES, TERAPH_RANDOM } from "../consts";
|
||||
import { DicTeraph } from '../pubUtils/dictionary/DicTeraph';
|
||||
import { Teraph, RoleModel, RoleType } from '../db/Role';
|
||||
import { Teraph, RoleModel, RoleType, RoleUpdate } from '../db/Role';
|
||||
import { ROLE_SELECT } from '../consts';
|
||||
import { SCHOOL } from '../pubUtils/dicParam';
|
||||
import { gameData } from '../pubUtils/data';
|
||||
@@ -12,6 +12,7 @@ import { SclResultInter, SclPosInter } from '../pubUtils/interface';
|
||||
import { CheckMeterial } from './rewardService';
|
||||
import { HeroUpdate } from '../db/Hero';
|
||||
import { SkinUpdate } from '../db/Skin';
|
||||
import { Figure } from '../domain/dbGeneral';
|
||||
|
||||
export async function getTeraphStrengthenResult(role: RoleType, count: number, dicTeraph: DicTeraph, teraph: Teraph) {
|
||||
let criAttr: number[] = [], times = 0;
|
||||
@@ -129,7 +130,7 @@ export async function getSchoolList(roleId: string) {
|
||||
}
|
||||
|
||||
function getDefaultHeroInfos(heroes: Map<number, HeroUpdate>, skins: Map<number, SkinUpdate>) {
|
||||
const initInfos = [];
|
||||
const initInfos: { heroInfo: HeroUpdate, skinInfo: SkinUpdate}[] = [];
|
||||
for(let hid of DEFAULT_HEROES) {
|
||||
initInfos.push({
|
||||
heroInfo: heroes.get(hid),
|
||||
@@ -139,7 +140,14 @@ function getDefaultHeroInfos(heroes: Map<number, HeroUpdate>, skins: Map<number,
|
||||
return initInfos;
|
||||
}
|
||||
|
||||
export function getDefaultRoleInfo(heroes: Map<number, HeroUpdate>, skins: Map<number, SkinUpdate>, role, figureInfo) {
|
||||
export function getDefaultRoleInfo(heroes: Map<number, HeroUpdate>, skins: Map<number, SkinUpdate>, role:RoleUpdate, figureInfo: { heads: Figure[], frames: Figure[], spines: Figure[] }) {
|
||||
const initInfos = getDefaultHeroInfos(heroes, skins);
|
||||
return { initInfos, role, figureInfo };
|
||||
}
|
||||
|
||||
export function getInitHeroById(hid: number) {
|
||||
return {
|
||||
heroInfo: pinus.app.get('initHeroes').get(hid),
|
||||
skinInfo: pinus.app.get('initSkins').get(hid)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user