优化:查询武将创建存储的rpc修改
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { ITID, CONSUME_TYPE, ITEM_TABLE, REDIS_KEY, TASK_TYPE, CURRENCY, CURRENCY_TYPE, MAIL_TYPE, HANDLE_REWARD_TYPE, HERO_SYSTEM_TYPE, CURRENCY_BY_TYPE } from './../consts';
|
||||
import { EquipModel, EquipType } from './../db/Equip';
|
||||
import { resResult } from '../pubUtils/util';
|
||||
import { getRandSingleEelm, resResult } from '../pubUtils/util';
|
||||
import { RoleModel, RoleType } from '../db/Role';
|
||||
import { setAp } from './actionPointService';
|
||||
import { pushCalPlayerCe, pushCalAllHeroCe, calPlayerCeAndSave } from './playerCeService';
|
||||
@@ -448,7 +448,12 @@ export async function createHeroes(roleId: string, roleName: string, sid: string
|
||||
let { pieceId, count } = transPiece(h.hid);
|
||||
pieces.push({ id: pieceId, count: count * heroCount });
|
||||
} else {
|
||||
let initInfo = await pinus.app.rpc.role.roleRemote.getInitHeroById.toServer(pinus.app.getServerId(), h.hid);
|
||||
let roleServers = pinus.app.getServersByType('role');
|
||||
let curServer = roleServers.find(cur => cur.id == pinus.app.getServerId());
|
||||
if(!curServer) {
|
||||
curServer = getRandSingleEelm(roleServers);
|
||||
}
|
||||
let initInfo = await pinus.app.rpc.role.roleRemote.getInitHeroById.toServer(curServer.id, h.hid);
|
||||
infos.set(h.hid, initInfo);
|
||||
userHeroesMap.set(h.hid, null);
|
||||
if (heroCount > 1) {
|
||||
|
||||
Reference in New Issue
Block a user