添加数据库类型别名

This commit is contained in:
luying
2020-12-15 18:08:29 +08:00
parent 1565dd206a
commit 2d774fc0e4
38 changed files with 393 additions and 321 deletions

View File

@@ -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);