From 3df44fed2082a5a40dca056851de43802f8acef6 Mon Sep 17 00:00:00 2001 From: zhl Date: Mon, 4 Jan 2021 13:35:03 +0800 Subject: [PATCH] =?UTF-8?q?giveUpCard=E8=BF=94=E5=9B=9E=E5=AE=9E=E9=99=85?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8D=A1=E7=89=8C=E7=9A=84=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/global.d.ts | 2 +- src/rooms/RoomExtMethod.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/global.d.ts b/src/global.d.ts index 70c79db..e5da63f 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -187,7 +187,7 @@ declare module "colyseus" { * @param dstplayer 目标玩家 * @param count */ - giveUpCard(dstplayer: string, count: number): boolean; + giveUpCard(dstplayer: string, count: number): number; /** * 补卡, 并广播消息 diff --git a/src/rooms/RoomExtMethod.ts b/src/rooms/RoomExtMethod.ts index 74fc14d..debf1b7 100644 --- a/src/rooms/RoomExtMethod.ts +++ b/src/rooms/RoomExtMethod.ts @@ -54,7 +54,7 @@ Object.defineProperties(Room.prototype, { cards: cardIds }; this.bRemoveCard(msgData); - return true; + return tmpCards.length; } }, /**