清理一些console

This commit is contained in:
luying
2022-01-12 09:43:26 +08:00
parent cad2ff5c9b
commit 885fd2d239
25 changed files with 56 additions and 64 deletions
+1 -1
View File
@@ -772,7 +772,7 @@ export function getWishPoolReward(id: number) {
if(dicItid.type == CONSUME_TYPE.PIECE) {
starLevel = dicGoods.equipLvl;
}
console.log('*****', dicGoods.itid, starLevel, dicGoods.quality)
// console.log('*****', dicGoods.itid, starLevel, dicGoods.quality)
return gameData.guildWishReward.get(`${dicGoods.itid}_${starLevel}_${dicGoods.quality}`);
}
+6 -6
View File
@@ -95,7 +95,7 @@ export async function reCalAllHeroCe(type: number, roleId: string, update: RoleU
update.topLineupCe = topLineupCe;
}
console.log('************ roleAttr', update.attr)
// console.log('************ roleAttr', update.attr)
role = await RoleModel.incRoleInfo(roleId, { ce: allIncCe },update);
let guild = await GuildModel.updateCe(roleId, allIncCe); // 公会更新战力
@@ -959,28 +959,28 @@ async function calSchoolStarIncAttr(role: RoleType, heros: HeroType[], type: num
*/
function calScrollAddAttr(role: RoleType,heros: HeroType[], hid: number) {
let { attr: roleAttrs } = role;
console.log('********** calScrollAddAttr', hid)
// console.log('********** calScrollAddAttr', hid)
let curHero = heros.find(cur => cur.hid == hid);
let dicHero = gameData.hero.get(hid);
if (!curHero || !dicHero) return roleAttrs;
let { quality } = dicHero;
let { star, quality: curQuality, colorStar } = curHero;
console.log('********** calScrollAddAttr curHero', star, curQuality, colorStar);
// console.log('********** calScrollAddAttr curHero', star, curQuality, colorStar);
let heroScroll = getScollByStar(quality, star, curQuality, colorStar);
if (!heroScroll) return roleAttrs;
console.log('********** heroScroll', heroScroll);
// console.log('********** heroScroll', heroScroll);
let isInit = star == dicHero.initialStars && curQuality == dicHero.quality && colorStar == 0;
let preScroll = isInit? null: gameData.preHeroScroll.get(heroScroll.id);
console.log('********** preScroll', preScroll);
// console.log('********** preScroll', preScroll);
heroScroll.ceAttr.forEach((add, attrId) => {
let preAdd = preScroll ? preScroll.ceAttr.get(attrId) : 0;
let fixUp = (add - preAdd) * HERO_CE_RATIO;
console.log('********** preAdd', attrId, preAdd, fixUp);
// console.log('********** preAdd', attrId, preAdd, fixUp);
updateRoleAttr(roleAttrs, attrId, { inc: { fixUp } });
});
return roleAttrs;
+4 -4
View File
@@ -325,18 +325,18 @@ export class CreateHeroes extends UpdateHeroes {
public async clearTask(activitiesTypeMap: ActivityInRemote[]) {
// 任务
console.log('****** checkTask before', Date.now())
// console.log('****** checkTask before', Date.now())
let m1 = await checkTask(this.roleId, TASK_TYPE.HERO_NUM, this.heroNum, true, {});
let m2 = await checkTaskWithHeroes(this.roleId, TASK_TYPE.HERO_QUALITY, this.resultHeroes);
let m3 = await checkTaskWithHeroes(this.roleId, TASK_TYPE.HERO_QUALITY_STAR_UP, this.resultHeroes);
let m4 = await checkTaskWithHeroes(this.roleId, TASK_TYPE.HERO_LV, this.resultHeroes);
this.taskPushMessage.push(...m1, ...m2, ...m3, ...m4);
console.log('****** checkTask after', Date.now())
// console.log('****** checkTask after', Date.now())
//成长任务
console.log('****** accomplishTask before', Date.now())
// console.log('****** accomplishTask before', Date.now())
let mm1 = await accomplishTask(this.serverId, this.roleId, TASK_TYPE.HERO_NUM, this.heroNum, null, activitiesTypeMap)
let mm2 = await accomplishTask(this.serverId, this.roleId, TASK_TYPE.HERO_QUALITY, this.heroNum, { heroes: this.resultHeroes }, activitiesTypeMap);
console.log('****** accomplishTask after', Date.now())
// console.log('****** accomplishTask after', Date.now())
this.activityTaskPushMessage.push(...mm1, ...mm2);
}
+1 -1
View File
@@ -8,7 +8,7 @@ import * as crypto from 'crypto'
export function md5(str: string, treatStr?: (str: string) => string) {
if(treatStr) str = treatStr(str);
console.log('*****str', str)
// console.log('*****str', str)
return crypto.createHash('md5').update(str, 'utf8').digest("hex");
};
+1 -1
View File
@@ -552,7 +552,7 @@ export async function accomplishTask(serverId: number, roleId: string, taskType:
let taskRecord = await ActivityDailyChallengesModel.findDataByCellIndex(serverId, activity.activityId, roleId, task.dayIndex, task.cellIndex, task.taskType)
let recordData = taskRecord && taskRecord.data ? JSON.parse(taskRecord.data) : null
let { addCount, record } = isComplete(roleId, task.taskType, task.taskParam, count, activity.activityId, parma, recordData);
console.log('******* dailyChallenge', addCount, record)
// console.log('******* dailyChallenge', addCount, record)
if (addCount) {
if (taskType == TASK_TYPE.ROLE_LV || taskType == TASK_TYPE.ROLE_TITLE || taskType == TASK_TYPE.BATTLE_TOWER_LV || taskType == TASK_TYPE.FRIEND_NUM) {
let playerRecord = await ActivityDailyChallengesModel.setTaskCount(serverId, activity.activityId, roleId, task.dayIndex, task.cellIndex, task.taskType, addCount);