清理一些console
This commit is contained in:
@@ -84,10 +84,10 @@ export class DailyCoinHandler {
|
||||
return resResult(STATUS.ACTIVITY_DATA_ERROR);
|
||||
}
|
||||
let coinRewardCount = eval(rewardItem.rewardFormula);
|
||||
console.log('******** coinReward', lv, rewardItem.rewardFormula, coinRewardCount)
|
||||
// console.log('******** coinReward', lv, rewardItem.rewardFormula, coinRewardCount)
|
||||
|
||||
let baseRewardParamArr: Array<RewardParam> = [{ id: CURRENCY_BY_TYPE.get(CURRENCY_TYPE.COIN), count: coinRewardCount, type: ACTIVITY_RESOURCES_TYPE.GOODS }];
|
||||
console.log('第几次抽奖:', index, ' 基础奖励翻倍:', rate, JSON.stringify(baseRewardParamArr),)
|
||||
// console.log('第几次抽奖:', index, ' 基础奖励翻倍:', rate, JSON.stringify(baseRewardParamArr),)
|
||||
for (let reward of baseRewardParamArr) {
|
||||
reward.count = reward.count * rate;
|
||||
}
|
||||
@@ -96,15 +96,15 @@ export class DailyCoinHandler {
|
||||
if (extraIndex != -1) {//额外奖励
|
||||
let extraRewardParamArr: Array<RewardParam> = stringToRewardParam(playerData.extraReward);
|
||||
let extraReward = extraRewardParamArr[extraIndex];
|
||||
console.log('额外奖励', JSON.stringify(extraReward))
|
||||
// console.log('额外奖励', JSON.stringify(extraReward))
|
||||
allReward.push(extraReward);
|
||||
}
|
||||
}
|
||||
|
||||
let newConsume = mergeData(allConsume);
|
||||
let newReward = mergeData(allReward);
|
||||
console.log('所有消耗', JSON.stringify(newConsume))
|
||||
console.log('所有奖励', JSON.stringify(newReward))
|
||||
// console.log('所有消耗', JSON.stringify(newConsume))
|
||||
// console.log('所有奖励', JSON.stringify(newReward))
|
||||
|
||||
//检查资源
|
||||
let consumeResult = await handleCost(roleId, sid, newConsume, ITEM_CHANGE_REASON.DAILY_COIN_EXCHANGE);
|
||||
|
||||
@@ -63,7 +63,7 @@ export class RechargeMoneyHandler {
|
||||
|
||||
let recordArray = playerData.recordArray.filter(obj => { return obj && !obj.rewardTime })
|
||||
let rechargeItem = recordArray[0];
|
||||
console.log('recordArray', JSON.stringify(recordArray));
|
||||
// console.log('recordArray', JSON.stringify(recordArray));
|
||||
await ActivityRechargeMoneyModel.addRecord(rechargeItem._id, item.id, item.reward)
|
||||
let rewardParamArr: Array<RewardParam> = stringToRewardParam(item.reward);
|
||||
let result = await addReward(roleId, roleName, sid, serverId, rewardParamArr, ITEM_CHANGE_REASON.RECHARGE_REWARD)
|
||||
|
||||
@@ -93,7 +93,7 @@ export class ThirtyDaysHandler {
|
||||
if (activityDays < todayIndex && todayIndex <= (activityDays + playerData.days)) {//时间正常范围内
|
||||
|
||||
} else if (todayIndex > (activityDays + playerData.days)) {//活动已经过期
|
||||
console.log('过期奖励')
|
||||
// console.log('过期奖励')
|
||||
let expiredItems: Array<ThirtyDaysPointItem> = playerData.needMark();
|
||||
let cells = expiredItems.map(obj => obj.cellIndex)
|
||||
await ActivityThirtyDaysPointRewardModel.setExpired(activityId, roleId, cells);
|
||||
|
||||
@@ -55,7 +55,7 @@ export class ActivityRemote {
|
||||
this.app.set('activityByType', this.activityByType);
|
||||
this.app.set('activities', this.activities);
|
||||
this.app.set('groupToServer', this.groupToServer);
|
||||
console.log('****** loadActivities')
|
||||
// console.log('****** loadActivities')
|
||||
}
|
||||
|
||||
private setActivityTypeAndServer() {
|
||||
|
||||
@@ -6,7 +6,7 @@ import { difference } from 'underscore';
|
||||
* @Last Modified by: 梁桐川
|
||||
* @Last Modified time: 2021-08-27 17:47:56
|
||||
*/
|
||||
import { IT_TYPE, CURRENCY_BY_TYPE, CURRENCY_TYPE, COM_TEAM_STATUS, COM_BTL_CONST, CONSUME_TYPE, COM_BTL_QUALITY, MSG_SOURCE, QUALITY_TYPE, ROLE_SELECT, TASK_TYPE, KING_EXP_RATIO_TYPE, ITEM_CHANGE_REASON, getChannelType, CHANNEL_PREFIX } from './../../../consts';
|
||||
import { IT_TYPE, CURRENCY_BY_TYPE, CURRENCY_TYPE, COM_TEAM_STATUS, COM_BTL_CONST, CONSUME_TYPE, COM_BTL_QUALITY, MSG_SOURCE, QUALITY_TYPE, ROLE_SELECT, TASK_TYPE, KING_EXP_RATIO_TYPE, ITEM_CHANGE_REASON } from './../../../consts';
|
||||
import Role, { RoleModel } from '../../../db/Role';
|
||||
import { STATUS } from '../../../consts/statusCode';
|
||||
import { Application, BackendSession } from 'pinus';
|
||||
@@ -24,7 +24,7 @@ import { pushComBtlTeamMsg, pushFriendTeamInviteMsg, pushNormalItemMsg, pushTeam
|
||||
import { EXTERIOR } from '../../../pubUtils/dicParam';
|
||||
import { getZeroPointD, getTimeFunD, getSeconds, nowSeconds } from '../../../pubUtils/timeUtil';
|
||||
import { FriendParams } from '../../../domain/roleField/friend';
|
||||
import { checkActivityTask, checkTask, checkTaskWithArgs, checkTaskWithGoods } from '../../../services/taskService';
|
||||
import { checkTask, checkTaskWithGoods } from '../../../services/taskService';
|
||||
import { gameData, getWarByBlueprtId } from '../../../pubUtils/data';
|
||||
import { HeroModel } from '../../../db/Hero';
|
||||
|
||||
@@ -54,7 +54,7 @@ export class ComBattleHandler {
|
||||
let teamCode = session.get('teamCode');
|
||||
const { blueprtId, pub, ceLimit } = msg;
|
||||
|
||||
console.log('createTeam msg: ', msg);
|
||||
// console.log('createTeam msg: ', msg);
|
||||
// 检查藏宝图Id是否合法
|
||||
if (!blueprtIdValid(blueprtId)) return resResult(STATUS.COM_BATTLE_BLUEPRT_INVALID);
|
||||
const enoughBlueprt = await hasEnoughBlueprt(roleId, sid, blueprtId);
|
||||
@@ -680,21 +680,13 @@ export class ComBattleHandler {
|
||||
|
||||
async sendTeamMsg(msg: { teamCode: string, type: number, content: string, targetRoleId: string, targetMsgCode: string }, session: BackendSession) {
|
||||
let roleId = session.get('roleId');
|
||||
let sid = session.get('sid');
|
||||
let roleName = session.get('roleName');
|
||||
let serverId = session.get('serverId');
|
||||
|
||||
const { teamCode, type, content, targetRoleId, targetMsgCode } = msg;
|
||||
const result = await pushComBtlTeamMsg(teamCode, roleId, roleName, type, MSG_SOURCE.TEAM_ROLE, content, targetRoleId, targetMsgCode);
|
||||
if (!result) {
|
||||
return resResult(STATUS.WRONG_PARMS);
|
||||
}
|
||||
|
||||
// 任务
|
||||
await checkTaskWithArgs(roleId, sid, TASK_TYPE.CHAT, [getChannelType(CHANNEL_PREFIX.TEAM)]);
|
||||
|
||||
//活动任务
|
||||
await checkActivityTask(serverId, sid, roleId, TASK_TYPE.CHAT, 1, { chatType: getChannelType(CHANNEL_PREFIX.TEAM) })
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ Filter.prototype.before = async function (routeRecord: RouteRecord, msg: any, se
|
||||
const roleId: string = session.get('roleId');
|
||||
const uid: number = session.get('userid');
|
||||
const ip: string = session.get('ip');
|
||||
console.log('*********** global before ip', ip)
|
||||
// console.log('*********** global before ip', ip)
|
||||
let guildCode = session.get('guildCode');
|
||||
let blockType = session.get('blockType');
|
||||
// 访问频率控制
|
||||
|
||||
@@ -18,7 +18,7 @@ Filter.prototype.before = async function (routeRecord: RouteRecord, msg: any, se
|
||||
const groupId = session.get('groupId');
|
||||
|
||||
let route = routeRecord.route;
|
||||
console.log('********uid', uid, route);
|
||||
// console.log('********uid', uid, route);
|
||||
let dicApi = gameData.apiByUrl.get(route);
|
||||
if(!dicApi) {
|
||||
return next(new Error(), resResult(STATUS.GM_MISS_API));
|
||||
|
||||
@@ -172,7 +172,7 @@ export class RoleHandler {
|
||||
if (!dicReward || dicReward.rankId != type) continue;
|
||||
|
||||
let rankFirst: RankFirstType = pinus.app.get('rankFirstRewards').get(serverId)?.get(id);
|
||||
console.log('*******', pinus.app.get('rankFirstRewards'), rankFirst);
|
||||
// console.log('*******', pinus.app.get('rankFirstRewards'), rankFirst);
|
||||
if (!rankFirst) continue;
|
||||
if (role.rankReceived.includes(id)) continue;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export class RoleRemote {
|
||||
}
|
||||
|
||||
public setRankFirst(rank: RankFirstType) {
|
||||
console.log('****** setRankFirst', rank.serverId, rank.id, rank)
|
||||
// console.log('****** setRankFirst', rank.serverId, rank.id, rank)
|
||||
if(!this.rankFirstRewards.has(rank.serverId)) {
|
||||
this.rankFirstRewards.set(rank.serverId, new Map());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user