This commit is contained in:
aozhiwei 2022-10-27 10:14:59 +08:00
parent 131b320761
commit 7def2e3d82

View File

@ -244,12 +244,9 @@ void RoomObstacle::SpecExplosion(int delay_time)
if (!target_list.empty()) {
for (Creature* c : target_list) {
for (int buff_id : meta->buff_list) {
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
if (buff_meta) {
c->AddBuff(master.Get(),
buff_meta
);
}
c->TryAddBuff(master.Get(),
buff_id
);
}
}
}
@ -901,15 +898,13 @@ void RoomObstacle::ActiveMedicalStation()
float add_hp = SkillHelper::GetYlzRecoverHp(obstacle->master.Get(),
c,
obstacle->skill_meta);
float old_hp = c->GetHP();
c->AddHp(add_hp);
if (obstacle->master.Get()) {
if (std::abs(c->GetHP() - old_hp) > 0.0001f && obstacle->master.Get()) {
for (int buff_id : obstacle->meta->buff_list) {
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
if (buff_meta && c->GetBuffById(buff_id)) {
c->AddBuff(obstacle->master.Get(),
buff_meta
);
}
c->TryAddBuff(obstacle->master.Get(),
buff_id
);
}
}
#ifdef DEBUG