don't attempt to increase duration of stackable buffs

This commit is contained in:
crabman 2024-02-17 00:01:04 +01:00 committed by UncomfySilence
parent e720ee834e
commit 2249ca6a49

View File

@ -816,8 +816,9 @@ impl Buffs {
};
// If another buff with the same fields is found, update end_time and effects
let key = if let Some((other_buff, key)) =
other_key.and_then(|key| Some((self.buffs.get_mut(key)?, key)))
let key = if !kind.stacks()
&& let Some((other_buff, key)) =
other_key.and_then(|key| Some((self.buffs.get_mut(key)?, key)))
{
other_buff.end_time = buff.end_time;
other_buff.effects = buff.effects;