From e0b76dc2a63f973199b9bff891eeef283f3cb685 Mon Sep 17 00:00:00 2001 From: zhl Date: Thu, 24 Dec 2020 20:23:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9C=BA=E5=99=A8=E4=BA=BA?= =?UTF-8?q?=E7=9A=84=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/robot/Robot.ts | 2 +- src/robot/RobotClient.ts | 2 +- src/utils/assistant.util.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/robot/Robot.ts b/src/robot/Robot.ts index 262b7be..619295a 100644 --- a/src/robot/Robot.ts +++ b/src/robot/Robot.ts @@ -46,7 +46,6 @@ export class Robot { addListeners() { let self = this; this.room.onMessage("*", (type, data) => { - debug("[ROBOT] received message:", type, "=>", data); switch (type) { case 'draw_card_s2c': // if (data.player == self.sessionId) { @@ -56,6 +55,7 @@ export class Robot { case 'player_ready_s2c': break; case 'eat_card_s2c': + debug("[ROBOT] received message:", type, "=>", data); if (data.errcode == 0 && data.player == self.sessionId) { self.selectPet(); } diff --git a/src/robot/RobotClient.ts b/src/robot/RobotClient.ts index b268ab3..568d6c1 100644 --- a/src/robot/RobotClient.ts +++ b/src/robot/RobotClient.ts @@ -100,7 +100,7 @@ export class RobotClient implements Client { } public send(messageOrType: any, messageOrOptions?: any | ISendOptions, options?: ISendOptions) { - log(`receive server msg: ${messageOrType}, ${messageOrOptions}`); + // log(`receive server msg: ${messageOrType}, ${messageOrOptions}`); let self = this; if (!this.active) { return; diff --git a/src/utils/assistant.util.ts b/src/utils/assistant.util.ts index e333eda..440b68c 100644 --- a/src/utils/assistant.util.ts +++ b/src/utils/assistant.util.ts @@ -10,7 +10,7 @@ import {HeroCfg} from "../cfg/parsers/HeroCfg"; import {EffectType} from "../cfg/enums/EffectType"; import {CardType} from "../cfg/enums/CardType"; import {GameEnv} from "../cfg/GameEnv"; -import {error} from "../common/Debug"; +import {error, robotLog} from "../common/Debug"; let assistantUtil = { @@ -175,6 +175,7 @@ let assistantUtil = { error(`无法选择随从或法术, 随从数: ${petCount}, 法术牌数量: ${spellCards.length}`); return null; } + robotLog(`选择: ${result.effect} 类型: ${effectMap.get(result.effect).type_id}`) let targetType: SkillTargetType = CfgMan.getTargetByCard(result.effect); let targetPlayer; let targetPos;