This commit is contained in:
aozhiwei 2021-09-15 08:59:56 +00:00
parent f58677afb9
commit 8154ee7235
4 changed files with 17 additions and 0 deletions

View File

@ -417,6 +417,7 @@ void Car::BeKill(int killer_id, const std::string& killer_name, int weapon_id)
meta->i->atk()
);
room->NotifyUiUpdate();
GetTrigger()->Die();
}
void Car::GetAabbBox(AabbCollider& aabb_box)

View File

@ -278,6 +278,7 @@ void Hero::BeKill(int killer_id, const std::string& killer_name, int weapon_id)
}
},
&xtimer_attacher.timer_list_);
GetTrigger()->Die();
}
void Hero::OnAddToTargetPartObject(Entity* target)

View File

@ -192,6 +192,20 @@ void Trigger::ReceiveDmg()
void Trigger::Die()
{
{
std::vector<int> list;
owner_->TraverseBuff
(
[&list] (Buff* buff, bool& stop)
{
if (buff->meta->i->dead_remove()) {
list.push_back(buff->buff_uniid);
}
});
for (int buff_uniid : list) {
owner_->RemoveBuffByUniId(buff_uniid);
}
}
TriggeCondBuffAll(kCondBuffDid);
}

View File

@ -293,6 +293,7 @@ message Buff
optional int32 post_battle_valid = 26;
optional string only_spec_race = 27;
optional string exclude_spec_race = 28;
optional int32 dead_remove = 29;
}
message Drop