全局:清理部分console
This commit is contained in:
@@ -830,7 +830,7 @@ export class GuildHandler {
|
||||
if (!checkResult) return resResult(STATUS.GUILD_AUTH_NOT_ENOUGH);
|
||||
|
||||
let startTime = getRefTime(new Date(), 0, -3);
|
||||
console.log(startTime)
|
||||
// console.log(startTime)
|
||||
const list = await GuildRecModel.getGuildRec(code, getSeconds(startTime));
|
||||
|
||||
return resResult(STATUS.SUCCESS, { list });
|
||||
|
||||
@@ -265,7 +265,7 @@ export class GateActivityHandler {
|
||||
// ! 测试接口
|
||||
async debugGetPrivate(msg: { }, session: BackendSession) {
|
||||
let guildCode = session.get('guildCode');
|
||||
console.log(guildCode);
|
||||
// console.log(guildCode);
|
||||
let serverId = session.get('serverId');
|
||||
let res = getGateActivityObj().getObj(guildCode, serverId);
|
||||
return resResult(STATUS.SUCCESS, res)
|
||||
|
||||
@@ -32,7 +32,7 @@ export class ShopHandler {
|
||||
let shopItemList = new Array<ShopItemListParam>(); // 返回
|
||||
let dbDicShop = await DicShopListModel.findByShopId(shopId);
|
||||
let userShopRecs = await UserShopModel.findMapByShopId(roleId, shopId);
|
||||
console.log(JSON.stringify([...userShopRecs]))
|
||||
// console.log(JSON.stringify([...userShopRecs]))
|
||||
|
||||
|
||||
if(!dbDicShop || dbDicShop.useJson) { // 完全使用json中配置的商品,数据库只做排序用,数据库内没有的排到最后
|
||||
|
||||
@@ -46,7 +46,7 @@ export async function checkDungeonAndIncrease(roleId: string, inc: number, isRef
|
||||
if(dungeonCnt + inc > DUNGEON_CONST.MAX_CNT + dungeonBuyCnt ) {
|
||||
return { status: -1, resResult: resResult(STATUS.DUNGEON_TIMES_LACK) }
|
||||
}
|
||||
console.log('needRefresh', needRefresh);
|
||||
// console.log('needRefresh', needRefresh);
|
||||
await RoleModel.increaseDungeonCnt(roleId, needRefresh, inc, curTime);
|
||||
return {status: 1, data: {
|
||||
battleCount: DUNGEON_CONST.MAX_CNT + dungeonBuyCnt - dungeonCnt - inc,
|
||||
|
||||
@@ -21,7 +21,7 @@ export class GateActivityObject {
|
||||
private guilds: Map<number, string[]> = new Map(); // 参加的所有军团 server => [guildCode]
|
||||
|
||||
public getObj(guildCode: string, serverId: number) {
|
||||
console.log(guildCode, serverId)
|
||||
// console.log(guildCode, serverId)
|
||||
return {
|
||||
gateHp: this.getGateHpAndInc(guildCode),
|
||||
members: this.members.get(guildCode)||[],
|
||||
|
||||
@@ -470,7 +470,7 @@ export async function autoDeclare(serverId: number) {
|
||||
guardList.push({ cityId, guardGuildCode });
|
||||
await GuildActivityCityModel.clearGuard(serverId, cityId);
|
||||
}
|
||||
console.log(JSON.stringify(guardList));
|
||||
// console.log(JSON.stringify(guardList));
|
||||
for (let { cityId, guardGuildCode } of guardList) {
|
||||
let dicCity = gameData.cityActivity.get(cityId);
|
||||
if (guardGuildCode && dicCity.nextCity) {
|
||||
@@ -613,7 +613,7 @@ export async function calWoodenHorseAndSend(serverId: number) {
|
||||
let len = map.get(rank).length;
|
||||
if( len >= limit) {
|
||||
// 发送
|
||||
console.log('send', woodenHorseList.length);
|
||||
// console.log('send', woodenHorseList.length);
|
||||
let curRank = ranks[rank];
|
||||
let wh = await obj.getWoodenHorse(curRank.code, serverId);
|
||||
let myGuildRank = new SimpleGuildRankWithTimeParam(curRank.rank, curRank.code, curRank.name, wh);
|
||||
|
||||
@@ -29,7 +29,7 @@ import { Rank } from "./rankService";
|
||||
export async function checkAuth(func: number, roleId: string, code?: string, userGuild?: UserGuildType) {
|
||||
const auth = await UserGuildModel.getMyAuth(roleId, code, userGuild);
|
||||
const dicGuildAuth = gameData.guildAuth.get(func);
|
||||
console.log('*checkAuth*', auth, dicGuildAuth)
|
||||
// console.log('*checkAuth*', auth, dicGuildAuth)
|
||||
if(!dicGuildAuth) return false;
|
||||
|
||||
return dicGuildAuth.includes(auth);
|
||||
@@ -188,7 +188,7 @@ export async function addActive(roleId: string, serverId: number, id: number, ty
|
||||
*/
|
||||
export async function getUserGuildWithRefActive(roleId: string, select: string, notPush?: boolean) {
|
||||
let userGuild = await UserGuildModel.getMyGuild(roleId, select? select + ' wishGoods +refTimeDaily': '+refTimeDaily');
|
||||
console.log(JSON.stringify(userGuild))
|
||||
// console.log(JSON.stringify(userGuild))
|
||||
if(!userGuild) return false;
|
||||
let { receivedActive, refTimeDaily, activeDaily, activeRecord, wishGoods } = userGuild;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import { updateUserInfo } from './redisService';
|
||||
export async function calPlayerCeAndSave(type: number, sid: string, roleId: string, originHero: HeroType, update: HeroUpdate, args?: Array<number>) {
|
||||
let {role, pushHeros, topLineupCe, hero, guild, serverId} = await pubCalPlayerCeAndSave(type, roleId, originHero, update, args);
|
||||
|
||||
console.log(JSON.stringify(pushHeros))
|
||||
// console.log(JSON.stringify(pushHeros))
|
||||
//下发战力
|
||||
let uids = [{ uid: roleId, sid }];
|
||||
pinus.app.get('channelService').pushMessageByUids('onPlayerCeUpdate', resResult(STATUS.SUCCESS, { ce: reduceCe(role.ce) , heros: pushHeros, topLineupCe: reduceCe(topLineupCe) }), uids);
|
||||
|
||||
@@ -111,7 +111,7 @@ export async function refreshEnemies(role: RoleType, score: number, pLv: number)
|
||||
}
|
||||
|
||||
export async function matchPlayerByRank(seasonNum: number, oppPlayers: OppPlayers[], mapWarJson: DicWarJson[], roleId: string, pos: number) {
|
||||
console.log('matchPlayerByRank', JSON.stringify(oppPlayers))
|
||||
// console.log('matchPlayerByRank', JSON.stringify(oppPlayers))
|
||||
let r = new Rank(REDIS_KEY.PVP_RANK, {});
|
||||
let ridRanks = new Array<number>(); // 已经被使用了的排名
|
||||
for(let { roleId: curRoleId } of oppPlayers) {
|
||||
@@ -173,7 +173,7 @@ export async function matchPlayerByRank(seasonNum: number, oppPlayers: OppPlayer
|
||||
}
|
||||
|
||||
async function matchPlayer(seasonNum: number, oppPlayers: OppPlayers[], mapWarJson: DicWarJson[], roleId: string, pLv: number, dicOpp: DicPvpOpponent ) {
|
||||
console.log('matchPlayer', JSON.stringify(oppPlayers))
|
||||
// console.log('matchPlayer', JSON.stringify(oppPlayers))
|
||||
|
||||
let { id: pos, minLv, maxLv } = dicOpp
|
||||
let range = await PvpDefenseModel.findByTeamLv(seasonNum, pLv + minLv, pLv + maxLv);
|
||||
@@ -247,7 +247,7 @@ async function generPlayerOppHis(pvpdefense: PvpDefenseType, mapWarJson: DicWarJ
|
||||
}
|
||||
|
||||
async function matchRobot(oppPlayers: OppPlayers[], mapWarJson: DicWarJson[], role: RoleType, pLv: number, dicOpp: DicPvpOpponent) {
|
||||
console.log('matchRobot', JSON.stringify(oppPlayers))
|
||||
// console.log('matchRobot', JSON.stringify(oppPlayers))
|
||||
|
||||
let { lv: myLv, topLineupCe: myCe, roleId } = role;
|
||||
let { id: pos, minLv, maxLv, ratio } = dicOpp;
|
||||
|
||||
@@ -606,7 +606,7 @@ export class Rank {
|
||||
if (this.isUnion) {
|
||||
key = await this.generateUnionRank();
|
||||
}
|
||||
console.log('**getMyRank',key, this.composeFields(this.key, myId), this.key, myId)
|
||||
// console.log('**getMyRank',key, this.composeFields(this.key, myId), this.key, myId)
|
||||
let myRank = await redisClient().zrevrankAsync(key, this.composeFields(this.key, myId));
|
||||
if(!myRank && myRank != 0) {
|
||||
return 0;
|
||||
|
||||
@@ -217,7 +217,7 @@ export async function setPvpDefResult(pvpDefense: PvpDefenseType, seasonNum: num
|
||||
* 每周重置地图
|
||||
*/
|
||||
export async function resetPvpWarId() {
|
||||
console.log('resetPvpWarId');
|
||||
// console.log('resetPvpWarId');
|
||||
let systemConfig = await SystemConfigModel.findSystemConfig();
|
||||
let warIds = deepCopy(getPvpGkWarIds());
|
||||
let index = indexOf(warIds, systemConfig.warId);
|
||||
|
||||
@@ -190,7 +190,7 @@ export class WarReward {
|
||||
// let warType = this.warInfo.warType;
|
||||
|
||||
if(this.isSuccess) { // 成功了才给固定奖励
|
||||
console.log(this.fixReward)
|
||||
// console.log(this.fixReward)
|
||||
if(this.fixReward) this.handleFixReward(num, this.fixReward);
|
||||
if(this.conditionReward) this.handleConditionReward(num, this.conditionReward);
|
||||
if(this.randomReward) await this.handleRandomReward(num, this.randomReward);
|
||||
|
||||
Reference in New Issue
Block a user