public static void AddBuff(this IBattleEntity entity, BuffContainer buffContainer) { if (entity.GetBuffByCardId(buffContainer.Id) == null) { entity.Buffs.Add(buffContainer); } }
public static void RemoveBuffById(this IBattleEntity entity, long id) { BuffContainer buffContainer = entity.GetBuffByCardId(id); if (buffContainer != null) { entity.Buffs.Remove(buffContainer); } }