This commit is contained in:
aozhiwei 2024-05-15 16:06:51 +08:00
parent 08243f9f9b
commit 9f8271f74b

View File

@ -677,6 +677,13 @@ void Trigger::EnterBattleMode()
(kEventEnterBattleMode,
[this] (Buff* buff, bool& stop)
{
for (int buff_id : buff->meta->_buff_param4_int_list) {
if (buff_id > 0) {
owner_->TryAddBuff(owner_, buff_id);
} else {
owner_->ClearBuffById(buff_id);
}
}
});
}
@ -686,5 +693,12 @@ void Trigger::LeaveBattleMode()
(kEventLeaveBattleMode,
[this] (Buff* buff, bool& stop)
{
for (int buff_id : buff->meta->_buff_param4_int_list) {
if (buff_id > 0) {
owner_->TryAddBuff(owner_, buff_id);
} else {
owner_->ClearBuffById(buff_id);
}
}
});
}