This commit is contained in:
aozhiwei 2022-11-16 10:20:44 +08:00
parent 157a42a38e
commit e1efaf1f83
2 changed files with 8 additions and 7 deletions

View File

@ -248,10 +248,9 @@ void Ability::IncImmuneTimes(int tag)
{
auto itr = immune_tags_.find(tag);
if (itr != immune_tags_.end()) {
--itr->second;
if (itr->second <= 0) {
immune_tags_.erase(itr);
}
++itr->second;
} else {
immune_tags_[tag] = 1;
}
}
@ -259,9 +258,10 @@ void Ability::DecImmuneTimes(int tag)
{
auto itr = immune_tags_.find(tag);
if (itr != immune_tags_.end()) {
++itr->second;
} else {
immune_tags_[tag] = 1;
--itr->second;
if (itr->second <= 0) {
immune_tags_.erase(itr);
}
}
}

View File

@ -801,6 +801,7 @@ void Buff::ProcDisperse()
for (int buff_uniid : del_buffs) {
owner->RemoveBuffByUniId(buff_uniid);
}
owner->TryAddBuff(owner, meta->int_param2);
}
void Buff::CalcPassengerShotOffset()