From 6bf63ff8c110c29b51ca6f271485cb6c0f4a40c0 Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 16 Dec 2020 14:58:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E7=A7=81=E4=BF=A1=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E7=BB=9F=E4=B8=80=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rooms/MSender.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rooms/MSender.ts b/src/rooms/MSender.ts index bff69f3..ce25426 100644 --- a/src/rooms/MSender.ts +++ b/src/rooms/MSender.ts @@ -36,7 +36,7 @@ Object.defineProperties(Room.prototype, { */ sSelectHero: { value: function (client: Client, data?: any) { - client && client.send('select_hero_s2c', data); + this.send(client, 'select_hero_s2c', data); }, writable: true }, @@ -56,7 +56,7 @@ Object.defineProperties(Room.prototype, { */ sDrawCard: { value: function (client: Client, data?: any) { - client && client.send('draw_card_s2c', data); + this.send(client, 'draw_card_s2c', data); } }, /** @@ -108,7 +108,7 @@ Object.defineProperties(Room.prototype, { */ sMsgQueue: { value: function (client:Client, datas?: IMsg) { - client && client.send("msg_queue_s2c", datas); + this.send(client, "msg_queue_s2c", datas); } }, /** @@ -151,7 +151,7 @@ Object.defineProperties(Room.prototype, { */ sStealCard: { value: function (client: Client, data?: any) { - client && client.send("steal_card_s2c", data, {afterNextPatch: true}); + this.send(client, "steal_card_s2c", data, {afterNextPatch: true}); } }, /** @@ -161,7 +161,7 @@ Object.defineProperties(Room.prototype, { */ bRemoveCard: { value: function (client: Client, data?: any) { - client && client.send("remove_card_s2c", data); + this.send(client, "remove_card_s2c", data); } }, /** @@ -213,7 +213,7 @@ Object.defineProperties(Room.prototype, { sChangeCard: { value: function (client: Client, data?: any) { - client && client.send("change_card_s2c", data); + this.send(client, "change_card_s2c", data); } },