From e0784dad494d561c4f63747457b6790f40b6d015 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 22 Sep 2021 08:13:53 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=95=E6=9C=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/gameserver/constant_export.h | 1 + server/gameserver/roomobstacle.cc | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/server/gameserver/constant_export.h b/server/gameserver/constant_export.h index 7e4a6c6..a248bf5 100644 --- a/server/gameserver/constant_export.h +++ b/server/gameserver/constant_export.h @@ -17,6 +17,7 @@ const int kPoisioningBuffId = 7016; const int kRescueBuffId = 7017; const int kVertigoBuffId = 7018; const int kPeaceModeBuffId = 7019; +const int kPullToWalkableBuffId = 8003; enum BuffEffectType_e { diff --git a/server/gameserver/roomobstacle.cc b/server/gameserver/roomobstacle.cc index 8f47d5f..a373eca 100644 --- a/server/gameserver/roomobstacle.cc +++ b/server/gameserver/roomobstacle.cc @@ -649,7 +649,16 @@ void RoomObstacle::PushCollisionObjects() [this] (Creature* c, bool& stop) { if (TestCollision(room, c)) { - c->MustBeAddBuff(c, 8003); + c->room->xtimer.AddDeadLineTimerAndAttach + (1, + a8::XParams() + .SetSender(c), + [] (const a8::XParams& param) + { + Creature* c = (Creature*)param.sender.GetUserData(); + c->MustBeAddBuff(c, kPullToWalkableBuffId); + }, + &c->xtimer_attacher.timer_list_); } }); }