From 042d158003770c0941d7f333cfdc380281e159ed Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 10 Jul 2019 10:38:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=8D=E6=B4=BBbuff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/gameserver/human.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index c9cd137..2a9b89a 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -1351,6 +1351,7 @@ void Human::AddBuff(MetaData::Buff* buff_meta) buff->meta = buff_meta; //buff->skill_meta buff->add_frameno = room->frame_no; + buff->xtimer_attacher.xtimer = &room->xtimer; buff_effect_hash_[buff->meta->i->buff_id()] = buff; room->frame_event.AddBuff(this, buff); { @@ -1476,9 +1477,15 @@ void Human::Revive() { dead = false; health = GetMaxHP(); + { + MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(1006); + if (buff_meta) { + AddBuff(buff_meta); + } + } room->frame_event.AddRevive(this); room->OnHumanRevive(this); - SyncAroundPlayers(); + } void Human::SelectSkillTargets(const a8::Vec2& target_pos, std::set& target_list)