将 consts 整理到几个文件中

This commit is contained in:
liangtongchuan
2020-12-15 16:02:59 +08:00
parent 3a78f667c3
commit e877b0190d
61 changed files with 402 additions and 69 deletions

View File

@@ -3,7 +3,7 @@
*/
import { ActionPointModel } from '../db/ActionPoint';
import { ACTION_POIN } from '../consts/consts';
import { ACTION_POIN } from '../consts';
export async function getAp(now: number, roleId: string) {
let dataAp = await ActionPointModel.getAp(roleId);

View File

@@ -1,7 +1,7 @@
import { HeroModel } from './../db/Hero';
import { HangUpRecordModel } from './../db/HangUpRecord';
import { ChannelService } from 'pinus';
import { HANG_UP_CONSTS, TOWER_TASK_CONST, REDIS_KEY } from './../consts/consts';
import { HANG_UP_CONSTS, TOWER_TASK_CONST, REDIS_KEY } from './../consts';
import { BattleRecordModel } from './../db/BattleRecord';
import { TowerRecordModel } from './../db/TowerRecord';
import { RoleModel } from './../db/Role';

View File

@@ -1,6 +1,6 @@
import { FriendPointModel } from './../db/FriendPoint';
import { STATUS } from './../consts/statusCode';
import { COM_BATTLE_ROBOT_ID_NAME, COM_TEAM_STATUS, CURRENCY_BY_TYPE, CURRENCY_TYPE, FRIEND_DROP_TYPE, COM_BTL_CONST, FRIEND_DROP_MAX } from './../consts/consts';
import { COM_BATTLE_ROBOT_ID_NAME, COM_TEAM_STATUS, CURRENCY_BY_TYPE, CURRENCY_TYPE, FRIEND_DROP_TYPE, COM_BTL_CONST, FRIEND_DROP_MAX } from './../consts';
import { RoleStatus, ComBattleTeamModel } from './../db/ComBattleTeam';
import { getBluePrtByQuality, getComBtlSetByQuality, getRewardByBlueprtId, getWarById, getWarIdByBlueprtId } from "../pubUtils/gamedata";
import { getRandEelm, getRandValue, resResult, ratioReward } from "../pubUtils/util";

View File

@@ -5,7 +5,7 @@
import { resResult, shouldRefresh } from '../pubUtils/util';
import { STATUS } from '../consts/statusCode';
import { RoleModel } from '../db/Role';
import { DUNGEON_CONST } from '../consts/consts';
import { DUNGEON_CONST } from '../consts';
// 检查秘境本次数checkBattle使用
export async function checkDungeonNum(roleId: string, inc: number) {

View File

@@ -3,8 +3,8 @@ import { getGamedata } from '../pubUtils/gamedata';
import EventRecord, { EventRecordModel } from '../db/EventRecord';
import { RoleModel } from '../db/Role';
import { genCode, decodeStrSingle, decodeStr, getRandomWithWeight, resResult, setLocalHours } from '../pubUtils/util';
import { EVENT_STATUS, EVENT_RECORD_STATUS, EVENT_TYPE, EVENT_RANDOM_TYPE_ONE_OPEN, EVENT_QUIZ_NUM, EVENT_ANSWER_STATUS, FUNCS_ID } from '../consts/consts';
import { EVENT_REFRESH_NUM } from '../consts/consts';
import { EVENT_STATUS, EVENT_RECORD_STATUS, EVENT_TYPE, EVENT_RANDOM_TYPE_ONE_OPEN, EVENT_QUIZ_NUM, EVENT_ANSWER_STATUS, FUNCS_ID } from '../consts';
import { EVENT_REFRESH_NUM } from '../consts';
import { STATUS } from '../consts/statusCode';
/**

View File

@@ -5,8 +5,8 @@ import { PvpDefenseModel } from '../db/PvpDefense';
import { getWarJsons, getGamedata, getExpeditionById } from '../pubUtils/gamedata';
import { decodeStr, resResult, setLocalHours, shouldRefresh } from '../pubUtils/util';
import { EXPEDITION_CONST } from '../consts/consts';
import { getAtrrNameById} from '../consts/abilityConst';
import { EXPEDITION_CONST } from '../consts';
import { getAtrrNameById} from '../consts';
import Actor from '../pubUtils/actor';
import { ExpeditionWarRecordModel } from '../db/ExpeditionWarRecord';

View File

@@ -1,7 +1,7 @@
import { Application, BackendSession, FrontendSession } from "pinus";
import { getGamedata } from "../pubUtils/gamedata";
import Role, { RoleModel } from "../db/Role";
import { FUNC_OPT_TYPE } from "../consts/consts";
import { FUNC_OPT_TYPE } from "../consts";
// 开启功能
export async function switchOnFunc(roleId: string, type: number, param: number, app: Application, session: (BackendSession|FrontendSession)) {

View File

@@ -4,7 +4,7 @@ import Role, { RoleModel } from '../db/Role'
import { getLvByExp, getExpByLv } from '../pubUtils/gamedata';
import { redisUserInfoUpdate } from './redisService';
import { switchOnFunc } from './funcSwitchService';
import { FUNC_OPT_TYPE } from '../consts/consts';
import { FUNC_OPT_TYPE } from '../consts';
import { Application, BackendSession } from 'pinus';
export async function roleLevelup(roleId: string, kingExp: number, app: Application, session: BackendSession) {

View File

@@ -2,7 +2,7 @@
* 体力系统
*/
import { HERO_SYSTEM_TYPE } from '../consts/consts';
import { HERO_SYSTEM_TYPE } from '../consts';
import { pinus } from 'pinus';
import { STATUS } from '../consts/statusCode';
@@ -11,8 +11,7 @@ import Hero from '../db/Hero';
import { RoleModel } from '../db/Role';
import { CeAttrData, CeAttr } from '../db/BaseModel';
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/abilityConst';
import { getAttrNameByJobStage, getAttrCeRatio, getAtrrNameById, ABI_TYPE_TO_STAGE, ABI_STAGE, SEID_TYPE, HERO_ATTR} from '../consts';
const HERO_CE_RATIO = 100;
const _ = require('underscore');
//战力计算TODO

View File

@@ -1,7 +1,7 @@
import { GOOD_QUALITY } from './../consts/consts';
import { GOOD_QUALITY } from './../consts';
import { RoleModel } from "../db/Role";
import * as Redis from 'redis';
import {REDIS_KEY} from '../consts/consts'
import {REDIS_KEY} from '../consts'
import { GameModel } from "../db/Game";
import { promisifyAll } from 'bluebird';

View File

@@ -1,4 +1,4 @@
import { GOOD_TYPE, ITID, CURRENCY, CURRENCY_TYPE, COUNTER } from './../consts/consts';
import { GOOD_TYPE, ITID, CURRENCY, CURRENCY_TYPE, COUNTER } from './../consts';
import { EquipModel } from './../db/Equip';
import { CounterModel } from './../db/Counter';
import { decodeStr, resResult } from '../pubUtils/util';

View File

@@ -6,7 +6,7 @@
import { BattleDropModel } from '../db/BattleDrop';
import { getWarById, getBluePrtByQuality, getGamedata } from '../pubUtils/gamedata';
import { decodeStr, getRefTime, getRandomWithWeight, getRandomByLen } from '../pubUtils/util';
import { BATTLE_REWARD_TYPE, BLUEPRT_CONST } from '../consts/consts';
import { BATTLE_REWARD_TYPE, BLUEPRT_CONST } from '../consts';
import { handleReward } from './rewardService';
import { BattleBlueprtDropModel } from '../db/BattleBlueprtDrop'
import { RoleModel } from '../db/Role';