添加复活buff

This commit is contained in:
aozhiwei 2019-07-10 10:38:37 +08:00
parent ef34df3e7d
commit 042d158003

View File

@ -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<Entity*>& target_list)