From ba2890cb182cc76d48e3a63e0d3e160ceff2dd5c Mon Sep 17 00:00:00 2001 From: zhl Date: Thu, 31 Dec 2020 17:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0pet=E7=9A=84buff=E5=92=8C?= =?UTF-8?q?=E5=90=B8=E8=A1=80=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rooms/MSender.ts | 7 +++++++ src/rooms/RoomExtMethod.ts | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/rooms/MSender.ts b/src/rooms/MSender.ts index 1202fbd..b6259a7 100644 --- a/src/rooms/MSender.ts +++ b/src/rooms/MSender.ts @@ -91,6 +91,7 @@ Object.defineProperties(Room.prototype, { pet.silence = obj.silence; pet.effectCount = obj.effectCount; pet.point = obj.point; + pet.hps = obj.hps; if (obj.skills) { pet.skills.length = 0; for (let s of obj.skills) { @@ -103,6 +104,12 @@ Object.defineProperties(Room.prototype, { pet.extSkills.push(s); } } + if (obj.buffs) { + pet.buffs.length = 0; + for (let s of obj.buffs) { + pet.buffs.push(s); + } + } this.broadcast("pet_info_s2c", data); } }, diff --git a/src/rooms/RoomExtMethod.ts b/src/rooms/RoomExtMethod.ts index bf99114..74fc14d 100644 --- a/src/rooms/RoomExtMethod.ts +++ b/src/rooms/RoomExtMethod.ts @@ -145,6 +145,7 @@ Object.defineProperties(Room.prototype, { pet.point = obj.point; pet.em = obj.em; pet.silence = obj.silence; + pet.hps = obj.hps; if (obj.skills) { pet.skills.length = 0; for (let s of obj.skills) { @@ -157,6 +158,12 @@ Object.defineProperties(Room.prototype, { pet.extSkills.push(s); } } + if (obj.buffs) { + pet.buffs.length = 0; + for (let s of obj.buffs) { + pet.buffs.push(s); + } + } } this.broadcast("pet_update_s2c", {data: [...playerSet]}, {afterNextPatch: true}); }