添加数据库类型别名
This commit is contained in:
@@ -9,7 +9,7 @@ import { STATUS } from '../consts/statusCode';
|
||||
import { resResult, deepCopy } from '../pubUtils/util';
|
||||
import Hero from '../db/Hero';
|
||||
import { RoleModel } from '../db/Role';
|
||||
import { CeAttrData, CeAttr } from '../db/BaseModel';
|
||||
import { CeAttrData, CeAttr } from '../db/generalField';
|
||||
import { getFashionsById, getJobInfoById, getJobByGradeAndClass, getHeroInfoById, getHeroStar, getHeroWake, getFiendShipLevel, getFriendShipById, getHeroSkillById, getSeidById } from '../pubUtils/gamedata';
|
||||
import { getAttrNameByJobStage, getAttrCeRatio, getAtrrNameById, ABI_TYPE_TO_STAGE, ABI_STAGE, SEID_TYPE, HERO_ATTR} from '../consts';
|
||||
const HERO_CE_RATIO = 100;
|
||||
@@ -61,6 +61,7 @@ export async function calPlayerCeAndSave(sid: string, roleId: string, heros: Arr
|
||||
for (let hero of heros) {
|
||||
let incHeroCe = calPlayerCe(hero, type, args);
|
||||
incPlayerCe += incHeroCe;
|
||||
|
||||
await hero.save();
|
||||
pushHeros.push({
|
||||
hid: hero.hid,
|
||||
@@ -216,7 +217,7 @@ export function calHeroFavourUpIncAttr(hero: any, args: Array<number>) {
|
||||
difAdd -= lastFiendShipLevel.add;
|
||||
}
|
||||
let attrName;
|
||||
for (let connect of hero.conections) {
|
||||
for (let connect of hero.connections) {
|
||||
let heroShip = getFriendShipById(connect.shipId, connect.level);
|
||||
for (let attr of heroShip.attributes) {
|
||||
attrName = getAtrrNameById(attr.id);
|
||||
|
||||
Reference in New Issue
Block a user