移除一些console.log

This commit is contained in:
zhl 2021-01-12 13:34:43 +08:00
parent fca0781a41
commit f5b591b6f7
3 changed files with 8 additions and 5 deletions

View File

@ -33,7 +33,7 @@ export class GeneralRoom extends Room {
assistMap: Map<String, RobotClient> = new Map();
async onAuth (client:Client, options: any, request: IncomingMessage) {
console.log(options);
debugRoom(options);
// TODO: 验证用户信息
// client.auth.accountId = options.accountId;
// client.auth.sessionId = options.sessionId;

View File

@ -197,9 +197,12 @@ Object.defineProperties(Room.prototype, {
let valOld = targetPlayer.petData.get(data.pos) || 0;
let valNew = data.ap + data.extAp;
targetPlayer.petData.set(data.pos, valNew);
if (!player || !targetPlayer) {
error(`updatePetStat, player or targetPlayer is null ${!!player} ${!!targetPlayer}`);
}
if (valNew < valOld) {
player.statData.inc(StateTypeEnum.DMG, valOld - valNew);
targetPlayer.statData.inc(StateTypeEnum.TDMG, valOld - valNew);
player?.statData.inc(StateTypeEnum.DMG, valOld - valNew);
targetPlayer?.statData.inc(StateTypeEnum.TDMG, valOld - valNew);
}
}
}

View File

@ -220,10 +220,10 @@ export class GameResultCommand extends Command<CardGameState, {}> {
// @ts-ignore
axios(reqConfig)
.then(function (response) {
console.log(JSON.stringify(response.data));
debugRoom(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
error(error);
});
}