fix pvp刷新对手时保存数据

This commit is contained in:
luying
2021-01-14 15:58:18 +08:00
parent f3c76b8d6d
commit 5823a1b3eb
11 changed files with 372 additions and 221 deletions
+11 -1
View File
@@ -3,6 +3,7 @@
import { RoleType } from "../db/Role";
import { Robot } from "../db/PvpDefense";
import { reduceCe } from "./util";
import { PvpHeroInfo, PvpEnemies } from "../db/generalField";
export interface RewardInter {
id: number;
@@ -121,13 +122,22 @@ export class RankParam {
}
}
export interface PlayerDetailHero {
export class PlayerDetailHero {
actorId: number;
lv: number;
star: number;
colorStar: number;
quality: number;
score: number;
setPvpHeroInfo?(hero: PvpEnemies) {
this.actorId = hero.actorId;
this.lv = hero.lv;
this.star = hero.star;
this.colorStar = hero.colorStar;
this.quality = hero.quality;
this.score = hero.score;
}
}
export class PlayerDetail {
+5 -1
View File
@@ -8,7 +8,7 @@ import { DicRandomEffectPool } from './dictionary/DicRandomEffectPool';
import { HERO_CE_RATIO, ABI_STAGE } from '../consts';
import { findIndex } from 'underscore';
const randomName = require("chinese-random-name");
const moment = require('moment');
export function genCode(len) {
@@ -516,3 +516,7 @@ export function getAllAttrStage() {
};
return attrs;
}
export function getChineseName() {
return randomName.generate()
}