hid的初始seqId改为10000

This commit is contained in:
luying
2020-11-20 17:05:52 +08:00
parent d9e1bc2bcb
commit 90a3c9f7d4
6 changed files with 25 additions and 17 deletions

View File

@@ -3,6 +3,7 @@ import { HeroModel } from '../../../db/Hero';
import { EquipModel } from '../../../db/Equip';
import { calculateCE } from '../../../pubUtils/util';
import {Application, BackendSession, createTcpMailBox} from 'pinus';
import { COUNTER } from '../../../consts/consts';
export default function(app: Application) {
return new RoleHandler(app);
@@ -13,7 +14,7 @@ export class RoleHandler {
}
async initEquips(roleId: string, roleName: string) {
const seqId = await CounterModel.getNewCounter('eid');
const seqId = await CounterModel.getNewCounter(COUNTER.EID);
const equipInfo = {
roleId,
roleName,
@@ -27,7 +28,7 @@ export class RoleHandler {
}
async initHeros(roleId: string, roleName: string) {
const seqId = await CounterModel.getNewCounter('hid');
const seqId = await CounterModel.getNewCounter(COUNTER.HID);
let ce = calculateCE({hid: 1, lv: 1});
const heroInfo = {

View File

@@ -1,4 +1,4 @@
import { GOOD_TYPE, ITID, CURRENCY, CURRENCY_TYPE } from './../consts/consts';
import { GOOD_TYPE, ITID, CURRENCY, CURRENCY_TYPE, COUNTER } from './../consts/consts';
import { EquipModel } from './../db/Equip';
import { CounterModel } from './../db/Counter';
import { decodeStr } from '../pubUtils/util';
@@ -58,7 +58,7 @@ async function rewardWeapons (roleId: string, roleName: string, dicGood: any, w
let weaponsData = [];
let cnt = weapon.cnt;
while (cnt > 0) {
const seqId = await CounterModel.getNewCounter('eid');
const seqId = await CounterModel.getNewCounter(COUNTER.EID);
const equipInfo = {
roleId,
roleName,