1
This commit is contained in:
parent
131b320761
commit
7def2e3d82
@ -244,10 +244,8 @@ void RoomObstacle::SpecExplosion(int delay_time)
|
|||||||
if (!target_list.empty()) {
|
if (!target_list.empty()) {
|
||||||
for (Creature* c : target_list) {
|
for (Creature* c : target_list) {
|
||||||
for (int buff_id : meta->buff_list) {
|
for (int buff_id : meta->buff_list) {
|
||||||
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
|
c->TryAddBuff(master.Get(),
|
||||||
if (buff_meta) {
|
buff_id
|
||||||
c->AddBuff(master.Get(),
|
|
||||||
buff_meta
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -255,7 +253,6 @@ void RoomObstacle::SpecExplosion(int delay_time)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (explosion_times_ >= total_explosion_times_) {
|
if (explosion_times_ >= total_explosion_times_) {
|
||||||
if (room->xtimer.GetRunningTimer()) {
|
if (room->xtimer.GetRunningTimer()) {
|
||||||
room->xtimer.DeleteTimer(room->xtimer.GetRunningTimer());
|
room->xtimer.DeleteTimer(room->xtimer.GetRunningTimer());
|
||||||
@ -901,17 +898,15 @@ void RoomObstacle::ActiveMedicalStation()
|
|||||||
float add_hp = SkillHelper::GetYlzRecoverHp(obstacle->master.Get(),
|
float add_hp = SkillHelper::GetYlzRecoverHp(obstacle->master.Get(),
|
||||||
c,
|
c,
|
||||||
obstacle->skill_meta);
|
obstacle->skill_meta);
|
||||||
|
float old_hp = c->GetHP();
|
||||||
c->AddHp(add_hp);
|
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) {
|
for (int buff_id : obstacle->meta->buff_list) {
|
||||||
MetaData::Buff* buff_meta = MetaMgr::Instance()->GetBuff(buff_id);
|
c->TryAddBuff(obstacle->master.Get(),
|
||||||
if (buff_meta && c->GetBuffById(buff_id)) {
|
buff_id
|
||||||
c->AddBuff(obstacle->master.Get(),
|
|
||||||
buff_meta
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
{
|
{
|
||||||
std::string dbg_msg = a8::Format
|
std::string dbg_msg = a8::Format
|
||||||
|
Loading…
x
Reference in New Issue
Block a user