From da778b5549138b547a38f8605f02ae9567e8b0df Mon Sep 17 00:00:00 2001 From: zhl Date: Fri, 8 Jan 2021 11:11:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA=E7=94=A8?= =?UTF-8?q?=E4=BA=8E=E7=BB=9F=E8=AE=A1=E7=94=A8=E7=9A=84=E6=9B=B4=E6=96=B0?= =?UTF-8?q?pet=E7=8A=B6=E6=80=81=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/global.d.ts | 6 ++++++ src/rooms/RoomExtMethod.ts | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/global.d.ts b/src/global.d.ts index 04bbd9e..4a027dd 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -216,6 +216,12 @@ declare module "colyseus" { * @param fromplayer */ updatePet(datas: PetInfo[], fromplayer?: string): void; + /** + * 更新随从信息, 统计用 + * @param datas + * @param fromplayer + */ + updatePetStat(datas: PetInfo[], fromplayer?: string): void; /** * 给room.mainClock设定任务 diff --git a/src/rooms/RoomExtMethod.ts b/src/rooms/RoomExtMethod.ts index 9cfeda0..640ba26 100644 --- a/src/rooms/RoomExtMethod.ts +++ b/src/rooms/RoomExtMethod.ts @@ -170,6 +170,16 @@ Object.defineProperties(Room.prototype, { this.broadcast("pet_update_s2c", {data: [...playerSet]}, {afterNextPatch: true}); } }, + /** + * 更新随从信息, 统计用 + * @param datas + * @param fromplayer + */ + updatePetStat: { + value: function (datas: PetInfo[], fromplayer?: string): void { + + } + }, /** * 为一个玩家生产n张指定效果id的卡, 并加入手牌 * @param effectId