From 3ef95fe2d0e92ec8229db08096eb55dc91f99885 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 5 Jul 2024 13:56:36 +0800 Subject: [PATCH] 1 --- server/gameserver/creature.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index 9f3a8ce5..8e1fcf1f 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -2455,7 +2455,16 @@ void Creature::OnBattleStart(Room* room) } #endif if (GetNetData()->HasWing()) { - TryAddBuff(this, 1029000101); + room->xtimer.SetTimeoutWpEx + ( + 2 * SERVER_FRAME_RATE, + [this] (int event, const a8::Args* args) + { + if (a8::TIMER_EXEC_EVENT == event) { + TryAddBuff(this, 1029000101); + } + }, + &xtimer_attacher); } for (int item_id : GetNetData()->GetAvatars()) { if (item_id == 290001) {